- Fix gettext detection for the locale module

- Explicitly enable/disable gettext support via a new NLS OPTION switch.

PR:		ports/168684 ports/136917
On behalf of:	python@
This commit is contained in:
Marcus von Appen 2012-06-19 17:48:42 +00:00
parent 83bc131ec1
commit b89f9ab26f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=299648
6 changed files with 62 additions and 4 deletions

View file

@ -47,6 +47,7 @@ BINLINKS_SUB= -e 's,smtpd,smtpd${PYTHON_VER},' \
OPTIONS= THREADS "Enable thread support" on \ OPTIONS= THREADS "Enable thread support" on \
UCS4 "Use UCS4 for unicode support" on \ UCS4 "Use UCS4 for unicode support" on \
NLS "Enable Gettext support for the locale module" on \
PYMALLOC "Use python's internal malloc" on \ PYMALLOC "Use python's internal malloc" on \
IPV6 "Enable IPv6 support" on \ IPV6 "Enable IPv6 support" on \
FPECTL "Enable floating point exception handling" off FPECTL "Enable floating point exception handling" off
@ -60,6 +61,14 @@ PLIST_SUB+= IF_DEFAULT=""
PLIST_SUB+= IF_DEFAULT="@comment " PLIST_SUB+= IF_DEFAULT="@comment "
.endif .endif
.if !defined(WITHOUT_NLS)
USE_GETTEXT= yes
LDFLAGS+= "-L${LOCALBASE}/lib"
CFLAGS+= "-I${LOCALBASE}/include"
.else
CONFIGURE_ENV+= ac_cv_lib_intl_textdomain=no ac_cv_header_libintl_h=no
.endif
.if !defined(WITHOUT_THREADS) .if !defined(WITHOUT_THREADS)
CONFIGURE_ARGS+= --with-threads CONFIGURE_ARGS+= --with-threads
CFLAGS+= ${PTHREAD_CFLAGS} CFLAGS+= ${PTHREAD_CFLAGS}

View file

@ -54,6 +54,7 @@ BINLINKS_SUB= -e 's,smtpd,smtpd${PYTHON_VER},' \
OPTIONS= THREADS "Enable thread support" on \ OPTIONS= THREADS "Enable thread support" on \
UCS4 "Use UCS4 for unicode support" on \ UCS4 "Use UCS4 for unicode support" on \
NLS "Enable Gettext support for the locale module" on \
PYMALLOC "Use python's internal malloc" on \ PYMALLOC "Use python's internal malloc" on \
IPV6 "Enable IPv6 support" on \ IPV6 "Enable IPv6 support" on \
FPECTL "Enable floating point exception handling" off FPECTL "Enable floating point exception handling" off
@ -67,6 +68,14 @@ PLIST_SUB+= IF_DEFAULT=""
PLIST_SUB+= IF_DEFAULT="@comment " PLIST_SUB+= IF_DEFAULT="@comment "
.endif .endif
.if !defined(WITHOUT_NLS)
USE_GETTEXT= yes
LDFLAGS+= "-L${LOCALBASE}/lib"
CFLAGS+= "-I${LOCALBASE}/include"
.else
CONFIGURE_ENV+= ac_cv_lib_intl_textdomain=no ac_cv_header_libintl_h=no
.endif
.if !defined(WITHOUT_THREADS) .if !defined(WITHOUT_THREADS)
CONFIGURE_ARGS+= --with-threads CONFIGURE_ARGS+= --with-threads
CFLAGS+= ${PTHREAD_CFLAGS} CFLAGS+= ${PTHREAD_CFLAGS}

View file

