Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 May 2010 01:50:27 GMT
From:      bf <bf1783@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/146278: [PATCH]x11-toolkits/Xaw3d: fix NLS support
Message-ID:  <201005040150.o441oRnb064038@www.freebsd.org>
Resent-Message-ID: <201005040200.o44205Ux047968@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         146278
>Category:       ports
>Synopsis:       [PATCH]x11-toolkits/Xaw3d: fix NLS support
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 04 02:00:05 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     bf
>Release:        9-CURRENT amd64
>Organization:
-
>Environment:
>Description:
Build an i18n-enabled Xaw3d by default, and allow this feature to be disabled via an NLS option. Properly record any dependence on devel/gettext.  Do not install i18n-related headers if NLS is disabled, so that the configure scripts of dependent ports are not confused.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -x '*old.*' -x '*new.*' -ruN Xaw3d.orig/Makefile Xaw3d/Makefile
--- Xaw3d.orig/Makefile	2010-05-03 21:04:25.000000000 -0400
+++ Xaw3d/Makefile	2010-05-03 21:47:38.000000000 -0400
@@ -7,7 +7,7 @@
 
 PORTNAME=	Xaw3d
 PORTVERSION=	1.5E
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	x11-toolkits
 MASTER_SITES=	ftp://ftp.visi.com/users/hawkeyd/X/ \
 		http://www.mirrorservice.org/sites/ftp.slackware.com/pub/slackware/slackware_source/x/xaw3d/ \
@@ -24,11 +24,26 @@
 SUB_FILES=	pkg-message
 SUB_LIST=	XAWVER="${XAWVER}"
 
+OPTIONS=	NLS "Provide limited Natural Language Support via gettext" on
+
 .include <bsd.port.pre.mk>
 
+.if !defined(WITHOUT_NLS)
+USE_GETTEXT=yes
+PLIST_SUB+=	NLS=""
+.else
+PLIST_SUB+=	NLS="@comment "
+.endif
+
 post-extract:
 	${MKDIR} ${WRKSRC}/X11/Xaw3d
 	cd ${WRKSRC}/X11/Xaw3d; ${LN} -sf ../../*.h .
+.if defined(WITHOUT_NLS)
+	${REINPLACE_CMD} -e '/LINTLIBS =/s/=.*/=/' \
+		-e '/#ifdef XawI18nDefines/s//#if 0/' \
+		${WRKSRC}/Imakefile
+		
+.endif
 
 # Workaround a bug in egcs on FreeBSD/Alpha.
 .if ${ARCH} == "alpha"
diff -x '*old.*' -x '*new.*' -ruN Xaw3d.orig/pkg-plist Xaw3d/pkg-plist
--- Xaw3d.orig/pkg-plist	2010-05-03 21:04:25.000000000 -0400
+++ Xaw3d/pkg-plist	2010-05-03 20:02:01.000000000 -0400
@@ -28,10 +28,10 @@
 include/X11/Xaw3d/ListP.h
 include/X11/Xaw3d/MenuButtoP.h
 include/X11/Xaw3d/MenuButton.h
-include/X11/Xaw3d/MultiSink.h
-include/X11/Xaw3d/MultiSinkP.h
-include/X11/Xaw3d/MultiSrc.h
-include/X11/Xaw3d/MultiSrcP.h
+%%NLS%%include/X11/Xaw3d/MultiSink.h
+%%NLS%%include/X11/Xaw3d/MultiSinkP.h
+%%NLS%%include/X11/Xaw3d/MultiSrc.h
+%%NLS%%include/X11/Xaw3d/MultiSrcP.h
 include/X11/Xaw3d/Paned.h
 include/X11/Xaw3d/PanedP.h
 include/X11/Xaw3d/Panner.h
@@ -74,11 +74,11 @@
 include/X11/Xaw3d/ToggleP.h
 include/X11/Xaw3d/Tree.h
 include/X11/Xaw3d/TreeP.h
-include/X11/Xaw3d/VendorEP.h
+%%NLS%%include/X11/Xaw3d/VendorEP.h
 include/X11/Xaw3d/Viewport.h
 include/X11/Xaw3d/ViewportP.h
 include/X11/Xaw3d/Xaw3dP.h
-include/X11/Xaw3d/XawImP.h
+%%NLS%%include/X11/Xaw3d/XawImP.h
 include/X11/Xaw3d/XawInit.h
 %%PORTDOCS%%share/doc/Xaw3d/README.XAW3D
 @dirrm include/X11/Xaw3d


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005040150.o441oRnb064038>