From owner-freebsd-python@FreeBSD.ORG Fri Aug 6 20:20:04 2010 Return-Path: Delivered-To: freebsd-python@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B22F1065672 for ; Fri, 6 Aug 2010 20:20:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8A2A78FC14 for ; Fri, 6 Aug 2010 20:20:04 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o76KK4lf037206 for ; Fri, 6 Aug 2010 20:20:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o76KK4pE037205; Fri, 6 Aug 2010 20:20:04 GMT (envelope-from gnats) Date: Fri, 6 Aug 2010 20:20:04 GMT Message-Id: <201008062020.o76KK4pE037205@freefall.freebsd.org> To: freebsd-python@FreeBSD.org From: Anonymous Cc: Subject: Re: ports/136917: [patch] lang/python26: gettext detection X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Anonymous List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Aug 2010 20:20:04 -0000 The following reply was made to PR ports/136917; it has been noted by GNATS. From: Anonymous To: bug-followup@FreeBSD.org Cc: Subject: Re: ports/136917: [patch] lang/python26: gettext detection Date: Sat, 07 Aug 2010 00:13:37 +0400 The bug affects lang/python31, too, where locale is part of libpython. $ pydoc2.6 locale.gettext Help on built-in function gettext in locale: locale.gettext = gettext(...) gettext(msg) -> string Return translation of msg. $ python2.6 >>> import locale >>> locale.gettext('blah') 'blah' BTW, I've simplified CONFIGURE_ENV a bit in order to avoid accidental override like below CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/foo" ... CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/bar" --- a.diff begins here --- Index: lang/python26/Makefile =================================================================== RCS file: /a/.cvsup/ports/lang/python26/Makefile,v retrieving revision 1.167 diff -u -p -r1.167 Makefile --- lang/python26/Makefile 19 Jul 2010 21:59:27 -0000 1.167 +++ lang/python26/Makefile 6 Aug 2010 19:58:57 -0000 @@ -56,7 +56,8 @@ OPTIONS= THREADS "Enable thread support" UCS4 "Use UCS4 for unicode support" on \ PYMALLOC "Use python's internal malloc" on \ IPV6 "Enable IPv6 support" on \ - FPECTL "Enable floating point exception handling" off + FPECTL "Enable floating point exception handling" off \ + GETTEXT "Enable gettext support in locale module" off .include @@ -83,19 +84,24 @@ PLIST_SUB+= IF_DEFAULT="@comment " # workaround for a bug in base curses.h. CFLAGS+= -D__wchar_t=wchar_t +.if defined(CPPFLAGS) +CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" +.endif +.if defined(LDFLAGS) +CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}" +.endif + .if !defined(WITHOUT_THREADS) .if defined(WITH_PTH) CONFIGURE_ARGS+= --with-pth EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-configure-pth LIB_DEPENDS+= pth:${PORTSDIR}/devel/pth -_PTH_CPPFLAGS= "-I${LOCALBASE}/include/pth" -_PTH_LDFLAGS= "-L${LOCALBASE}/lib/pth" -CONFIGURE_ENV+= CPPFLAGS="${_PTH_CPPFLAGS} ${CPPFLAGS}" -CONFIGURE_ENV+= LDFLAGS="${_PTH_LDFLAGS} ${LDFLAGS}" +CPPFLAGS+= -I${LOCALBASE}/include/pth +LDFLAGS+= -L${LOCALBASE}/lib/pth .else # !defined(WITH_PTH) CONFIGURE_ARGS+= --with-threads CFLAGS+= ${PTHREAD_CFLAGS} -CONFIGURE_ENV+= LDFLAGS="${PTHREAD_LIBS} ${LDFLAGS}" +LDFLAGS+= ${PTHREAD_LIBS} .endif # defined(WITH_PTH) .if defined(WITHOUT_HUGE_STACK_SIZE) CFLAGS+= -DTHREAD_STACK_SIZE=0x20000 @@ -104,9 +110,6 @@ CFLAGS+= -DTHREAD_STACK_SIZE=0x100000 .endif # defined(WITHOUT_HUGE_STACK_SIZE) .else # defined(WITHOUT_THREADS) CONFIGURE_ARGS+= --without-threads -.if defined(LDFLAGS) -CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}" -.endif # defined(LDFLAGS) .endif # !defined(WITHOUT_THREADS) .if !defined(WITHOUT_UCS4) && !defined(WITH_UCS2) @@ -147,6 +150,14 @@ CONFIGURE_ARGS+= --disable-ipv6 CONFIGURE_ARGS+= --with-fpectl .endif +.if defined(WITH_GETTEXT) +USE_GETTEXT= yes +LDFLAGS+= -L${LOCALBASE}/lib +CONFIGURE_ENV+= ac_cv_header_libintl_h=yes +.else +CONFIGURE_ENV+= ac_cv_header_libintl_h=no +.endif + pre-patch: ${CP} -r ${PATCH_WRKSRC}/Lib/plat-freebsd8 \ ${PATCH_WRKSRC}/Lib/plat-freebsd9 --- a.diff ends here ---