ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.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.21.1
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=gettext-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=@GNU/gettext
16 PKG_HASH:=50dbc8f39797950aa2c98e939947c527e5ac9ebd2c1b99dd7b06ba33a6767ae6
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-or-later
22 PKG_CPE_ID:=cpe:/a:gnu:gettext
23
24 PKG_INSTALL:=1
25 PKG_BUILD_DEPENDS:=gettext-full/host libunistring libxml2
26 PKG_BUILD_PARALLEL:=0
27
28 PKG_FIXUP:=autoreconf
29
30 HOST_BUILD_DEPENDS:=gperf/host libunistring/host libxml2/host
31 HOST_BUILD_PARALLEL:=0
32
33 PKG_SUBDIRS:= \
34 $$$$(foreach dir, \
35 intl \
36 intl-csharp \
37 intl-java \
38 its \
39 gnulib-lib \
40 gnulib-local \
41 lib \
42 $$$$(SUBDIR_libasprintf) \
43 libgettextpo \
44 libgrep \
45 libtextstyle \
46 m4 \
47 misc \
48 po \
49 projects \
50 src \
51 styles \
52 gettext-runtime \
53 gettext-tools \
54 ,$$$$(wildcard $$$$(dir)) )
55
56 PKG_MAKEFILES_FAKE:= \
57 gnulib-local/m4/Makefile \
58 libtextstyle/gnulib-local/Makefile \
59 libtextstyle/m4/Makefile \
60 m4/Makefile
61
62 include $(INCLUDE_DIR)/package.mk
63 include $(INCLUDE_DIR)/host-build.mk
64
65 define Package/libintl-full
66 SECTION:=libs
67 CATEGORY:=Libraries
68 TITLE:=GNU Internationalization library
69 URL:=http://www.gnu.org/software/gettext/
70 ABI_VERSION:=8
71 endef
72
73 export GNULIB_SRCDIR:=$(HOST_GNULIB_SRCDIR)
74
75 TARGET_CFLAGS += $(FPIC)
76 ifneq ($(HOST_OS),Linux)
77 TARGET_CFLAGS += -I$(STAGING_DIR_HOSTPKG)/include
78 endif
79
80 CONFIGURE_ARGS += \
81 --enable-shared \
82 --enable-static \
83 --disable-libasprintf \
84 --disable-rpath \
85 --enable-nls \
86 --disable-java \
87 --disable-openmp \
88 --disable-curses \
89 --with-included-gettext \
90 --without-libintl-prefix \
91 --without-libexpat-prefix \
92 --with-libunistring-prefix=$(STAGING_DIR)/usr \
93 --with-libxml2-prefix=$(STAGING_DIR) \
94 --without-emacs
95
96 HOST_CONFIGURE_ARGS += \
97 --disable-shared \
98 --enable-static \
99 --disable-libasprintf \
100 --disable-rpath \
101 --disable-java \
102 --disable-openmp \
103 --without-emacs \
104 --with-libunistring-prefix=$(STAGING_DIR_HOSTPKG) \
105 --with-libxml2-prefix=$(STAGING_DIR_HOSTPKG)
106
107 HOST_CONFIGURE_VARS += \
108 EMACS="no" \
109 am_cv_lib_iconv=no \
110 am_cv_func_iconv=no \
111 ac_cv_header_iconv_h=no \
112
113 HOST_CFLAGS += $(HOST_FPIC)
114
115 define Host/Bootstrap
116 ( \
117 cd $(HOST_BUILD_DIR); \
118 $(AM_TOOL_PATHS) \
119 ./autogen.sh \
120 )
121 endef
122
123 define Host/Prepare
124 $(call Host/Prepare/Default)
125 $(if $(QUILT),,$(call Host/Bootstrap))
126 endef
127
128 define Host/Configure
129 $(if $(QUILT),$(call Host/Bootstrap))
130 $(call Host/Configure/Default)
131 endef
132
133 define Host/Compile
134 $(foreach makefile,$(PKG_MAKEFILES_FAKE),printf '%s\n%s\n' 'all:' 'install:' > $(HOST_BUILD_DIR)/$(makefile); )
135 $(call Host/Compile/Default,SUBDIRS='$(PKG_SUBDIRS)')
136 endef
137
138 define Build/Bootstrap
139 ( \
140 cd $(PKG_BUILD_DIR); \
141 $(AM_TOOL_PATHS) \
142 ./autogen.sh \
143 )
144 endef
145
146 define Build/Prepare
147 $(call Build/Prepare/Default)
148 $(if $(QUILT),,$(call Build/Bootstrap))
149 endef
150
151 define Build/Configure
152 $(if $(QUILT),$(call Build/Bootstrap))
153 $(call Build/Configure/Default)
154 endef
155
156 define Build/Compile
157 $(foreach makefile,$(PKG_MAKEFILES_FAKE),printf '%s\n%s\n' 'all:' 'install:' > $(PKG_BUILD_DIR)/$(makefile); )
158 $(call Build/Compile/Default,SUBDIRS='$(PKG_SUBDIRS)')
159 endef
160
161 define Build/InstallDev
162 $(INSTALL_DIR) $(1)/usr/lib/libintl-full/include
163 $(CP) $(PKG_INSTALL_DIR)/usr/include/libintl.h $(1)/usr/lib/libintl-full/include/
164
165 $(INSTALL_DIR) $(1)/usr/lib/libintl-full/lib
166 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libintl.{a,so*} $(1)/usr/lib/libintl-full/lib/
167
168 $(INSTALL_DIR) $(1)/usr/share/aclocal
169 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(1)/usr/share/aclocal/
170
171 $(SED) '/read dummy/d' $(STAGING_DIR_HOSTPKG)/bin/gettextize
172 endef
173
174 define Host/Install
175 $(call Host/Compile/Default,install SUBDIRS='$(PKG_SUBDIRS)')
176 $(LN) msgfmt $(STAGING_DIR_HOSTPKG)/bin/gmsgfmt
177 endef
178
179 define Build/Install
180 $(call Build/Install/Default,install SUBDIRS='$(PKG_SUBDIRS)')
181 endef
182
183 define Package/libintl-full/install
184 $(INSTALL_DIR) $(1)/usr/lib
185 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libintl.so.* $(1)/usr/lib/
186 endef
187
188 $(eval $(call HostBuild))
189 $(eval $(call BuildPackage,libintl-full))