gettext: add support for using the stub headers on the host
authorFelix Fietkau <nbd@openwrt.org>
Sun, 20 Feb 2011 03:26:44 +0000 (03:26 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 20 Feb 2011 03:26:44 +0000 (03:26 +0000)
SVN-Revision: 25599

libs/gettext/Makefile
libs/gettext/src/include/libintl.h

index 12a3bfc60009916bb95623c1ad87b3e9eb770f15..c4b166f9ea8b506a328285cbd529508b51504730 100644 (file)
@@ -11,6 +11,7 @@ PKG_NAME:=gettext
 PKG_RELEASE:=2
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
 
 define Package/libintl
   SECTION:=libs
@@ -37,9 +38,26 @@ define Build/InstallDev
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/m4/* $(1)/usr/share/aclocal/
 endef
 
+define Host/Prepare
+       mkdir -p $(HOST_BUILD_DIR)
+endef
+
+define Host/Compile
+
+endef
+
+define Host/Install
+       $(INSTALL_DIR) $(STAGING_DIR_HOST)/include
+       $(INSTALL_DATA) ./src/include/libintl.h $(STAGING_DIR_HOST)/include/
+
+       $(INSTALL_DIR) $(STAGING_DIR_HOST)/share/aclocal
+       $(INSTALL_DATA) ./src/m4/* $(STAGING_DIR_HOST)/share/aclocal/
+endef
+
 define Package/libintl/install
        $(INSTALL_DIR) $(1)/tmp
        touch $(1)/tmp/.libintl-placeholder
 endef
 
+$(eval $(call HostBuild))
 $(eval $(call BuildPackage,libintl))
index f101343d44ac15609b2f667bf55947a78c696ace..a1157a44533d268faa22741e10d35393e5556335 100644 (file)
@@ -5,11 +5,8 @@
 #ifndef _LIBINTL_H
 #define _LIBINTL_H      1
 
-#include <features.h>
 #include <locale.h>
 
-#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_GETTEXT_AWARENESS__)
-
 /* Undef gettext macros, if any... */
 #undef gettext
 #undef dgettext
@@ -53,5 +50,4 @@
 #define bind_textdomain_codeset(Domain, Codeset) (Codeset)
 #define textdomain(String) (String) ?: "messages"
 
-#endif  /* GETTEXT */
 #endif  /* _LIBINTL_H */