diff --git a/lang/python24/Makefile b/lang/python24/Makefile index 95221d0f223c..3aeffdd053ab 100644 --- a/lang/python24/Makefile +++ b/lang/python24/Makefile @@ -47,6 +47,7 @@ BINLINKS_SUB= -e 's,smtpd,smtpd${PYTHON_VER},' \ OPTIONS= THREADS "Enable thread 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 \ IPV6 "Enable IPv6 support" on \ FPECTL "Enable floating point exception handling" off @@ -60,6 +61,14 @@ PLIST_SUB+= IF_DEFAULT="" PLIST_SUB+= IF_DEFAULT="@comment " .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) CONFIGURE_ARGS+= --with-threads CFLAGS+= ${PTHREAD_CFLAGS} diff --git a/lang/python25/Makefile b/lang/python25/Makefile index 68ac7051aae0..4bb38a3ca316 100644 --- a/lang/python25/Makefile +++ b/lang/python25/Makefile @@ -54,6 +54,7 @@ BINLINKS_SUB= -e 's,smtpd,smtpd${PYTHON_VER},' \ OPTIONS= THREADS "Enable thread 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 \ IPV6 "Enable IPv6 support" on \ FPECTL "Enable floating point exception handling" off @@ -67,6 +68,14 @@ PLIST_SUB+= IF_DEFAULT="" PLIST_SUB+= IF_DEFAULT="@comment " .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) CONFIGURE_ARGS+= --with-threads CFLAGS+= ${PTHREAD_CFLAGS} diff --git a/lang/python26/Makefile b/lang/python26/Makefile index e96418b51b9c..52dbf102afd6 100644 --- a/lang/python26/Makefile +++ b/lang/python26/Makefile @@ -50,12 +50,14 @@ BINLINKS_SUB= -e 's,smtpd,smtpd${PYTHON_VER},' \ -e 's,2to3,2to3-${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_SINGLE= UCS OPTIONS_SINGLE_UCS= UCS2 UCS4 +NLS_DESC= Enable Gettext support for the locale module + .include .if ${PORT_OPTIONS:MSEM} @@ -78,6 +80,14 @@ PLIST_SUB+= IF_DEFAULT="" PLIST_SUB+= IF_DEFAULT="@comment " .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} PLIST_SUB+= THREADS="" .if ${PORT_OPTIONS:MPTH} diff --git a/lang/python27/Makefile b/lang/python27/Makefile index ccf765ed6be3..c03236a92af5 100644 --- a/lang/python27/Makefile +++ b/lang/python27/Makefile @@ -50,12 +50,14 @@ BINLINKS_SUB= -e 's,smtpd,smtpd${PYTHON_VER},' \ -e 's,2to3,2to3-${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_SINGLE= UCS OPTIONS_SINGLE_UCS= UCS2 UCS4 +NLS_DESC= Enable Gettext support for the locale module + .include .if ${PORT_OPTIONS:MSEM} @@ -78,6 +80,14 @@ PLIST_SUB+= IF_DEFAULT="" PLIST_SUB+= IF_DEFAULT="@comment " .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} PLIST_SUB+= THREADS="" .if ${PORT_OPTIONS:MPTH} diff --git a/lang/python31/Makefile b/lang/python31/Makefile index 24b14189dae3..7e55be079854 100644 --- a/lang/python31/Makefile +++ b/lang/python31/Makefile @@ -50,9 +50,11 @@ BIN_FILES= python python-shared python-config python-shared-config \ BINLINKS_SUB= -e 's,(2to3|idle3|pydoc3),\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 +NLS_DESC= Enable Gettext support for the locale module + .include .if ${PYTHON_VERSION} == ${PYTHON_DEFAULT_VERSION} || !exists(${LOCALBASE}/bin/python) @@ -62,6 +64,14 @@ PLIST_SUB+= IF_DEFAULT="" PLIST_SUB+= IF_DEFAULT="@comment " .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} PLIST_SUB+= THREADS="" CONFIGURE_ARGS+= --with-threads diff --git a/lang/python32/Makefile b/lang/python32/Makefile index c0e33286ebcf..041c3e747a9a 100644 --- a/lang/python32/Makefile +++ b/lang/python32/Makefile @@ -51,9 +51,11 @@ BIN_FILES= python python-shared python-config python-shared-config \ BINLINKS_SUB= -e 's,(2to3|idle3|pydoc3),\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 +NLS_DESC= Enable Gettext support for the locale module + .include .if ${PYTHON_VERSION} == ${PYTHON_DEFAULT_VERSION} || !exists(${LOCALBASE}/bin/python) @@ -63,6 +65,14 @@ PLIST_SUB+= IF_DEFAULT="" PLIST_SUB+= IF_DEFAULT="@comment " .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} PLIST_SUB+= THREADS="" CONFIGURE_ARGS+= --with-threads