From owner-svn-ports-head@freebsd.org Thu Mar 1 13:47:12 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 508BCF2BACD; Thu, 1 Mar 2018 13:47:12 +0000 (UTC) (envelope-from koobs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 416DF86587; Thu, 1 Mar 2018 13:47:11 +0000 (UTC) (envelope-from koobs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F6B61685; Thu, 1 Mar 2018 13:47:11 +0000 (UTC) (envelope-from koobs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w21DlBv7076922; Thu, 1 Mar 2018 13:47:11 GMT (envelope-from koobs@FreeBSD.org) Received: (from koobs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w21DlBer076921; Thu, 1 Mar 2018 13:47:11 GMT (envelope-from koobs@FreeBSD.org) Message-Id: <201803011347.w21DlBer076921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: koobs set sender to koobs@FreeBSD.org using -f From: Kubilay Kocak Date: Thu, 1 Mar 2018 13:47:10 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r463321 - head/lang/python27 X-SVN-Group: ports-head X-SVN-Commit-Author: koobs X-SVN-Commit-Paths: head/lang/python27 X-SVN-Commit-Revision: 463321 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Mar 2018 13:47:12 -0000 Author: koobs Date: Thu Mar 1 13:47:10 2018 New Revision: 463321 URL: https://svnweb.freebsd.org/changeset/ports/463321 Log: lang/python27: Fix build regression r462630 added OpenSSL include/library paths to CFLAGS/LIBS which caused the _elementtree and pyexpat modules to fail to build. Adding paths to CFLAGS is known to cause issues [1]. Accordingly: - Switch to using CPPFLAGS for OpenSSL include/library paths (like NLS). - Move the comment describing why this is necessary to the top of the port with reasonable warning about what can happen and why. [1] https://svnweb.freebsd.org/ports?view=revision&revision=326729 PR: 226135, 222795) Reported by: many Reviewed by: sunpoet (python) Approved by: koobs (python) Modified: head/lang/python27/Makefile Modified: head/lang/python27/Makefile ============================================================================== --- head/lang/python27/Makefile Thu Mar 1 13:36:09 2018 (r463320) +++ head/lang/python27/Makefile Thu Mar 1 13:47:10 2018 (r463321) @@ -14,12 +14,21 @@ COMMENT= Interpreted object-oriented programming langu LICENSE= PSFL +# lang/python* ports use CPPFLAGS over CFLAGS due to multiple complex +# *FLAGS and include ordering bugs/issues in the Python build, that cause +# modules such as elementtree and pyexpat to fail to build, among other +# difficult to isolate issues. Do not add to or modify global variables +# unless the implications and pitfalls are completely understood. +# See: https://bugs.python.org/issue6299#msg210189 + USES= cpe ncurses pathfix pkgconfig readline:port shebangfix ssl tar:xz PATHFIX_MAKEFILEIN= Makefile.pre.in USE_LDCONFIG= yes -CFLAGS+= -I${OPENSSLINC} GNU_CONFIGURE= yes -LIBS+= -L${OPENSSLLIB} + +CPPFLAGS+= -I${OPENSSLINC} +LDFLAGS+= -L${OPENSSLLIB} + python_CMD= ${PREFIX}/bin/python${PYTHON_PORTVERSION:R} SHEBANG_FILES= Lib/lib2to3/pgen2/*.py Lib/lib2to3/tests/*.py Lib/lib2to3/tests/data/*.py \ Lib/idlelib/*.py Lib/encodings/*.py Lib/test/*.py Lib/UserString.py \ @@ -60,9 +69,6 @@ IPV6_CONFIGURE_ENABLE= ipv6 LIBFFI_CONFIGURE_ON= --with-system-ffi LIBFFI_LIB_DEPENDS= libffi.so:devel/libffi -# Use CPPFLAGS over CFLAGS due to -I ordering, causing elementtree and pyexpat -# to break in Python 2.7, or preprocessor complaints in Python >= 3.3 -# Upstream Issue: https://bugs.python.org/issue6299 NLS_USES= gettext NLS_CPPFLAGS= -I${LOCALBASE}/include NLS_LIBS= -L${LOCALBASE}/lib -lintl