toolchain: add PKG_RELEASE if local files
[openwrt/staging/wigyori.git] / package / libs / gettext-full / Makefile
1 #
2 # Copyright (C) 2006-2015 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=gettext-full
11 PKG_VERSION:=0.19.8.1
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=gettext-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=@GNU/gettext
16 PKG_HASH:=105556dbc5c3fbbc2aa0edb46d22d055748b6f5c7cd7a8d99f8e7eb84e938be4
17 PKG_BUILD_DIR:=$(BUILD_DIR)/gettext-$(PKG_VERSION)
18 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/gettext-$(PKG_VERSION)
19
20 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
21 PKG_LICENSE:=GPL-3.0+
22 PKG_CPE_ID:=cpe:/a:gnu:gettext
23
24 PKG_FIXUP:=autoreconf
25 PKG_INSTALL:=1
26 PKG_BUILD_PARALLEL:=0
27 PKG_BUILD_DEPENDS:=gettext-full/host
28
29 include $(INCLUDE_DIR)/package.mk
30 include $(INCLUDE_DIR)/host-build.mk
31
32 define Package/libintl-full
33 SECTION:=libs
34 CATEGORY:=Libraries
35 TITLE:=GNU Internationalization library
36 URL:=http://www.gnu.org/software/gettext/
37 ABI_VERSION:=8
38 endef
39
40 TARGET_CFLAGS += $(FPIC)
41 ifneq ($(HOST_OS),Linux)
42 TARGET_CFLAGS += -I$(STAGING_DIR_HOSTPKG)/include
43 endif
44 ifdef CONFIG_USE_MUSL
45 TARGET_CFLAGS += -D__UCLIBC__
46 endif
47
48 CONFIGURE_ARGS += \
49 --enable-shared \
50 --enable-static \
51 --disable-libasprintf \
52 --disable-rpath \
53 --enable-nls \
54 --disable-java \
55 --disable-native-java \
56 --disable-openmp \
57 --disable-curses \
58 --with-included-gettext \
59 --without-libintl-prefix \
60 --without-libexpat-prefix \
61 --without-emacs
62
63 HOST_CONFIGURE_ARGS += \
64 --disable-shared \
65 --enable-static \
66 --disable-libasprintf \
67 --disable-rpath \
68 --disable-java \
69 --disable-native-java \
70 --disable-openmp \
71 --without-emacs \
72 --without-libxml2-prefix
73
74
75 HOST_CONFIGURE_VARS += \
76 EMACS="no" \
77 am_cv_lib_iconv=no \
78 am_cv_func_iconv=no \
79 ac_cv_header_iconv_h=no \
80
81 HOST_CFLAGS += $(HOST_FPIC)
82
83 define Build/InstallDev
84 $(INSTALL_DIR) $(1)/usr/lib/libintl-full/include
85 $(CP) $(PKG_INSTALL_DIR)/usr/include/libintl.h $(1)/usr/lib/libintl-full/include/
86
87 $(INSTALL_DIR) $(1)/usr/lib/libintl-full/lib
88 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libintl.{a,so*} $(1)/usr/lib/libintl-full/lib/
89
90 $(INSTALL_DIR) $(1)/usr/share/aclocal
91 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(1)/usr/share/aclocal/
92
93 $(SED) '/read dummy/d' $(STAGING_DIR_HOSTPKG)/bin/gettextize
94 endef
95
96 define Package/libintl-full/install
97 $(INSTALL_DIR) $(1)/usr/lib
98 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libintl.so.* $(1)/usr/lib/
99 endef
100
101 $(eval $(call HostBuild))
102 $(eval $(call BuildPackage,libintl-full))