From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Jul 23 21:30:06 2010 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD8C2106566C for ; Fri, 23 Jul 2010 21:30:06 +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 79BE18FC18 for ; Fri, 23 Jul 2010 21:30:06 +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 o6NLU6Bf057196 for ; Fri, 23 Jul 2010 21:30:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o6NLU6uP057195; Fri, 23 Jul 2010 21:30:06 GMT (envelope-from gnats) Resent-Date: Fri, 23 Jul 2010 21:30:06 GMT Resent-Message-Id: <201007232130.o6NLU6uP057195@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Anonymous Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A82A1065676 for ; Fri, 23 Jul 2010 21:27:23 +0000 (UTC) (envelope-from swell.k@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 280328FC13 for ; Fri, 23 Jul 2010 21:27:22 +0000 (UTC) Received: by fxm13 with SMTP id 13so5753656fxm.13 for ; Fri, 23 Jul 2010 14:27:22 -0700 (PDT) Received: by 10.223.109.2 with SMTP id h2mr3738917fap.95.1279920441234; Fri, 23 Jul 2010 14:27:21 -0700 (PDT) Received: from localhost (load-me-in-a-browser-if-this-tor-node-is-causing-you-grief.riseup.net [77.109.139.87]) by mx.google.com with ESMTPS id e20sm236054fak.23.2010.07.23.14.27.19 (version=SSLv3 cipher=RC4-MD5); Fri, 23 Jul 2010 14:27:20 -0700 (PDT) Message-Id: <86fwz9j3lk.fsf@gmail.com> Date: Sat, 24 Jul 2010 01:22:15 +0400 From: Anonymous To: FreeBSD-gnats-submit@FreeBSD.org Cc: Subject: ports/148880: [patch] games/wesnoth: remove NLS option, plug gettext no-op for WITHOUT_NLS X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jul 2010 21:30:06 -0000 >Number: 148880 >Category: ports >Synopsis: [patch] games/wesnoth: remove NLS option, plug gettext no-op for WITHOUT_NLS >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Jul 23 21:30:06 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Anonymous >Release: FreeBSD 9.0-CURRENT amd64 >Organization: >Environment: >Description: Most ports don't use NLS knob in OPTIONS. This one doesn't even compile with default options + WITHOUT_NLS. So, make NLS even stronger default. In rare case user hates gettext provide a no-op fix for compilation. >How-To-Repeat: >Fix: --- a.diff begins here --- Index: games/wesnoth/Makefile =================================================================== RCS file: /a/.cvsup/ports/games/wesnoth/Makefile,v retrieving revision 1.81 diff -u -p -r1.81 Makefile --- games/wesnoth/Makefile 20 Jul 2010 10:57:06 -0000 1.81 +++ games/wesnoth/Makefile 23 Jul 2010 12:56:26 -0000 @@ -54,7 +54,6 @@ OPTIONS= BWMON "Enable bandwidth monito EDITOR "Enable map editor" On \ FRIBIDI "Enable bidirectional support" On \ LOWMEM "Reduce memory usage (disables animations)" Off \ - NLS "Enable localization" On \ NOTIFY "Enable desktop notifications" On \ POOLALLOC "Use wesnoth own memory allocator" Off \ PYTHON "Enable python developer tools" On \ @@ -194,10 +193,6 @@ PLIST_SUB+= TOOLS="" CONFIGURE_ARGS+= --docdir=${WRKDIR}/docs .endif -.if (defined(WITH_CAMPAIGN) || defined(WITH_SERVER) || defined(WITH_TOOLS)) && defined(WITHOUT_NLS) -BROKEN= you need NLS support for `campaignd' or `wesnothd' or tools to link against gettext -.endif - .if defined(NOPORTDATA) IGNORE= game data is required, undefine NOPORTDATA .endif Index: games/wesnoth/files/patch-src-gettext.cpp =================================================================== RCS file: games/wesnoth/files/patch-src-gettext.cpp diff -N games/wesnoth/files/patch-src-gettext.cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ games/wesnoth/files/patch-src-gettext.cpp 23 Jul 2010 12:44:38 -0000 @@ -0,0 +1,15 @@ +--- src/gettext.cpp~ ++++ src/gettext.cpp +@@ -18,6 +18,12 @@ + + #include + ++#ifndef ENABLE_NLS ++char *textdomain (const char *domainname) { ++ return "dummy"; ++} ++#endif ++ + char const *egettext(char const *msgid) + { + return msgid[0] == '\0' ? msgid : gettext(msgid); Index: games/wesnoth/files/patch-src-gettext.hpp =================================================================== RCS file: games/wesnoth/files/patch-src-gettext.hpp diff -N games/wesnoth/files/patch-src-gettext.hpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ games/wesnoth/files/patch-src-gettext.hpp 23 Jul 2010 13:47:02 -0000 @@ -0,0 +1,25 @@ +--- src/gettext.hpp~ ++++ src/gettext.hpp +@@ -35,7 +35,21 @@ + + // gettext-related declarations + +-#include ++#include "wesconfig.h" ++ ++#ifdef ENABLE_NLS ++# include ++#else ++# define bind_textdomain_codeset(Domain,Codeset) "C" ++# define bindtextdomain(Domain,Dir) "/nonexistent" ++# define gettext(String) gettext_noop(String) ++# define ngettext(String1,String2,Int) gettext_noop(Int == 1 ? String1 : String2) ++# define dgettext(Domain,String) gettext_noop(String) ++# define dngettext(Domain,String1,String2,Int) gettext_noop(Int == 1 ? String1 : String2) ++# define dcgettext(Domain,String,Int) gettext_noop(String) ++# define dcngettext(Domain,String1,String2,Int1,Int2) gettext_noop(Int1 == 1 ? String1 : String2) ++char *textdomain (const char *domainname); ++#endif + + const char* egettext(const char*); + const char* sgettext(const char*); --- a.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: