diff --git a/Makefile.pre.in b/Makefile.pre.in index d380c422714a32..48dac1e21f0f81 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -695,7 +695,7 @@ list-targets: @grep -E '^[A-Za-z][-A-Za-z0-9]+:' Makefile | awk -F : '{print $$1}' .PHONY: build_all -build_all: check-clean-src @APP_STORE_COMPLIANCE_PATCH_TARGET@ $(BUILDPYTHON) platform sharedmods \ +build_all: check-clean-src $(BUILDPYTHON) platform sharedmods \ gdbhooks Programs/_testembed scripts checksharedmods rundsymutil .PHONY: build_wasm @@ -936,12 +936,9 @@ $(BUILDPYTHON)-gdb.py: $(SRC_GDB_HOOKS) # known modifications to the source tree before building. The patch will be # applied in a dry-run mode (validating, but not applying the patch) on builds # that *have* a compliance patch, but where compliance has not been enabled. -build/app-store-compliant: - patch @APP_STORE_COMPLIANCE_PATCH_FLAGS@ --forward --strip=1 --directory="$(srcdir)" --input "$(APP_STORE_COMPLIANCE_PATCH)" - @if test "@APP_STORE_COMPLIANCE_PATCH_FLAGS@" == ""; then \ - mkdir -p build ; \ - echo "$(APP_STORE_COMPLIANCE_PATCH)" > build/app-store-compliant ; \ - fi +.PHONY: app-store-compliant +app-store-compliant: libinstall + patch @APP_STORE_COMPLIANCE_PATCH_FLAGS@ --forward --strip=2 --directory="$(LIBDEST)" --input "$(abs_srcdir)/$(APP_STORE_COMPLIANCE_PATCH)" # This rule is here for OPENSTEP/Rhapsody/MacOSX. It builds a temporary # minimal framework (not including the Lib directory and such) in the current diff --git a/Misc/NEWS.d/next/Build/2024-07-16-11-18-43.gh-issue-120522.exdb3D.rst b/Misc/NEWS.d/next/Build/2024-07-16-11-18-43.gh-issue-120522.exdb3D.rst new file mode 100644 index 00000000000000..03af065b63cbde --- /dev/null +++ b/Misc/NEWS.d/next/Build/2024-07-16-11-18-43.gh-issue-120522.exdb3D.rst @@ -0,0 +1,2 @@ +The app store compliance patch is now applied to the installed products, +rather than to the original source tree. diff --git a/configure b/configure index 19786f18e61726..50c2538965bf04 100755 --- a/configure +++ b/configure @@ -981,7 +981,6 @@ EXPORT_MACOSX_DEPLOYMENT_TARGET CONFIGURE_MACOSX_DEPLOYMENT_TARGET _PYTHON_HOST_PLATFORM APP_STORE_COMPLIANCE_PATCH_FLAGS -APP_STORE_COMPLIANCE_PATCH_TARGET APP_STORE_COMPLIANCE_PATCH INSTALLTARGETS FRAMEWORKINSTALLAPPSPREFIX @@ -4450,8 +4449,8 @@ then : Darwin|iOS) # iOS is able to share the macOS patch APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" - APP_STORE_COMPLIANCE_PATCH_TARGET="build/app-store-compliant" APP_STORE_COMPLIANCE_PATCH_FLAGS= + INSTALLTARGETS="$INSTALLTARGETS app-store-compliant" ;; *) as_fn_error $? "no default app store compliance patch available for $ac_sys_system" "$LINENO" 5 ;; esac @@ -4460,8 +4459,8 @@ printf "%s\n" "applying default app store compliance patch" >&6; } ;; *) APP_STORE_COMPLIANCE_PATCH="${withval}" - APP_STORE_COMPLIANCE_PATCH_TARGET="build/app-store-compliant" APP_STORE_COMPLIANCE_PATCH_FLAGS= + INSTALLTARGETS="$INSTALLTARGETS app-store-compliant" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: applying custom app store compliance patch" >&5 printf "%s\n" "applying custom app store compliance patch" >&6; } ;; @@ -4473,23 +4472,22 @@ else $as_nop iOS) # Always apply the compliance patch on iOS; we can use the macOS patch APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" - APP_STORE_COMPLIANCE_PATCH_TARGET="build/app-store-compliant" APP_STORE_COMPLIANCE_PATCH_FLAGS= + INSTALLTARGETS="$INSTALLTARGETS app-store-compliant" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: applying default app store compliance patch" >&5 printf "%s\n" "applying default app store compliance patch" >&6; } ;; Darwin) # Always *check* the compliance patch on macOS APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" - APP_STORE_COMPLIANCE_PATCH_TARGET="build/app-store-compliant" APP_STORE_COMPLIANCE_PATCH_FLAGS="--dry-run" + INSTALLTARGETS="$INSTALLTARGETS app-store-compliant" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: checking (not applying) default app store compliance patch" >&5 printf "%s\n" "checking (not applying) default app store compliance patch" >&6; } ;; *) # No app compliance patching on any other platform APP_STORE_COMPLIANCE_PATCH= - APP_STORE_COMPLIANCE_PATCH_TARGET= APP_STORE_COMPLIANCE_PATCH_FLAGS= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not patching for app store compliance" >&5 printf "%s\n" "not patching for app store compliance" >&6; } @@ -4502,7 +4500,6 @@ fi - if test "$cross_compiling" = yes; then case "$host" in *-*-linux*) diff --git a/configure.ac b/configure.ac index df146cc9cf0b75..4bb8ef4d17bd2f 100644 --- a/configure.ac +++ b/configure.ac @@ -710,8 +710,8 @@ AC_ARG_WITH( Darwin|iOS) # iOS is able to share the macOS patch APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" - APP_STORE_COMPLIANCE_PATCH_TARGET="build/app-store-compliant" APP_STORE_COMPLIANCE_PATCH_FLAGS= + INSTALLTARGETS="$INSTALLTARGETS app-store-compliant" ;; *) AC_MSG_ERROR([no default app store compliance patch available for $ac_sys_system]) ;; esac @@ -719,8 +719,8 @@ AC_ARG_WITH( ;; *) APP_STORE_COMPLIANCE_PATCH="${withval}" - APP_STORE_COMPLIANCE_PATCH_TARGET="build/app-store-compliant" APP_STORE_COMPLIANCE_PATCH_FLAGS= + INSTALLTARGETS="$INSTALLTARGETS app-store-compliant" AC_MSG_RESULT([applying custom app store compliance patch]) ;; esac @@ -729,28 +729,26 @@ AC_ARG_WITH( iOS) # Always apply the compliance patch on iOS; we can use the macOS patch APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" - APP_STORE_COMPLIANCE_PATCH_TARGET="build/app-store-compliant" APP_STORE_COMPLIANCE_PATCH_FLAGS= + INSTALLTARGETS="$INSTALLTARGETS app-store-compliant" AC_MSG_RESULT([applying default app store compliance patch]) ;; Darwin) # Always *check* the compliance patch on macOS APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch" - APP_STORE_COMPLIANCE_PATCH_TARGET="build/app-store-compliant" APP_STORE_COMPLIANCE_PATCH_FLAGS="--dry-run" + INSTALLTARGETS="$INSTALLTARGETS app-store-compliant" AC_MSG_RESULT([checking (not applying) default app store compliance patch]) ;; *) # No app compliance patching on any other platform APP_STORE_COMPLIANCE_PATCH= - APP_STORE_COMPLIANCE_PATCH_TARGET= APP_STORE_COMPLIANCE_PATCH_FLAGS= AC_MSG_RESULT([not patching for app store compliance]) ;; esac ]) AC_SUBST([APP_STORE_COMPLIANCE_PATCH]) -AC_SUBST([APP_STORE_COMPLIANCE_PATCH_TARGET]) AC_SUBST([APP_STORE_COMPLIANCE_PATCH_FLAGS]) AC_SUBST([_PYTHON_HOST_PLATFORM])