nixpkgs/pkgs/development/tools/build-managers/cmake/005-remove-systemconfiguration-dep.diff
R. Ryantm 54a65b5cd5
cmake: Fix darwin-specific remove-systemconfiguration-dep patch
Unbreaks cmakeMinimal on darwin.

Co-authored-by: Ryan Burns <rtburns@protonmail.com>
2022-06-27 23:54:11 +08:00

67 lines
2.2 KiB
Diff

--- a/Utilities/cmcurl/CMakeLists.txt
+++ b/Utilities/cmcurl/CMakeLists.txt
@@ -391,13 +391,6 @@ if(ENABLE_IPV6 AND NOT WIN32)
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT ENABLE_ARES)
set(use_core_foundation ON)
-
- find_library(SYSTEMCONFIGURATION_FRAMEWORK "SystemConfiguration")
- if(NOT SYSTEMCONFIGURATION_FRAMEWORK)
- message(FATAL_ERROR "SystemConfiguration framework not found")
- endif()
-
- list(APPEND CURL_LIBS "-framework SystemConfiguration")
endif()
endif()
--- a/Utilities/cmcurl/lib/curl_setup.h
+++ b/Utilities/cmcurl/lib/curl_setup.h
@@ -257,11 +257,7 @@
* performing this task will result in a synthesized IPv6 address.
*/
#if defined(__APPLE__) && !defined(USE_ARES)
-#include <TargetConditionals.h>
#define USE_RESOLVE_ON_IPS 1
-# if defined(TARGET_OS_OSX) && TARGET_OS_OSX
-# define CURL_OSX_CALL_COPYPROXIES 1
-# endif
#endif
#ifdef USE_LWIPSOCK
--- a/Utilities/cmcurl/lib/hostip.c
+++ b/Utilities/cmcurl/lib/hostip.c
@@ -68,10 +68,6 @@
#include "curl_memory.h"
#include "memdebug.h"
-#if defined(ENABLE_IPV6) && defined(CURL_OSX_CALL_COPYPROXIES)
-#include <SystemConfiguration/SCDynamicStoreCopySpecific.h>
-#endif
-
#if defined(CURLRES_SYNCH) && \
defined(HAVE_ALARM) && defined(SIGALRM) && defined(HAVE_SIGSETJMP)
/* alarm-based timeouts can only be used with all the dependencies satisfied */
@@ -661,23 +657,6 @@ enum resolve_t Curl_resolv(struct Curl_easy *data,
return CURLRESOLV_ERROR;
}
-#if defined(ENABLE_IPV6) && defined(CURL_OSX_CALL_COPYPROXIES)
- {
- /*
- * The automagic conversion from IPv4 literals to IPv6 literals only
- * works if the SCDynamicStoreCopyProxies system function gets called
- * first. As Curl currently doesn't support system-wide HTTP proxies, we
- * therefore don't use any value this function might return.
- *
- * This function is only available on a macOS and is not needed for
- * IPv4-only builds, hence the conditions above.
- */
- CFDictionaryRef dict = SCDynamicStoreCopyProxies(NULL);
- if(dict)
- CFRelease(dict);
- }
-#endif
-
#ifndef USE_RESOLVE_ON_IPS
/* First check if this is an IPv4 address string */
if(Curl_inet_pton(AF_INET, hostname, &in) > 0)