2 # Copyright (C) 2006-2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
10 PKG_NAME
:=gettext-full
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
)
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
25 PKG_BUILD_DEPENDS
:=gettext-full
/host libunistring libxml2
30 HOST_BUILD_DEPENDS
:=gperf
/host libunistring
/host libxml2
/host
31 HOST_BUILD_PARALLEL
:=0
42 $$$$(SUBDIR_libasprintf
) \
54 ,$$$$(wildcard $$$$(dir)) )
56 PKG_MAKEFILES_FAKE
:= \
57 gnulib-local
/m4
/Makefile \
58 libtextstyle
/gnulib-local
/Makefile \
59 libtextstyle
/m4
/Makefile \
62 include $(INCLUDE_DIR
)/package.mk
63 include $(INCLUDE_DIR
)/host-build.mk
65 define Package
/libintl-full
68 TITLE
:=GNU Internationalization library
69 URL
:=http
://www.gnu.org
/software
/gettext
/
73 export GNULIB_SRCDIR
:=$(HOST_GNULIB_SRCDIR
)
75 TARGET_CFLAGS
+= $(FPIC
)
76 ifneq ($(HOST_OS
),Linux
)
77 TARGET_CFLAGS
+= -I
$(STAGING_DIR_HOSTPKG
)/include
83 --disable-libasprintf \
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
) \
96 HOST_CONFIGURE_ARGS
+= \
99 --disable-libasprintf \
104 --with-libunistring-prefix
=$(STAGING_DIR_HOSTPKG
) \
105 --with-libxml2-prefix
=$(STAGING_DIR_HOSTPKG
)
107 HOST_CONFIGURE_VARS
+= \
110 am_cv_func_iconv
=no \
111 ac_cv_header_iconv_h
=no \
113 HOST_CFLAGS
+= $(HOST_FPIC
)
115 define Host
/Bootstrap
117 cd
$(HOST_BUILD_DIR
); \
124 $(call Host
/Prepare
/Default
)
125 $(if
$(QUILT
),,$(call Host
/Bootstrap
))
128 define Host
/Configure
129 $(if
$(QUILT
),$(call Host
/Bootstrap
))
130 $(call Host
/Configure
/Default
)
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)')
138 define Build
/Bootstrap
140 cd
$(PKG_BUILD_DIR
); \
147 $(call Build
/Prepare
/Default
)
148 $(if
$(QUILT
),,$(call Build
/Bootstrap
))
151 define Build
/Configure
152 $(if
$(QUILT
),$(call Build
/Bootstrap
))
153 $(call Build
/Configure
/Default
)
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)')
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/
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
/
168 $(INSTALL_DIR
) $(1)/usr
/share
/aclocal
169 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/share
/aclocal
/* $(1)/usr
/share
/aclocal
/
171 $(SED
) '/read dummy/d' $(STAGING_DIR_HOSTPKG
)/bin
/gettextize
175 $(call Host
/Compile
/Default
,install SUBDIRS
='$(PKG_SUBDIRS)')
176 $(LN
) msgfmt
$(STAGING_DIR_HOSTPKG
)/bin
/gmsgfmt
180 $(call Build
/Install
/Default
,install SUBDIRS
='$(PKG_SUBDIRS)')
183 define Package
/libintl-full
/install
184 $(INSTALL_DIR
) $(1)/usr
/lib
185 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libintl.so.
* $(1)/usr
/lib
/
188 $(eval
$(call HostBuild
))
189 $(eval
$(call BuildPackage
,libintl-full
))