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
:=fe10c37353213d78a5b83d48af231e005c4da84db5ce88037d88355938259640
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 libiconv-full
/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-libiconv-prefix
=$(STAGING_DIR_HOSTPKG
) \
105 --with-libunistring-prefix
=$(STAGING_DIR_HOSTPKG
) \
106 --with-libxml2-prefix
=$(STAGING_DIR_HOSTPKG
)
108 HOST_CONFIGURE_VARS
+= \
111 HOST_CFLAGS
+= $(HOST_FPIC
)
113 define Host
/Bootstrap
115 cd
$(HOST_BUILD_DIR
); \
122 $(call Host
/Prepare
/Default
)
123 $(if
$(QUILT
),,$(call Host
/Bootstrap
))
126 define Host
/Configure
127 $(if
$(QUILT
),$(call Host
/Bootstrap
))
128 $(call Host
/Configure
/Default
)
132 $(foreach makefile
,$(PKG_MAKEFILES_FAKE
),printf
'%s\n%s\n' 'all:' 'install:' > $(HOST_BUILD_DIR
)/$(makefile
); )
133 $(call Host
/Compile
/Default
,SUBDIRS
='$(PKG_SUBDIRS)')
136 define Build
/Bootstrap
138 cd
$(PKG_BUILD_DIR
); \
145 $(call Build
/Prepare
/Default
)
146 $(if
$(QUILT
),,$(call Build
/Bootstrap
))
149 define Build
/Configure
150 $(if
$(QUILT
),$(call Build
/Bootstrap
))
151 $(call Build
/Configure
/Default
)
155 $(foreach makefile
,$(PKG_MAKEFILES_FAKE
),printf
'%s\n%s\n' 'all:' 'install:' > $(PKG_BUILD_DIR
)/$(makefile
); )
156 $(call Build
/Compile
/Default
,SUBDIRS
='$(PKG_SUBDIRS)')
159 define Build
/InstallDev
160 $(INSTALL_DIR
) $(1)/usr
/lib
/libintl-full
/include
161 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/libintl.h
$(1)/usr
/lib
/libintl-full
/include/
163 $(INSTALL_DIR
) $(1)/usr
/lib
/libintl-full
/lib
164 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libintl.
{a
,so
*} $(1)/usr
/lib
/libintl-full
/lib
/
166 $(INSTALL_DIR
) $(1)/usr
/share
/aclocal
167 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/share
/aclocal
/* $(1)/usr
/share
/aclocal
/
169 $(SED
) '/read dummy/d' $(STAGING_DIR_HOSTPKG
)/bin
/gettextize
173 $(call Host
/Compile
/Default
,install SUBDIRS
='$(PKG_SUBDIRS)')
174 $(LN
) msgfmt
$(STAGING_DIR_HOSTPKG
)/bin
/gmsgfmt
178 $(call Build
/Install
/Default
,install SUBDIRS
='$(PKG_SUBDIRS)')
181 define Package
/libintl-full
/install
182 $(INSTALL_DIR
) $(1)/usr
/lib
183 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libintl.so.
* $(1)/usr
/lib
/
186 $(eval
$(call HostBuild
))
187 $(eval
$(call BuildPackage
,libintl-full
))