gettext-full: avoid using iconv for host builds
[openwrt/openwrt.git] / package / libs / gettext-full / Makefile
1 #
2 # Copyright (C) 2006-2015 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=gettext-full
11 PKG_VERSION:=0.19.8.1
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=gettext-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=@GNU/gettext
16 PKG_HASH:=105556dbc5c3fbbc2aa0edb46d22d055748b6f5c7cd7a8d99f8e7eb84e938be4
17 PKG_BUILD_DIR:=$(BUILD_DIR)/gettext-$(PKG_VERSION)
18 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/gettext-$(PKG_VERSION)
19
20 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
21 PKG_LICENSE:=GPL-3.0+
22
23 PKG_FIXUP:=autoreconf
24 PKG_INSTALL:=1
25 PKG_BUILD_PARALLEL:=0
26 PKG_BUILD_DEPENDS:=gettext-full/host
27
28 include $(INCLUDE_DIR)/package.mk
29 include $(INCLUDE_DIR)/host-build.mk
30
31 define Package/libintl-full
32 SECTION:=libs
33 CATEGORY:=Libraries
34 TITLE:=GNU Internationalization library
35 URL:=http://www.gnu.org/software/gettext/
36 endef
37
38 TARGET_CFLAGS += $(FPIC)
39 ifneq ($(HOST_OS),Linux)
40 TARGET_CFLAGS += -I$(STAGING_DIR_HOSTPKG)/include
41 endif
42 ifdef CONFIG_USE_MUSL
43 TARGET_CFLAGS += -D__UCLIBC__
44 endif
45
46 CONFIGURE_ARGS += \
47 --enable-shared \
48 --enable-static \
49 --disable-libasprintf \
50 --disable-rpath \
51 --enable-nls \
52 --disable-java \
53 --disable-native-java \
54 --disable-openmp \
55 --disable-curses \
56 --with-included-gettext \
57 --without-libintl-prefix \
58 --without-libexpat-prefix \
59 --without-emacs
60
61 HOST_CONFIGURE_ARGS += \
62 --disable-shared \
63 --enable-static \
64 --disable-libasprintf \
65 --disable-rpath \
66 --disable-java \
67 --disable-native-java \
68 --disable-openmp \
69 --without-emacs \
70 --without-libxml2-prefix
71
72
73 HOST_CONFIGURE_VARS += \
74 EMACS="no" \
75 am_cv_lib_iconv=no \
76 am_cv_func_iconv=no \
77 ac_cv_header_iconv_h=no \
78
79 define Build/InstallDev
80 $(INSTALL_DIR) $(1)/usr/lib/libintl-full/include
81 $(CP) $(PKG_INSTALL_DIR)/usr/include/libintl.h $(1)/usr/lib/libintl-full/include/
82
83 $(INSTALL_DIR) $(1)/usr/lib/libintl-full/lib
84 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libintl.{a,so*} $(1)/usr/lib/libintl-full/lib/
85
86 $(INSTALL_DIR) $(1)/usr/share/aclocal
87 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(1)/usr/share/aclocal/
88
89 $(SED) '/read dummy/d' $(STAGING_DIR_HOSTPKG)/bin/gettextize
90 endef
91
92 define Package/libintl-full/install
93 $(INSTALL_DIR) $(1)/usr/lib
94 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libintl.so* $(1)/usr/lib/
95 endef
96
97 $(eval $(call HostBuild))
98 $(eval $(call BuildPackage,libintl-full))