ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / package / libs / gettext-full / Makefile
index abe311fe6971f246e94640435d888f1e699791d5..eb5b6d31bd2c52c27bf2fd8f883978b5c40e0c07 100644 (file)
@@ -8,22 +8,56 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gettext-full
-PKG_VERSION:=0.19.6
-PKG_RELEASE:=3
+PKG_VERSION:=0.21.1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=gettext-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/gettext
-PKG_MD5SUM:=69d79254ee3b41df23f41c2f4fd720d9
+PKG_HASH:=50dbc8f39797950aa2c98e939947c527e5ac9ebd2c1b99dd7b06ba33a6767ae6
 PKG_BUILD_DIR:=$(BUILD_DIR)/gettext-$(PKG_VERSION)
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/gettext-$(PKG_VERSION)
 
 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
-PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE:=GPL-3.0-or-later
+PKG_CPE_ID:=cpe:/a:gnu:gettext
 
-PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
+PKG_BUILD_DEPENDS:=gettext-full/host libunistring libxml2
 PKG_BUILD_PARALLEL:=0
-PKG_BUILD_DEPENDS:=gettext-full/host
+
+PKG_FIXUP:=autoreconf
+
+HOST_BUILD_DEPENDS:=gperf/host libunistring/host libxml2/host
+HOST_BUILD_PARALLEL:=0
+
+PKG_SUBDIRS:= \
+       $$$$(foreach dir, \
+               intl \
+               intl-csharp \
+               intl-java \
+               its \
+               gnulib-lib \
+               gnulib-local \
+               lib \
+               $$$$(SUBDIR_libasprintf) \
+               libgettextpo \
+               libgrep \
+               libtextstyle \
+               m4 \
+               misc \
+               po \
+               projects \
+               src \
+               styles \
+               gettext-runtime \
+               gettext-tools \
+       ,$$$$(wildcard $$$$(dir)) )
+
+PKG_MAKEFILES_FAKE:= \
+       gnulib-local/m4/Makefile \
+       libtextstyle/gnulib-local/Makefile \
+       libtextstyle/m4/Makefile \
+       m4/Makefile
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/host-build.mk
@@ -33,35 +67,96 @@ define Package/libintl-full
   CATEGORY:=Libraries
   TITLE:=GNU Internationalization library
   URL:=http://www.gnu.org/software/gettext/
+  ABI_VERSION:=8
 endef
 
+export GNULIB_SRCDIR:=$(HOST_GNULIB_SRCDIR)
+
 TARGET_CFLAGS += $(FPIC)
 ifneq ($(HOST_OS),Linux)
-  TARGET_CFLAGS += -I$(STAGING_DIR)/host/include
-endif
-ifdef CONFIG_USE_MUSL
-  TARGET_CFLAGS += -D__UCLIBC__
+  TARGET_CFLAGS += -I$(STAGING_DIR_HOSTPKG)/include
 endif
 
 CONFIGURE_ARGS += \
        --enable-shared \
        --enable-static \
+       --disable-libasprintf \
        --disable-rpath \
        --enable-nls \
        --disable-java \
-       --disable-native-java \
        --disable-openmp \
        --disable-curses \
        --with-included-gettext \
        --without-libintl-prefix \
        --without-libexpat-prefix \
+       --with-libunistring-prefix=$(STAGING_DIR)/usr \
+       --with-libxml2-prefix=$(STAGING_DIR) \
        --without-emacs
 
 HOST_CONFIGURE_ARGS += \
-       --with-included-libxml --without-libxml2-prefix --with-included-libcroco
+       --disable-shared \
+       --enable-static \
+       --disable-libasprintf \
+       --disable-rpath \
+       --disable-java \
+       --disable-openmp \
+       --without-emacs \
+       --with-libunistring-prefix=$(STAGING_DIR_HOSTPKG) \
+       --with-libxml2-prefix=$(STAGING_DIR_HOSTPKG)
 
 HOST_CONFIGURE_VARS += \
-       EMACS="no"
+       EMACS="no" \
+       am_cv_lib_iconv=no \
+       am_cv_func_iconv=no \
+       ac_cv_header_iconv_h=no \
+
+HOST_CFLAGS += $(HOST_FPIC)
+
+define Host/Bootstrap
+       ( \
+               cd $(HOST_BUILD_DIR); \
+               $(AM_TOOL_PATHS) \
+               ./autogen.sh \
+       )
+endef
+
+define Host/Prepare
+       $(call Host/Prepare/Default)
+       $(if $(QUILT),,$(call Host/Bootstrap))
+endef
+
+define Host/Configure
+       $(if $(QUILT),$(call Host/Bootstrap))
+       $(call Host/Configure/Default)
+endef
+
+define Host/Compile
+       $(foreach makefile,$(PKG_MAKEFILES_FAKE),printf '%s\n%s\n' 'all:' 'install:' > $(HOST_BUILD_DIR)/$(makefile); )
+       $(call Host/Compile/Default,SUBDIRS='$(PKG_SUBDIRS)')
+endef
+
+define Build/Bootstrap
+       ( \
+               cd $(PKG_BUILD_DIR); \
+               $(AM_TOOL_PATHS) \
+               ./autogen.sh \
+       )
+endef
+
+define Build/Prepare
+       $(call Build/Prepare/Default)
+       $(if $(QUILT),,$(call Build/Bootstrap))
+endef
+
+define Build/Configure
+       $(if $(QUILT),$(call Build/Bootstrap))
+       $(call Build/Configure/Default)
+endef
+
+define Build/Compile
+       $(foreach makefile,$(PKG_MAKEFILES_FAKE),printf '%s\n%s\n' 'all:' 'install:' > $(PKG_BUILD_DIR)/$(makefile); )
+       $(call Build/Compile/Default,SUBDIRS='$(PKG_SUBDIRS)')
+endef
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/lib/libintl-full/include
@@ -72,11 +167,22 @@ define Build/InstallDev
 
        $(INSTALL_DIR) $(1)/usr/share/aclocal
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(1)/usr/share/aclocal/
+
+       $(SED) '/read dummy/d' $(STAGING_DIR_HOSTPKG)/bin/gettextize
+endef
+
+define Host/Install
+       $(call Host/Compile/Default,install SUBDIRS='$(PKG_SUBDIRS)')
+       $(LN) msgfmt $(STAGING_DIR_HOSTPKG)/bin/gmsgfmt
+endef
+
+define Build/Install
+       $(call Build/Install/Default,install SUBDIRS='$(PKG_SUBDIRS)')
 endef
 
 define Package/libintl-full/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libintl.so* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libintl.so.* $(1)/usr/lib/
 endef
 
 $(eval $(call HostBuild))