ports/146278: [PATCH]x11-toolkits/Xaw3d: fix NLS support
bf
bf1783 at gmail.com
Tue May 4 02:00:06 UTC 2010
>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:
More information about the freebsd-ports-bugs
mailing list