diff options
Diffstat (limited to 'lang/python27')
-rw-r--r-- | lang/python27/Makefile | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lang/python27/Makefile b/lang/python27/Makefile index a97b9c6f3747..e238473c950b 100644 --- a/lang/python27/Makefile +++ b/lang/python27/Makefile @@ -14,12 +14,21 @@ COMMENT= Interpreted object-oriented programming language 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 |