Skip to contentSkip to conversation

cpufrequtils: Fix build without NLS

PATCH Superseded Khem Raj 1 participant 3 messages Jun 26, 2012

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/3 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

---
 .../cpufrequtils-008/cpufrequtils-nls.patch        |   81 --------------------
 .../cpufrequtils/cpufrequtils_008.bb               |    4 +-
 2 files changed, 3 insertions(+), 82 deletions(-)
 delete mode 100644 meta-oe/recipes-support/cpufrequtils/cpufrequtils-008/cpufrequtils-nls.patch
meta-oe/recipes-support/cpufrequtils/cpufrequtils-008/cpufrequtils-nls.patch deleted +0 -81
deleted file mode 100644
index cbc8719..0000000
@@ -1,81 +0,0 @@
-make nls/gettext support optional
-
-patch by Jos van der Ende <[email protected]>
-
-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
- 
meta-oe/recipes-support/cpufrequtils/cpufrequtils_008.bb +3 -1
index 855b9c8..b5327c3 100644
@@ -11,7 +11,9 @@ SRCREV = "a2f0c39d5f21596bb9f5223e895c0ff210b265d0"
 SRC_URI = "git://github.com/emagii/cpufrequtils.git \
           "
 
-PR = "r3"
+CFLAGS += "${@['-DNLS', '-UNLS']['${USE_NLS}' == 'no']}"
+
+PR = "r4"
 
 S = "${WORKDIR}/git"
 
Signature · 1 line
1.7.9.5
author
#1 lore raw

PATCH 2/3 udev: link librt explicitly on uclibc

Some functions used by udev are in librt in uclibc case therefore add -lrt to linker flags when building for uclibc

---
 meta-oe/recipes-core/udev/udev_182.bb |    2 ++
 1 file changed, 2 insertions(+)
meta-oe/recipes-core/udev/udev_182.bb +2 -0
index f2bdd75..7d88aed 100644
@@ -12,6 +12,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
                     file://src/COPYING;md5=17c4e5fb495e6707ac92a3864926f979 \
                     file://src/gudev/COPYING;md5=fb494485a7d0505308cb68e4997cc266"
 
+PR = "r1"
 # glib-2.0: Needed for udev-extras
 # util-linux: Needed for libblkid
 # kmod: needed for libkmod
@@ -51,6 +52,7 @@ do_configure_prepend() {
 	cp ${WORKDIR}/gtk-doc.make ${S}
 }
 
+LDFLAGS_prepend-libc-uclibc = " -lrt "
 PACKAGES =+ "${PN}-systemd libudev libgudev udev-consolekit udev-utils"
 
 FILES_${PN}-systemd = "${systemd_unitdir}"
Signature · 1 line
1.7.9.5
author
#2 lore raw

PATCH 3/3 mini-iconv: Add package recipe

In reply to Khem Raj

mini iconv can be used to replace GNU libiconv it does not do all translation but it good for small systems especially uclibc based

---
 meta-oe/recipes-support/mini-iconv/mini-iconv.bb |   21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 meta-oe/recipes-support/mini-iconv/mini-iconv.bb
meta-oe/recipes-support/mini-iconv/mini-iconv.bb new file +21 -0
new file mode 100644
index 0000000..7d5bc68
@@ -0,0 +1,21 @@
+# Copyright (C) 2012 Khem Raj <[email protected]>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "A minimal iconv implementation w/ support for UTF-8, ASCII, ISO-8859-1"
+HOMEPAGE = "http://tinderbox.dev.gentoo.org/portage/local/misc/mini-iconv/"
+LICENSE = "MPL-1.1"
+SECTION = "libs"
+DEPENDS = ""
+PROVIDES = "virtual/libiconv"
+PR = "r0"
+LIC_FILES_CHKSUM = "file://iconv.c;startline=1;endline=6;md5=35af9d9924327fe8a0a1fe3a2cb454c8"
+SRC_URI = "http://mirror.meleeweb.net/pub/linux/gentoo/distfiles/mini-iconv.tar.bz2"
+SRC_URI[md5sum] = "84412221e26505a2b3855d4a1cdcd0e0"
+SRC_URI[sha256sum] = "3552262bf1bcf8e859a2a3a7adfb0367af8593383e730c492e981477aac0a0d4"
+
+
+S = "${WORKDIR}/${PN}"
+
+do_install() {
+	oe_runmake install DESTDIR=${D} PREFIX=${prefix} LIB=${base_libdir}
+}
Signature · 1 line
1.7.9.5