Skip to content

Commit b348a61

Browse files
committed
Apply the app store compliance patch to the installed product, not the source.
1 parent 2bac2b8 commit b348a61

File tree

3 files changed

+12
-20
lines changed

3 files changed

+12
-20
lines changed

Makefile.pre.in

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ list-targets:
695695
@grep -E '^[A-Za-z][-A-Za-z0-9]+:' Makefile | awk -F : '{print $$1}'
696696

697697
.PHONY: build_all
698-
build_all: check-clean-src @APP_STORE_COMPLIANCE_PATCH_TARGET@ $(BUILDPYTHON) platform sharedmods \
698+
build_all: check-clean-src $(BUILDPYTHON) platform sharedmods \
699699
gdbhooks Programs/_testembed scripts checksharedmods rundsymutil
700700

701701
.PHONY: build_wasm
@@ -936,12 +936,9 @@ $(BUILDPYTHON)-gdb.py: $(SRC_GDB_HOOKS)
936936
# known modifications to the source tree before building. The patch will be
937937
# applied in a dry-run mode (validating, but not applying the patch) on builds
938938
# that *have* a compliance patch, but where compliance has not been enabled.
939-
build/app-store-compliant:
940-
patch @APP_STORE_COMPLIANCE_PATCH_FLAGS@ --forward --strip=1 --directory="$(srcdir)" --input "$(APP_STORE_COMPLIANCE_PATCH)"
941-
@if test "@APP_STORE_COMPLIANCE_PATCH_FLAGS@" == ""; then \
942-
mkdir -p build ; \
943-
echo "$(APP_STORE_COMPLIANCE_PATCH)" > build/app-store-compliant ; \
944-
fi
939+
.PHONY: app-store-compliant
940+
app-store-compliant: libinstall
941+
patch @APP_STORE_COMPLIANCE_PATCH_FLAGS@ --forward --strip=2 --directory="$(LIBDEST)" --input "$(abs_srcdir)/$(APP_STORE_COMPLIANCE_PATCH)"
945942

946943
# This rule is here for OPENSTEP/Rhapsody/MacOSX. It builds a temporary
947944
# minimal framework (not including the Lib directory and such) in the current

configure

Lines changed: 4 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -710,17 +710,17 @@ AC_ARG_WITH(
710710
Darwin|iOS)
711711
# iOS is able to share the macOS patch
712712
APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch"
713-
APP_STORE_COMPLIANCE_PATCH_TARGET="build/app-store-compliant"
714713
APP_STORE_COMPLIANCE_PATCH_FLAGS=
714+
INSTALLTARGETS="$INSTALLTARGETS app-store-compliant"
715715
;;
716716
*) AC_MSG_ERROR([no default app store compliance patch available for $ac_sys_system]) ;;
717717
esac
718718
AC_MSG_RESULT([applying default app store compliance patch])
719719
;;
720720
*)
721721
APP_STORE_COMPLIANCE_PATCH="${withval}"
722-
APP_STORE_COMPLIANCE_PATCH_TARGET="build/app-store-compliant"
723722
APP_STORE_COMPLIANCE_PATCH_FLAGS=
723+
INSTALLTARGETS="$INSTALLTARGETS app-store-compliant"
724724
AC_MSG_RESULT([applying custom app store compliance patch])
725725
;;
726726
esac
@@ -729,28 +729,26 @@ AC_ARG_WITH(
729729
iOS)
730730
# Always apply the compliance patch on iOS; we can use the macOS patch
731731
APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch"
732-
APP_STORE_COMPLIANCE_PATCH_TARGET="build/app-store-compliant"
733732
APP_STORE_COMPLIANCE_PATCH_FLAGS=
733+
INSTALLTARGETS="$INSTALLTARGETS app-store-compliant"
734734
AC_MSG_RESULT([applying default app store compliance patch])
735735
;;
736736
Darwin)
737737
# Always *check* the compliance patch on macOS
738738
APP_STORE_COMPLIANCE_PATCH="Mac/Resources/app-store-compliance.patch"
739-
APP_STORE_COMPLIANCE_PATCH_TARGET="build/app-store-compliant"
740739
APP_STORE_COMPLIANCE_PATCH_FLAGS="--dry-run"
740+
INSTALLTARGETS="$INSTALLTARGETS app-store-compliant"
741741
AC_MSG_RESULT([checking (not applying) default app store compliance patch])
742742
;;
743743
*)
744744
# No app compliance patching on any other platform
745745
APP_STORE_COMPLIANCE_PATCH=
746-
APP_STORE_COMPLIANCE_PATCH_TARGET=
747746
APP_STORE_COMPLIANCE_PATCH_FLAGS=
748747
AC_MSG_RESULT([not patching for app store compliance])
749748
;;
750749
esac
751750
])
752751
AC_SUBST([APP_STORE_COMPLIANCE_PATCH])
753-
AC_SUBST([APP_STORE_COMPLIANCE_PATCH_TARGET])
754752
AC_SUBST([APP_STORE_COMPLIANCE_PATCH_FLAGS])
755753

756754
AC_SUBST([_PYTHON_HOST_PLATFORM])

0 commit comments

Comments
 (0)