From bd438021ad4406274dd2f4308c187e6593576bbe Mon Sep 17 00:00:00 2001 From: SSE4 Date: Tue, 2 Feb 2021 13:32:56 +0700 Subject: [PATCH 1/7] - [libcurl] update usage of tools.apple_deployment_target_flag Signed-off-by: SSE4 --- recipes/libcurl/all/conanfile.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/recipes/libcurl/all/conanfile.py b/recipes/libcurl/all/conanfile.py index 203c122520d3d..555eed22ddaa1 100644 --- a/recipes/libcurl/all/conanfile.py +++ b/recipes/libcurl/all/conanfile.py @@ -402,7 +402,11 @@ def _configure_autotools_vars(self): arch_flag = "-arch {}".format(configure_arch) - ios_min_version = tools.apple_deployment_target_flag(self.settings.os, self.settings.os.version) + ios_min_version = tools.apple_deployment_target_flag(self.settings.os, + self.settings.get_safe("os.version"), + self.settings.get_safe("os.sdk"), + self.settings.get_safe("os.subsystem"), + self.settings.get_safe("arch")) extra_flag = "-Werror=partial-availability" # if we debug, maybe add a -gdwarf-2 , but why would we want that? From 6bf43e5be4ba63d9426c5b095b8f25062664ff15 Mon Sep 17 00:00:00 2001 From: bincrafters-user Date: Tue, 2 Feb 2021 06:33:35 +0000 Subject: [PATCH 2/7] libcurl: Update Conan conventions Automatically created by bincrafters-conventions 0.30.2 --- 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 555eed22ddaa1..8995f6267b52f 100644 --- a/recipes/libcurl/all/conanfile.py +++ b/recipes/libcurl/all/conanfile.py @@ -170,7 +170,7 @@ def build_requirements(self): tools.os_info.detect_windows_subsystem() != "msys2": self.build_requires("msys2/20200517") elif self._is_win_x_android: - self.build_requires("ninja/1.10.1") + self.build_requires("ninja/1.10.2") elif not tools.os_info.is_windows: self.build_requires("libtool/2.4.6") self.build_requires("pkgconf/1.7.3") From cbad6fe968139e64f94f197d6a83a6ddb157e726 Mon Sep 17 00:00:00 2001 From: SSE4 Date: Sat, 6 Feb 2021 16:16:19 +0700 Subject: [PATCH 3/7] - remove iOS-specific code, AutoToolsBuildEnvironment already handles sysroot, arch and min version Signed-off-by: SSE4 --- recipes/libcurl/all/conanfile.py | 61 ++------------------------------ 1 file changed, 3 insertions(+), 58 deletions(-) diff --git a/recipes/libcurl/all/conanfile.py b/recipes/libcurl/all/conanfile.py index 8995f6267b52f..745c174056f42 100644 --- a/recipes/libcurl/all/conanfile.py +++ b/recipes/libcurl/all/conanfile.py @@ -375,64 +375,6 @@ def _configure_autotools_vars(self): del autotools_vars["LIBS"] self.output.info("Autotools env vars: " + repr(autotools_vars)) - if tools.cross_building(self.settings): - if self.settings.os == "iOS": - iphoneos = tools.apple_sdk_name(self.settings) - ios_dev_target = str(self.settings.os.version).split(".")[0] - - env_cppflags = tools.get_env("CPPFLAGS", "") - socket_flags = " -DHAVE_SOCKET -DHAVE_FCNTL_O_NONBLOCK" - if self.settings.arch in ["x86", "x86_64"]: - autotools_vars["CPPFLAGS"] = "-D__IPHONE_OS_VERSION_MIN_REQUIRED={}0000 {} {}".format( - ios_dev_target, socket_flags , env_cppflags) - elif self.settings.arch in ["armv7", "armv7s", "armv8"]: - autotools_vars["CPPFLAGS"] = "{} {}".format(socket_flags, env_cppflags) - else: - raise ConanInvalidConfiguration("Unsuported iOS arch {}".format(self.settings.arch)) - - cc = tools.XCRun(self.settings, iphoneos).cc - sysroot = "-isysroot {}".format(tools.XCRun(self.settings, iphoneos).sdk_path) - - if self.settings.arch == "armv8": - configure_arch = "arm64" - configure_host = "arm" #unused, autodetected - else: - configure_arch = self.settings.arch - configure_host = self.settings.arch #unused, autodetected - - - arch_flag = "-arch {}".format(configure_arch) - ios_min_version = tools.apple_deployment_target_flag(self.settings.os, - self.settings.get_safe("os.version"), - self.settings.get_safe("os.sdk"), - self.settings.get_safe("os.subsystem"), - self.settings.get_safe("arch")) - extra_flag = "-Werror=partial-availability" - - # if we debug, maybe add a -gdwarf-2 , but why would we want that? - - autotools_vars["CC"] = cc - autotools_vars["IPHONEOS_DEPLOYMENT_TARGET"] = ios_dev_target - env_cflags = tools.get_env("CFLAGS", "") - autotools_vars["CFLAGS"] = "{} {} {} {}".format( - sysroot, arch_flag, ios_min_version, env_cflags - ) - - if self.options.with_ssl == "openssl": - openssl_path = self.deps_cpp_info["openssl"].rootpath - openssl_libdir = self.deps_cpp_info["openssl"].libdirs[0] - autotools_vars["LDFLAGS"] = "{} {} -L{}/{}".format(arch_flag, sysroot, openssl_path, openssl_libdir) - elif self.options.with_ssl == "wolfssl": - wolfssl_path = self.deps_cpp_info["wolfssl"].rootpath - wolfssl_libdir = self.deps_cpp_info["wolfssl"].libdirs[0] - autotools_vars["LDFLAGS"] = "{} {} -L{}/{}".format(arch_flag, sysroot, wolfssl_path, wolfssl_libdir) - else: - autotools_vars["LDFLAGS"] = "{} {}".format(arch_flag, sysroot) - - elif self.settings.os == "Android": - # nothing do to at the moment, this seems to just work - pass - return autotools_vars def _configure_autotools(self): @@ -453,6 +395,9 @@ def _configure_autotools(self): self._autotools.defines.append("_AMD64_") + if tools.cross_building(self) and tools.is_apple_os(self.settings.os): + self._autotools.defines.extend(['HAVE_SOCKET', 'HAVE_FCNTL_O_NONBLOCK']) + configure_args = self._get_configure_command_args() if self.settings.os == "iOS" and self.settings.arch == "x86_64": From d735c726dbb841194045e02b081429a166509a52 Mon Sep 17 00:00:00 2001 From: SSE4 Date: Sun, 7 Feb 2021 13:53:58 +0700 Subject: [PATCH 4/7] - use autoreconf instead of buildconf Signed-off-by: SSE4 --- 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 745c174056f42..8ea79037baf3c 100644 --- a/recipes/libcurl/all/conanfile.py +++ b/recipes/libcurl/all/conanfile.py @@ -347,7 +347,7 @@ def _patch_mingw_files(self): def _build_with_autotools(self): with tools.chdir(self._source_subfolder): # autoreconf - self.run("./buildconf", win_bash=tools.os_info.is_windows, run_environment=True) + self.run("autoreconf -fiv", win_bash=tools.os_info.is_windows, run_environment=True) # fix generated autotools files on alle to have relocateable binaries if tools.is_apple_os(self.settings.os): From 76eeab97b5cf1826b2047601d443bd191f0ac4a7 Mon Sep 17 00:00:00 2001 From: SSE4 Date: Sun, 7 Feb 2021 13:54:13 +0700 Subject: [PATCH 5/7] - use rootpath everywhere instead of lib_paths[0] Signed-off-by: SSE4 --- 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 8ea79037baf3c..a47a9c39d5302 100644 --- a/recipes/libcurl/all/conanfile.py +++ b/recipes/libcurl/all/conanfile.py @@ -249,7 +249,7 @@ def _get_configure_command_args(self): params.append("--without-wolfssl") if self.options.with_libssh2: - params.append("--with-libssh2={}".format(tools.unix_path(self.deps_cpp_info["libssh2"].lib_paths[0]))) + params.append("--with-libssh2={}".format(tools.unix_path(self.deps_cpp_info["libssh2"].rootpath))) else: params.append("--without-libssh2") @@ -259,7 +259,7 @@ def _get_configure_command_args(self): params.append("--without-nghttp2") if self.options.with_zlib: - params.append("--with-zlib={}".format(tools.unix_path(self.deps_cpp_info["zlib"].lib_paths[0]))) + params.append("--with-zlib={}".format(tools.unix_path(self.deps_cpp_info["zlib"].rootpath))) else: params.append("--without-zlib") From 00b1918caa8bb5de1634f588d7a0019df6853e25 Mon Sep 17 00:00:00 2001 From: SSE4 Date: Tue, 9 Feb 2021 03:43:11 -0800 Subject: [PATCH 6/7] Update recipes/libcurl/all/conanfile.py Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com> --- 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 a47a9c39d5302..d0f8d3f5b76f8 100644 --- a/recipes/libcurl/all/conanfile.py +++ b/recipes/libcurl/all/conanfile.py @@ -347,7 +347,7 @@ def _patch_mingw_files(self): def _build_with_autotools(self): with tools.chdir(self._source_subfolder): # autoreconf - self.run("autoreconf -fiv", win_bash=tools.os_info.is_windows, run_environment=True) + self.run("{} -fiv".format(tools.get_env("AUTORECONF")), win_bash=tools.os_info.is_windows, run_environment=True) # fix generated autotools files on alle to have relocateable binaries if tools.is_apple_os(self.settings.os): From 9442753c9fe1cf24c64319eeb1274f5b608ca255 Mon Sep 17 00:00:00 2001 From: SSE4 Date: Tue, 9 Feb 2021 20:50:52 -0800 Subject: [PATCH 7/7] Update recipes/libcurl/all/conanfile.py --- 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 d0f8d3f5b76f8..c98de4eadb34e 100644 --- a/recipes/libcurl/all/conanfile.py +++ b/recipes/libcurl/all/conanfile.py @@ -347,7 +347,7 @@ def _patch_mingw_files(self): def _build_with_autotools(self): with tools.chdir(self._source_subfolder): # autoreconf - self.run("{} -fiv".format(tools.get_env("AUTORECONF")), win_bash=tools.os_info.is_windows, run_environment=True) + self.run("{} -fiv".format(tools.get_env("AUTORECONF") or "autoreconf"), win_bash=tools.os_info.is_windows, run_environment=True) # fix generated autotools files on alle to have relocateable binaries if tools.is_apple_os(self.settings.os):