2012-10-10 17:58:23 +00:00
|
|
|
#
|
2015-01-09 14:51:29 +00:00
|
|
|
# Copyright (C) 2006-2015 OpenWrt.org
|
2012-10-10 17:58:23 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=gettext-full
|
2024-03-06 13:35:10 +00:00
|
|
|
PKG_VERSION:=0.22.5
|
|
|
|
PKG_RELEASE:=1
|
2012-10-10 17:58:23 +00:00
|
|
|
|
2015-01-09 14:51:29 +00:00
|
|
|
PKG_SOURCE:=gettext-$(PKG_VERSION).tar.xz
|
2012-10-10 17:58:23 +00:00
|
|
|
PKG_SOURCE_URL:=@GNU/gettext
|
2024-03-06 13:35:10 +00:00
|
|
|
PKG_HASH:=fe10c37353213d78a5b83d48af231e005c4da84db5ce88037d88355938259640
|
2012-10-10 17:58:23 +00:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/gettext-$(PKG_VERSION)
|
|
|
|
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/gettext-$(PKG_VERSION)
|
|
|
|
|
2016-05-30 13:05:03 +00:00
|
|
|
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
2020-07-25 01:18:14 +00:00
|
|
|
PKG_LICENSE:=GPL-3.0-or-later
|
2017-09-28 02:55:46 +00:00
|
|
|
PKG_CPE_ID:=cpe:/a:gnu:gettext
|
2012-10-10 17:58:23 +00:00
|
|
|
|
|
|
|
PKG_INSTALL:=1
|
2023-05-13 22:53:00 +00:00
|
|
|
PKG_BUILD_DEPENDS:=gettext-full/host libunistring libxml2
|
2021-07-12 01:00:55 +00:00
|
|
|
PKG_BUILD_PARALLEL:=0
|
2023-04-17 03:20:57 +00:00
|
|
|
|
2023-06-08 06:34:13 +00:00
|
|
|
PKG_FIXUP:=autoreconf
|
|
|
|
|
2024-03-07 08:31:34 +00:00
|
|
|
HOST_BUILD_DEPENDS:=gperf/host libiconv-full/host libunistring/host libxml2/host
|
2021-07-12 01:00:55 +00:00
|
|
|
HOST_BUILD_PARALLEL:=0
|
2012-10-10 17:58:23 +00:00
|
|
|
|
2023-04-15 23:54:43 +00:00
|
|
|
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
|
|
|
|
|
2012-10-10 17:58:23 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
include $(INCLUDE_DIR)/host-build.mk
|
|
|
|
|
|
|
|
define Package/libintl-full
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=GNU Internationalization library
|
|
|
|
URL:=http://www.gnu.org/software/gettext/
|
2019-01-22 18:17:32 +00:00
|
|
|
ABI_VERSION:=8
|
2012-10-10 17:58:23 +00:00
|
|
|
endef
|
|
|
|
|
2023-04-16 22:32:14 +00:00
|
|
|
export GNULIB_SRCDIR:=$(HOST_GNULIB_SRCDIR)
|
|
|
|
|
2012-10-10 17:58:23 +00:00
|
|
|
TARGET_CFLAGS += $(FPIC)
|
2013-07-06 14:49:20 +00:00
|
|
|
ifneq ($(HOST_OS),Linux)
|
2017-01-10 17:43:57 +00:00
|
|
|
TARGET_CFLAGS += -I$(STAGING_DIR_HOSTPKG)/include
|
2013-07-06 14:49:20 +00:00
|
|
|
endif
|
2012-10-10 17:58:23 +00:00
|
|
|
|
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--enable-shared \
|
|
|
|
--enable-static \
|
2016-10-12 14:14:45 +00:00
|
|
|
--disable-libasprintf \
|
2012-10-10 17:58:23 +00:00
|
|
|
--disable-rpath \
|
|
|
|
--enable-nls \
|
|
|
|
--disable-java \
|
|
|
|
--disable-openmp \
|
2016-05-10 14:01:38 +00:00
|
|
|
--disable-curses \
|
2012-10-10 17:58:23 +00:00
|
|
|
--with-included-gettext \
|
|
|
|
--without-libintl-prefix \
|
|
|
|
--without-libexpat-prefix \
|
2023-05-13 22:53:00 +00:00
|
|
|
--with-libunistring-prefix=$(STAGING_DIR)/usr \
|
2023-04-16 15:04:31 +00:00
|
|
|
--with-libxml2-prefix=$(STAGING_DIR) \
|
2012-10-10 17:58:23 +00:00
|
|
|
--without-emacs
|
|
|
|
|
2012-11-28 21:02:53 +00:00
|
|
|
HOST_CONFIGURE_ARGS += \
|
2016-12-12 12:20:58 +00:00
|
|
|
--disable-shared \
|
|
|
|
--enable-static \
|
2016-10-12 14:14:45 +00:00
|
|
|
--disable-libasprintf \
|
|
|
|
--disable-rpath \
|
|
|
|
--disable-java \
|
|
|
|
--disable-openmp \
|
|
|
|
--without-emacs \
|
2024-03-07 08:31:34 +00:00
|
|
|
--with-libiconv-prefix=$(STAGING_DIR_HOSTPKG) \
|
2023-05-13 22:53:00 +00:00
|
|
|
--with-libunistring-prefix=$(STAGING_DIR_HOSTPKG) \
|
2023-04-16 15:04:31 +00:00
|
|
|
--with-libxml2-prefix=$(STAGING_DIR_HOSTPKG)
|
2016-10-12 14:14:45 +00:00
|
|
|
|
2016-05-30 13:05:03 +00:00
|
|
|
HOST_CONFIGURE_VARS += \
|
2017-01-11 02:44:51 +00:00
|
|
|
EMACS="no" \
|
2016-05-30 13:05:03 +00:00
|
|
|
|
2018-08-07 15:46:42 +00:00
|
|
|
HOST_CFLAGS += $(HOST_FPIC)
|
|
|
|
|
2023-04-16 22:32:14 +00:00
|
|
|
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
|
|
|
|
|
2023-04-15 23:54:43 +00:00
|
|
|
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
|
|
|
|
|
2023-04-16 22:32:14 +00:00
|
|
|
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
|
|
|
|
|
2023-04-15 23:54:43 +00:00
|
|
|
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
|
|
|
|
|
2012-10-10 17:58:23 +00:00
|
|
|
define Build/InstallDev
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/libintl-full/include
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/libintl.h $(1)/usr/lib/libintl-full/include/
|
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/libintl-full/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libintl.{a,so*} $(1)/usr/lib/libintl-full/lib/
|
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/share/aclocal
|
|
|
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(1)/usr/share/aclocal/
|
2016-10-12 14:14:45 +00:00
|
|
|
|
2017-01-10 17:43:57 +00:00
|
|
|
$(SED) '/read dummy/d' $(STAGING_DIR_HOSTPKG)/bin/gettextize
|
2012-10-10 17:58:23 +00:00
|
|
|
endef
|
|
|
|
|
2022-03-25 13:03:53 +00:00
|
|
|
define Host/Install
|
2023-04-15 23:54:43 +00:00
|
|
|
$(call Host/Compile/Default,install SUBDIRS='$(PKG_SUBDIRS)')
|
2022-03-25 13:03:53 +00:00
|
|
|
$(LN) msgfmt $(STAGING_DIR_HOSTPKG)/bin/gmsgfmt
|
|
|
|
endef
|
|
|
|
|
2023-04-15 23:54:43 +00:00
|
|
|
define Build/Install
|
|
|
|
$(call Build/Install/Default,install SUBDIRS='$(PKG_SUBDIRS)')
|
|
|
|
endef
|
|
|
|
|
2012-10-10 17:58:23 +00:00
|
|
|
define Package/libintl-full/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2019-01-22 18:17:32 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libintl.so.* $(1)/usr/lib/
|
2012-10-10 17:58:23 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call HostBuild))
|
|
|
|
$(eval $(call BuildPackage,libintl-full))
|