The following commit has been merged in the master branch:
commit b83cc7d551c9aeed7bada926e2e3b3d9fc5c9140
Author: Guillem Jover <[email protected]>
Date:   Thu Feb 3 00:05:23 2011 +0100

    libcompat: Define gettext context functions when NLS is disabled
    
    When the package is configured with NLS disabled (--disable-nls),
    the build will fail due to undefined references to LC_MESSAGES, the
    gettext.h header file does not correctly handle the gettext context
    related function declarations on disabled NLS support, which is known
    to be used by downstreams. This adds all missing macros corresponding
    to their NLS enabled counterparts.

diff --git a/debian/changelog b/debian/changelog
index 0f1d588..ad43296 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -30,6 +30,7 @@ dpkg (1.16.0) UNRELEASED; urgency=low
     packages are not-installed or half-installed.
   * By default reject installing packages w/o an Architecture field. They
     now need --force-architecture, dpkg will still warn about them though.
+  * Fix build failure when passing --disable-nls to configure.
 
   [ Raphaƫl Hertzog ]
   * Fail properly when debian/source/format is empty. Closes: #600854
diff --git a/lib/compat/gettext.h b/lib/compat/gettext.h
index a2e93b2..2d654b7 100644
--- a/lib/compat/gettext.h
+++ b/lib/compat/gettext.h
@@ -96,6 +96,8 @@
 /* The separator between msgctxt and msgid in a .mo file.  */
 #define GETTEXT_CONTEXT_GLUE "\004"
 
+#if ENABLE_NLS
+
 /* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a
    MSGID.  MSGCTXT and MSGID must be string literals.  MSGCTXT should be
    short and rarely need to change.
@@ -268,4 +270,34 @@ dcnpgettext_expr (const char *domain,
   return (n == 1 ? msgid : msgid_plural);
 }
 
+#else /* ENABLE_NLS */
+
+#define pgettext(Msgctxt, Msgid) ((void) (Msgctxt), gettext (Msgid))
+#define dpgettext(Domainname, Msgctxt, Msgid) \
+  ((void) (Domainname), pgettext (Msgctxt, Msgid))
+#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \
+  ((void) (Category), dpgettext (Domainname, Msgctxt, Msgid))
+
+#define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
+  ((void) (Msgctxt), ngettext (Msgid, MsgidPlural, N))
+#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
+  ((void) (Domainname), npgettext (Msgctxt, Msgid, MsgidPlural, N)
+#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \
+   ((void) (Category), dnpgettext (Domainname, Msgctxt, Msgid, MsgidPlural, N)
+
+#define pgettext_expr(Msgctxt, Msgid) pgettext (Msgctxt, Msgid)
+#define dpgettext_expr(Domainname, Msgctxt, Msgid) \
+  dpgettext (Domainname, Msgctxt, Msgid)
+#define dcpgettext_expr(Domainname, Msgctxt, Msgid, Category) \
+  dcpgettext (Domainname, Msgctxt, Msgid, Category)
+
+#define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \
+  npgettext (Msgctxt, Msgid, MsgidPlural, N)
+#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
+  dnpgettext (Domainname, Msgctxt, Msgid, MsgidPlural, N)
+#define dcnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) 
\
+  dcnpgettext (Domainname, Msgctxt, Msgid, MsgidPlural, N, Category)
+
+#endif /* ENABLE_NLS */
+
 #endif /* _LIBGETTEXT_H */

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to