Commit 6bef0966 authored by Dimitry Andric's avatar Dimitry Andric
Browse files

lang/python3([6-9]|10): disable detection of multiarch

It breaks with clang >= 13, which adds a major.minor version number in
-print-multiarch output, and the dot confuses Python:

ModuleNotFoundError: No module named '_sysconfigdata__freebsd14_x86_64-unknown-freebsd14'

Since we do not support multiarch, and the configure script has no way
to disable the multiarch check, stub it out during post-patch.

PR:		258377
Approved by:	maintainer timeout (2 weeks)
MFH:		2021Q3
parent 0e6da3c2
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -124,6 +124,10 @@ post-patch:
# which introduces hidden dependency and breaks build
	@${REINPLACE_CMD} -e 's|uuid/uuid.h|ignore_&|' ${WRKSRC}/configure
	@${REINPLACE_CMD} -e '/find_library_file/ s|uuid|ignore_&|' ${WRKSRC}/setup.py
# disable detection of multiarch as it breaks with clang >= 13, which adds a
# major.minor version number in -print-multiarch output, confusing Python
	@${REINPLACE_CMD} -e 's|^MULTIARCH=.*|MULTIARCH=|' ${WRKSRC}/configure \
		${WRKSRC}/configure.ac
# Apply DISABLED_EXTENSIONS
	@${ECHO_CMD} '*disabled*' > ${WRKSRC}/Modules/Setup.local
.  for _module in ${DISABLED_EXTENSIONS}
+6 −0
Original line number Diff line number Diff line
@@ -124,6 +124,12 @@ DISABLED_EXTENSIONS+= nis
PLIST_SUB+=	NO_NIS=""
.endif

post-patch:
# disable detection of multiarch as it breaks with clang >= 13, which adds a
# major.minor version number in -print-multiarch output, confusing Python
	@${REINPLACE_CMD} -e 's|^MULTIARCH=.*|MULTIARCH=|' ${WRKSRC}/configure \
		${WRKSRC}/configure.ac

post-install:
.if ! ${PORT_OPTIONS:MDEBUG}
	${RM} ${STAGEDIR}${PREFIX}/lib/libpython3.so						# Upstream Issue: https://bugs.python.org/issue17975
+4 −0
Original line number Diff line number Diff line
@@ -111,6 +111,10 @@ post-patch:
# which introduces hidden dependency and breaks build
	@${REINPLACE_CMD} -e 's|uuid/uuid.h|ignore_&|' ${WRKSRC}/configure
	@${REINPLACE_CMD} -e '/find_library_file/ s|uuid|ignore_&|' ${WRKSRC}/setup.py
# disable detection of multiarch as it breaks with clang >= 13, which adds a
# major.minor version number in -print-multiarch output, confusing Python
	@${REINPLACE_CMD} -e 's|^MULTIARCH=.*|MULTIARCH=|' ${WRKSRC}/configure \
		${WRKSRC}/configure.ac
# Apply DISABLED_EXTENSIONS
	@${ECHO_CMD} '*disabled*' > ${WRKSRC}/Modules/Setup.local
.  for _module in ${DISABLED_EXTENSIONS}
+4 −0
Original line number Diff line number Diff line
@@ -115,6 +115,10 @@ post-patch:
# which introduces hidden dependency and breaks build
	@${REINPLACE_CMD} -e 's|uuid/uuid.h|ignore_&|' ${WRKSRC}/configure
	@${REINPLACE_CMD} -e '/find_library_file/ s|uuid|ignore_&|' ${WRKSRC}/setup.py
# disable detection of multiarch as it breaks with clang >= 13, which adds a
# major.minor version number in -print-multiarch output, confusing Python
	@${REINPLACE_CMD} -e 's|^MULTIARCH=.*|MULTIARCH=|' ${WRKSRC}/configure \
		${WRKSRC}/configure.ac
# Apply DISABLED_EXTENSIONS
	@${ECHO_CMD} '*disabled*' > ${WRKSRC}/Modules/Setup.local
.  for _module in ${DISABLED_EXTENSIONS}
+4 −0
Original line number Diff line number Diff line
@@ -116,6 +116,10 @@ post-patch:
# which introduces hidden dependency and breaks build
	@${REINPLACE_CMD} -e 's|uuid/uuid.h|ignore_&|' ${WRKSRC}/configure
	@${REINPLACE_CMD} -e '/find_library_file/ s|uuid|ignore_&|' ${WRKSRC}/setup.py
# disable detection of multiarch as it breaks with clang >= 13, which adds a
# major.minor version number in -print-multiarch output, confusing Python
	@${REINPLACE_CMD} -e 's|^MULTIARCH=.*|MULTIARCH=|' ${WRKSRC}/configure \
		${WRKSRC}/configure.ac
# Apply DISABLED_EXTENSIONS
	@${ECHO_CMD} '*disabled*' > ${WRKSRC}/Modules/Setup.local
.  for _module in ${DISABLED_EXTENSIONS}