mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-30 02:29:01 +00:00
3a3fdd6239
Some configure scripts look for msgfmt and gmsgfmt. As we don't install
the latter, configure might pick up one from staging_dir/hostpkg, and
the other from the host:
checking for msgfmt... /home/stijn/Development/OpenWrt/openwrt/staging_dir/hostpkg/bin/msgfmt
checking for gmsgfmt... /usr/bin/gmsgfmt
This could potentially lead to hard to debug undefined behaviour.
Install a symlink in the host install phase to avoid this.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
(cherry picked from commit 636cb00ecc
)
103 lines
2.4 KiB
Makefile
103 lines
2.4 KiB
Makefile
#
|
|
# Copyright (C) 2006-2015 OpenWrt.org
|
|
#
|
|
# 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
|
|
PKG_VERSION:=0.21
|
|
PKG_RELEASE:=2
|
|
|
|
PKG_SOURCE:=gettext-$(PKG_VERSION).tar.xz
|
|
PKG_SOURCE_URL:=@GNU/gettext
|
|
PKG_HASH:=d20fcbb537e02dcf1383197ba05bd0734ef7bf5db06bdb241eb69b7d16b73192
|
|
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-or-later
|
|
PKG_CPE_ID:=cpe:/a:gnu:gettext
|
|
|
|
PKG_FIXUP:=autoreconf
|
|
PKG_INSTALL:=1
|
|
PKG_BUILD_DEPENDS:=gettext-full/host
|
|
PKG_BUILD_PARALLEL:=0
|
|
HOST_BUILD_PARALLEL:=0
|
|
|
|
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/
|
|
ABI_VERSION:=8
|
|
endef
|
|
|
|
TARGET_CFLAGS += $(FPIC)
|
|
ifneq ($(HOST_OS),Linux)
|
|
TARGET_CFLAGS += -I$(STAGING_DIR_HOSTPKG)/include
|
|
endif
|
|
|
|
CONFIGURE_ARGS += \
|
|
--enable-shared \
|
|
--enable-static \
|
|
--disable-libasprintf \
|
|
--disable-rpath \
|
|
--enable-nls \
|
|
--disable-java \
|
|
--disable-openmp \
|
|
--disable-curses \
|
|
--with-included-gettext \
|
|
--without-libintl-prefix \
|
|
--without-libexpat-prefix \
|
|
--without-emacs
|
|
|
|
HOST_CONFIGURE_ARGS += \
|
|
--disable-shared \
|
|
--enable-static \
|
|
--disable-libasprintf \
|
|
--disable-rpath \
|
|
--disable-java \
|
|
--disable-openmp \
|
|
--without-emacs \
|
|
--without-libxml2-prefix
|
|
|
|
HOST_CONFIGURE_VARS += \
|
|
EMACS="no" \
|
|
am_cv_lib_iconv=no \
|
|
am_cv_func_iconv=no \
|
|
ac_cv_header_iconv_h=no \
|
|
|
|
HOST_CFLAGS += $(HOST_FPIC)
|
|
|
|
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/
|
|
|
|
$(SED) '/read dummy/d' $(STAGING_DIR_HOSTPKG)/bin/gettextize
|
|
endef
|
|
|
|
define Host/Install
|
|
$(call Host/Install/Default)
|
|
$(LN) msgfmt $(STAGING_DIR_HOSTPKG)/bin/gmsgfmt
|
|
endef
|
|
|
|
define Package/libintl-full/install
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libintl.so.* $(1)/usr/lib/
|
|
endef
|
|
|
|
$(eval $(call HostBuild))
|
|
$(eval $(call BuildPackage,libintl-full))
|