about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/cm/cmake/005-remove-systemconfiguration-dep.diff
blob: ffd3077d301e69d961c234e309ad55ca4ee9e9e8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
diff -Naur cmake-3.27.7/Utilities/cmcurl/CMakeLists.txt cmake-3.27.7-new/Utilities/cmcurl/CMakeLists.txt
--- cmake-3.27.7/Utilities/cmcurl/CMakeLists.txt	2023-10-06 10:08:35.000000000 -0300
+++ cmake-3.27.7-new/Utilities/cmcurl/CMakeLists.txt	2023-10-22 21:51:09.231609901 -0300
@@ -414,13 +414,6 @@
 
   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()
 
diff -Naur cmake-3.27.7/Utilities/cmcurl/lib/curl_setup.h cmake-3.27.7-new/Utilities/cmcurl/lib/curl_setup.h
--- cmake-3.27.7/Utilities/cmcurl/lib/curl_setup.h	2023-10-06 10:08:35.000000000 -0300
+++ cmake-3.27.7-new/Utilities/cmcurl/lib/curl_setup.h	2023-10-22 21:52:00.214748294 -0300
@@ -260,11 +260,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
diff -Naur cmake-3.27.7/Utilities/cmcurl/lib/hostip.c cmake-3.27.7-new/Utilities/cmcurl/lib/hostip.c
--- cmake-3.27.7/Utilities/cmcurl/lib/hostip.c	2023-10-06 10:08:35.000000000 -0300
+++ cmake-3.27.7-new/Utilities/cmcurl/lib/hostip.c	2023-10-22 21:53:29.249989934 -0300
@@ -67,10 +67,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) &&                           \
@@ -743,23 +739,6 @@
         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)