@ -50,12 +50,14 @@ BINLINKS_SUB= -e 's,smtpd,smtpd${PYTHON_VER},' \
-e 's,2to3,2to3-${PYTHON_VER},' \ -e 's,2to3,2to3-${PYTHON_VER},' \
-e 's,(idle|pydoc|python-shared|python),\1${PYTHON_VER},' -e 's,(idle|pydoc|python-shared|python),\1${PYTHON_VER},'
OPTIONS_DEFINE= THREADS SEM PTH PYMALLOC IPV6 FPECTL EXAMPLES OPTIONS_DEFINE= THREADS SEM PTH PYMALLOC IPV6 FPECTL EXAMPLES NLS
OPTIONS_DEFAULT= THREADS UCS4 PYMALLOC IPV6 OPTIONS_DEFAULT= THREADS UCS4 PYMALLOC IPV6
OPTIONS_SINGLE= UCS OPTIONS_SINGLE= UCS
OPTIONS_SINGLE_UCS= UCS2 UCS4 OPTIONS_SINGLE_UCS= UCS2 UCS4
NLS_DESC= Enable Gettext support for the locale module
.include <bsd.port.pre.mk> .include <bsd.port.pre.mk>
.if ${PORT_OPTIONS:MSEM} .if ${PORT_OPTIONS:MSEM}
@ -78,6 +80,14 @@ PLIST_SUB+= IF_DEFAULT=""
PLIST_SUB+= IF_DEFAULT="@comment " PLIST_SUB+= IF_DEFAULT="@comment "
.endif .endif
.if ${PORT_OPTIONS:MNLS}
USE_GETTEXT= yes
LDFLAGS+= "-L${LOCALBASE}/lib"
CFLAGS+= "-I${LOCALBASE}/include"
.else
CONFIGURE_ENV+= ac_cv_lib_intl_textdomain=no ac_cv_header_libintl_h=no
.endif
.if ${PORT_OPTIONS:MTHREADS} .if ${PORT_OPTIONS:MTHREADS}
PLIST_SUB+= THREADS="" PLIST_SUB+= THREADS=""
.if ${PORT_OPTIONS:MPTH} .if ${PORT_OPTIONS:MPTH}

View file

@ -50,12 +50,14 @@ BINLINKS_SUB= -e 's,smtpd,smtpd${PYTHON_VER},' \
-e 's,2to3,2to3-${PYTHON_VER},' \ -e 's,2to3,2to3-${PYTHON_VER},' \
-e 's,(idle|pydoc|python-shared|python),\1${PYTHON_VER},' -e 's,(idle|pydoc|python-shared|python),\1${PYTHON_VER},'
OPTIONS_DEFINE= THREADS SEM PTH PYMALLOC IPV6 FPECTL EXAMPLES OPTIONS_DEFINE= THREADS SEM PTH PYMALLOC IPV6 FPECTL EXAMPLES NLS
OPTIONS_DEFAULT= THREADS UCS4 PYMALLOC IPV6 OPTIONS_DEFAULT= THREADS UCS4 PYMALLOC IPV6
OPTIONS_SINGLE= UCS OPTIONS_SINGLE= UCS
OPTIONS_SINGLE_UCS= UCS2 UCS4 OPTIONS_SINGLE_UCS= UCS2 UCS4
NLS_DESC= Enable Gettext support for the locale module
.include <bsd.port.pre.mk> .include <bsd.port.pre.mk>
.if ${PORT_OPTIONS:MSEM} .if ${PORT_OPTIONS:MSEM}
@ -78,6 +80,14 @@ PLIST_SUB+= IF_DEFAULT=""
PLIST_SUB+= IF_DEFAULT="@comment " PLIST_SUB+= IF_DEFAULT="@comment "
.endif .endif
.if ${PORT_OPTIONS:MNLS}
USE_GETTEXT= yes
LDFLAGS+= "-L${LOCALBASE}/lib"
CFLAGS+= "-I${LOCALBASE}/include"
.else
CONFIGURE_ENV+= ac_cv_lib_intl_textdomain=no ac_cv_header_libintl_h=no
.endif
.if ${PORT_OPTIONS:MTHREADS} .if ${PORT_OPTIONS:MTHREADS}
PLIST_SUB+= THREADS="" PLIST_SUB+= THREADS=""
.if ${PORT_OPTIONS:MPTH} .if ${PORT_OPTIONS:MPTH}

View file

