dash/depends/packages
fanquake f670118cce
Merge bitcoin/bitcoin#28851: build: Patch Qt to handle minimum macOS version properly
05aca093819be276ac7d648472c6ed5c7d235cc5 build: Patch Qt to handle minimum macOS version properly (Hennadii Stepanov)

Pull request description:

  This PR is:
  - required to [switch](https://github.com/bitcoin/bitcoin/pull/28622) to macOS 14 SDK (Xcode 15).
  - an alternative to https://github.com/bitcoin/bitcoin/pull/28732 and https://github.com/bitcoin/bitcoin/pull/28775.

  Qt relies on the `__MAC_OS_X_VERSION_MIN_REQUIRED` macro, which is set in the `AvailabilityInternal.h` SDK header to
  the value provided by the Clang driver from the `-mmacos-version-min` / `-mmacosx-version-min` option.

  Xcode 12 SDK expects the OS-specific `__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__` macro:
  ```c++
  #ifndef __MAC_OS_X_VERSION_MIN_REQUIRED
      #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
          /* compiler for Mac OS X sets __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ */
          #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
      #endif
  #endif /* __MAC_OS_X_VERSION_MIN_REQUIRED*/
  ```

  In the other hand, Xcode 15 SDK expects a general `__ENVIRONMENT_OS_VERSION_MIN_REQUIRED__` macro:
  ```c++
  #ifndef __MAC_OS_X_VERSION_MIN_REQUIRED
      #if defined(__has_builtin) && __has_builtin(__is_target_os)
          #if __is_target_os(macos)
              #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__
              #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_14_0
          #endif
      #elif  __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
          #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
          #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_14_0
      #endif /*  __has_builtin(__is_target_os) && __is_target_os(macos) */
  #endif /* __MAC_OS_X_VERSION_MIN_REQUIRED */
  ```

  The latter macro is not provided by LLVM Clang until c8e2dd8c6f, which is available in Clang 17.

  The suggested patch makes Qt "borrow" the `__MAC_OS_X_VERSION_MIN_REQUIRED` value from `MAC_OS_X_VERSION_MIN_REQUIRED`, which is set in the `AvailabilityMacros.h` SDK header.

ACKs for top commit:
  maflcko:
    lgtm ACK 05aca093819be276ac7d648472c6ed5c7d235cc5

Tree-SHA512: 8891aefde4b8a48885abf0648f4ec71a22f7fcfca1e17ebb8c70ce1ef44751ea5db6b8b652de6ee8a716ca5f96f720fef01600bc23986162d0146c946e2e8743
2024-10-24 13:50:33 -05:00
..
backtrace.mk fix: bump version of libbacktrace library 2024-05-29 12:26:11 +07:00
bdb.mk Merge bitcoin/bitcoin#29488: depends: always configure with --with-pic 2024-09-26 22:38:53 -05:00
boost.mk merge bitcoin#30217: Update Boost download link 2024-08-13 22:53:52 +07:00
capnp.mk Merge bitcoin/bitcoin#29706: depends: set two CMake options globally 2024-10-04 12:54:24 -05:00
expat.mk Merge bitcoin/bitcoin#29488: depends: always configure with --with-pic 2024-09-26 22:38:53 -05:00
fontconfig.mk Merge bitcoin/bitcoin#22783: build: Cleanup depends build system 2022-06-27 11:37:03 -05:00
freetype.mk Merge bitcoin/bitcoin#29488: depends: always configure with --with-pic 2024-09-26 22:38:53 -05:00
gmp.mk build: set -march irrespective of target operating system 2024-10-08 14:52:16 +00:00
libevent.mk Merge bitcoin/bitcoin#30743: depends: build libevent with -D_GNU_SOURCE 2024-10-01 22:54:14 -05:00
libmultiprocess.mk Merge bitcoin/bitcoin#29706: depends: set two CMake options globally 2024-10-04 12:54:24 -05:00
libnatpmp.mk merge bitcoin#21209: use newer source for libnatpmp 2022-02-26 17:49:13 +05:30
libXau.mk Merge bitcoin/bitcoin#29488: depends: always configure with --with-pic 2024-09-26 22:38:53 -05:00
libxcb_util_image.mk merge bitcoin#23489: Qt 5.15.2 2023-08-08 06:05:02 -05:00
libxcb_util_keysyms.mk merge bitcoin#23489: Qt 5.15.2 2023-08-08 06:05:02 -05:00
libxcb_util_render.mk merge bitcoin#23489: Qt 5.15.2 2023-08-08 06:05:02 -05:00
libxcb_util_wm.mk merge bitcoin#23489: Qt 5.15.2 2023-08-08 06:05:02 -05:00
libxcb_util.mk Merge bitcoin/bitcoin#29488: depends: always configure with --with-pic 2024-09-26 22:38:53 -05:00
libxcb.mk Merge bitcoin/bitcoin#25738: depends: use a patch instead of sed in libxcb 2024-06-08 20:59:36 -05:00
libxkbcommon.mk Merge bitcoin/bitcoin#25436: build: GCC-12 build improvements 2022-11-02 10:24:45 -05:00
miniupnpc.mk merge bitcoin#25964: fix mingw miniupnpc cflags 2023-01-18 19:02:39 -06:00
native_capnp.mk Merge bitcoin/bitcoin#28856: depends: Build the native_capnp and capnp packages with CMake 2024-10-04 12:54:23 -05:00
native_cctools.mk merge bitcoin#25633: don't restrict --enable-lto to non-guix cctools 2023-06-29 12:31:03 -05:00
native_clang.mk merge bitcoin#25633: don't restrict --enable-lto to non-guix cctools 2023-06-29 12:31:03 -05:00
native_ds_store.mk Merge bitcoin/bitcoin#25605: depends: update urls for dmg tools 2024-02-28 13:16:40 -06:00
native_libdmg-hfsplus.mk Merge #19685: depends: CMake invocation cleanup 2024-01-16 09:34:27 -06:00
native_libmultiprocess.mk Merge bitcoin/bitcoin#30513: depends: Bump libmultiprocess for CMake fixes 2024-10-03 01:16:41 -05:00
native_libtapi.mk merge bitcoin#25633: don't restrict --enable-lto to non-guix cctools 2023-06-29 12:31:03 -05:00
native_mac_alias.mk Merge bitcoin/bitcoin#25605: depends: update urls for dmg tools 2024-02-28 13:16:40 -06:00
packages.mk merge bitcoin#23724: add systemtap's sys/sdt.h as depends for GUIX builds with USDT tracepoints 2024-09-04 18:46:13 +00:00
qrencode.mk Merge bitcoin/bitcoin#29725: depends: build libqrencode with CMake 2024-09-29 10:54:41 +03:00
qt.mk Merge bitcoin/bitcoin#28851: build: Patch Qt to handle minimum macOS version properly 2024-10-24 13:50:33 -05:00
sqlite.mk Merge bitcoin/bitcoin#29488: depends: always configure with --with-pic 2024-09-26 22:38:53 -05:00
systemtap.mk merge bitcoin#26945: systemtap 4.8 2024-09-04 18:46:14 +00:00
xcb_proto.mk Merge bitcoin/bitcoin#28097: depends: xcb-proto 1.15.2 2024-05-07 12:34:22 -05:00
xproto.mk merge bitcoin#23489: Qt 5.15.2 2023-08-08 06:05:02 -05:00
zeromq.mk fix mingw32 build 2024-09-28 10:48:43 +03:00