diff options
author | koobs <koobs@FreeBSD.org> | 2013-09-08 22:05:18 +0800 |
---|---|---|
committer | koobs <koobs@FreeBSD.org> | 2013-09-08 22:05:18 +0800 |
commit | 3835cd8c9b3bdc5ee612ea55989ddbabfe1fef61 (patch) | |
tree | 6d7fe992f675eda5ec64a27474e0fe9678c0334d /lang/python27 | |
parent | e0446068231b513e183e383ab20bfa34e009f152 (diff) | |
download | freebsd-ports-gnome-3835cd8c9b3bdc5ee612ea55989ddbabfe1fef61.tar.gz freebsd-ports-gnome-3835cd8c9b3bdc5ee612ea55989ddbabfe1fef61.tar.zst freebsd-ports-gnome-3835cd8c9b3bdc5ee612ea55989ddbabfe1fef61.zip |
Resolve gettext (libintl) detection and linking in all Python ports
Fix gettext (NLS) detection, includes and linking:
- all: Use LDFLAGS and CPPFLAGS over CFLAGS for NLS option (with comment)
- python26,27: Pass LIBS="-lintl" to CONFIGURE_ENV
Workaround Pythons odd build mechanics causing duplicate args:
- all: Remove CFLAGS from OPT= in CONFIGURE_ENV
- python32,33: Remove CONFIGURE_* variables from Makefile.pre.in
Other:
- python32: Patch setup.py to pass OPT correctly to shared modules
PR: ports/181721
Reported by: pawel
Reviewed by: bapt mva sbz
Diffstat (limited to 'lang/python27')
-rw-r--r-- | lang/python27/Makefile | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lang/python27/Makefile b/lang/python27/Makefile index 1f1a9d07b5e3..f9b02ea4a6a4 100644 --- a/lang/python27/Makefile +++ b/lang/python27/Makefile @@ -3,7 +3,7 @@ PORTNAME= python27 PORTVERSION= 2.7.5 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= lang python ipv6 MASTER_SITES= PYTHON MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR} @@ -52,7 +52,7 @@ BINLINKS_SUB_PYTHON_VER= ${BINLINKS_SUB_TMPL:S/%%VERSION%%/${PYTHON_VER}/g} OPTIONS_DEFINE= THREADS SEM PTH PYMALLOC IPV6 FPECTL EXAMPLES NLS OPTIONS_DEFAULT= THREADS UCS4 PYMALLOC IPV6 -OPTIONS_SINGLE= UCS +OPTIONS_SINGLE= UCS OPTIONS_SINGLE_UCS= UCS2 UCS4 NLS_DESC= Enable Gettext support for the locale module @@ -61,9 +61,12 @@ NLS_DESC= Enable Gettext support for the locale module .if ${PORT_OPTIONS:MNLS} USES+= gettext -# XXX do not set any LDFLAGS or CFLAGS - this causes pyexpat to fail building -#LDFLAGS+= "-L${LOCALBASE}/lib" -#CFLAGS+= "-I${LOCALBASE}/include" +LDFLAGS+= -L${LOCALBASE}/lib +# We use CPPFLAGS over CFLAGS here due to -I ordering causing things like +# elementtree and pyexpat to break with python27, or to silence preprocessor +# complaints with python33 +CPPFLAGS+= -I${LOCALBASE}/include +CONFIGURE_ENV+= LIBS="-lintl" .else CONFIGURE_ENV+= ac_cv_lib_intl_textdomain=no ac_cv_header_libintl_h=no .endif @@ -147,7 +150,7 @@ CONFIGURE_ARGS+= --disable-ipv6 CONFIGURE_ARGS+= --with-fpectl .endif -CONFIGURE_ENV+= OPT="${CFLAGS} ${_PTH_CPPFLAGS}" +CONFIGURE_ENV+= OPT="${_PTH_CPPFLAGS}" post-extract: # The distribution tarball for python 2.7 has permission bits for 'others' |