@ -50,9 +50,11 @@ BIN_FILES= python python-shared python-config python-shared-config \
BINLINKS_SUB= -e 's,(2to3|idle3|pydoc3),\1-${PYTHON_VER},' \ BINLINKS_SUB= -e 's,(2to3|idle3|pydoc3),\1-${PYTHON_VER},' \
-e 's,(python-shared|python),\1${PYTHON_VER},' -e 's,(python-shared|python),\1${PYTHON_VER},'
OPTIONS_DEFINE= THREADS UCS4 PYMALLOC IPV6 FPECTL EXAMPLES OPTIONS_DEFINE= THREADS UCS4 PYMALLOC IPV6 FPECTL EXAMPLES NLS
OPTIONS_DEFAULT= THREADS UCS4 PYMALLOC IPV6 OPTIONS_DEFAULT= THREADS UCS4 PYMALLOC IPV6
NLS_DESC= Enable Gettext support for the locale module
.include <bsd.port.pre.mk> .include <bsd.port.pre.mk>
.if ${PYTHON_VERSION} == ${PYTHON_DEFAULT_VERSION} || !exists(${LOCALBASE}/bin/python) .if ${PYTHON_VERSION} == ${PYTHON_DEFAULT_VERSION} || !exists(${LOCALBASE}/bin/python)
@ -62,6 +64,14 @@ PLIST_SUB+= IF_DEFAULT=""
PLIST_SUB+= IF_DEFAULT="@comment " PLIST_SUB+= IF_DEFAULT="@comment "
.endif .endif
.if ${PORT_OPTIONS:MNLS}
USE_GETTEXT= yes
LDFLAGS+= "-L${LOCALBASE}/lib"
CFLAGS+= "-I${LOCALBASE}/include"
.else
CONFIGURE_ENV+= ac_cv_lib_intl_textdomain=no ac_cv_header_libintl_h=no
.endif
.if ${PORT_OPTIONS:MTHREADS} .if ${PORT_OPTIONS:MTHREADS}
PLIST_SUB+= THREADS="" PLIST_SUB+= THREADS=""
CONFIGURE_ARGS+= --with-threads CONFIGURE_ARGS+= --with-threads

View file

@ -51,9 +51,11 @@ BIN_FILES= python python-shared python-config python-shared-config \
BINLINKS_SUB= -e 's,(2to3|idle3|pydoc3),\1-${PYTHON_VER},' \ BINLINKS_SUB= -e 's,(2to3|idle3|pydoc3),\1-${PYTHON_VER},' \
-e 's,(python-shared|python),\1${PYTHON_VER},' -e 's,(python-shared|python),\1${PYTHON_VER},'
OPTIONS_DEFINE= THREADS UCS4 PYMALLOC IPV6 FPECTL EXAMPLES OPTIONS_DEFINE= THREADS UCS4 PYMALLOC IPV6 FPECTL EXAMPLES NLS
OPTIONS_DEFAULT= THREADS UCS4 PYMALLOC IPV6 OPTIONS_DEFAULT= THREADS UCS4 PYMALLOC IPV6
NLS_DESC= Enable Gettext support for the locale module
.include <bsd.port.pre.mk> .include <bsd.port.pre.mk>
.if ${PYTHON_VERSION} == ${PYTHON_DEFAULT_VERSION} || !exists(${LOCALBASE}/bin/python) .if ${PYTHON_VERSION} == ${PYTHON_DEFAULT_VERSION} || !exists(${LOCALBASE}/bin/python)
@ -63,6 +65,14 @@ PLIST_SUB+= IF_DEFAULT=""
PLIST_SUB+= IF_DEFAULT="@comment " PLIST_SUB+= IF_DEFAULT="@comment "
.endif .endif
.if ${PORT_OPTIONS:MNLS}
USE_GETTEXT= yes
LDFLAGS+= "-L${LOCALBASE}/lib"
CFLAGS+= "-I${LOCALBASE}/include"
.else
CONFIGURE_ENV+= ac_cv_lib_intl_textdomain=no ac_cv_header_libintl_h=no
.endif
.if ${PORT_OPTIONS:MTHREADS} .if ${PORT_OPTIONS:MTHREADS}
PLIST_SUB+= THREADS="" PLIST_SUB+= THREADS=""
CONFIGURE_ARGS+= --with-threads CONFIGURE_ARGS+= --with-threads