cpufrequtils: Fix build without NLS

uclibc disables NLS and we need to pass the right
define to inform the build system about NLS support
cpufrequtils-nls.patch is applied upstream so lets
remove it from metadata

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj
2012-06-24 12:37:07 -07:00
committed by Koen Kooi
parent 445f95f8d3
commit a64ec2dcbe
2 changed files with 3 additions and 82 deletions
@@ -1,81 +0,0 @@
make nls/gettext support optional
patch by Jos van der Ende <seraph@xs4all.nl>
http://bugs.gentoo.org/205576
Index: git/Makefile
===================================================================
--- git.orig/Makefile 2011-06-30 17:50:23.000000000 -0700
+++ git/Makefile 2011-07-01 07:06:58.300033928 -0700
@@ -121,6 +121,7 @@
ifeq ($(strip $(NLS)),true)
INSTALL_NLS += install-gmo
COMPILE_NLS += update-gmo
+ CFLAGDEF += -DNLS
endif
ifeq ($(strip $(CPUFRQ_BENCH)),true)
Index: git/utils/info.c
===================================================================
--- git.orig/utils/info.c 2011-06-30 17:50:23.000000000 -0700
+++ git/utils/info.c 2011-07-01 07:06:58.300033928 -0700
@@ -10,7 +10,6 @@
#include <errno.h>
#include <stdlib.h>
#include <string.h>
-#include <libintl.h>
#include <locale.h>
#include <getopt.h>
@@ -18,9 +17,18 @@
#include "cpufreq.h"
+#ifdef NLS
+#include <libintl.h>
#define _(String) gettext (String)
#define gettext_noop(String) String
#define N_(String) gettext_noop (String)
+#else
+#define gettext_noop(String) String
+#define _(String) gettext_noop (String)
+#define gettext(String) gettext_noop (String)
+#define N_(String) gettext_noop (String)
+#define textdomain(String)
+#endif
#define LINE_LEN 10
Index: git/utils/set.c
===================================================================
--- git.orig/utils/set.c 2011-06-30 17:50:23.000000000 -0700
+++ git/utils/set.c 2011-07-01 07:07:56.980119994 -0700
@@ -12,16 +12,23 @@
#include <limits.h>
#include <string.h>
#include <ctype.h>
-#include <libintl.h>
#include <locale.h>
#include <getopt.h>
#include "cpufreq.h"
-
-#define _(String) gettext(String)
+#ifdef NLS
+#include <libintl.h>
+#define _(String) gettext (String)
+#define gettext_noop(String) String
+#define N_(String) gettext_noop (String)
+#else
#define gettext_noop(String) String
-#define N_(String) gettext_noop(String)
+#define _(String) gettext_noop (String)
+#define gettext(String) gettext_noop (String)
+#define N_(String) gettext_noop (String)
+#define textdomain(String)
+#endif
#define NORM_FREQ_LEN 32
@@ -11,7 +11,9 @@ SRCREV = "a2f0c39d5f21596bb9f5223e895c0ff210b265d0"
SRC_URI = "git://github.com/emagii/cpufrequtils.git \
"
PR = "r3"
CFLAGS_append_libc-uclibc = " ${@['-DNLS', '-UNLS']['${USE_NLS}' == 'no']} "
PR = "r4"
S = "${WORKDIR}/git"