d410fea50844fa83060dfc2c1fdc0c68a326044c
[openwrt.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.6
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=gettext-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=@GNU/gettext
16 PKG_MD5SUM:=69d79254ee3b41df23f41c2f4fd720d9
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 <jow@openwrt.org>
21 PKG_LICENSE:=GPL-3.0+
22
23 PKG_FIXUP:=autoreconf
24 PKG_INSTALL:=1
25 PKG_BUILD_PARALLEL:=0
26 PKG_BUILD_DEPENDS:=gettext-full/host
27
28 include $(INCLUDE_DIR)/package.mk
29 include $(INCLUDE_DIR)/host-build.mk
30
31 define Package/libintl-full
32   SECTION:=libs
33   CATEGORY:=Libraries
34   TITLE:=GNU Internationalization library
35   URL:=http://www.gnu.org/software/gettext/
36 endef
37
38 TARGET_CFLAGS += $(FPIC)
39 ifneq ($(HOST_OS),Linux)
40   TARGET_CFLAGS += -I$(STAGING_DIR)/host/include
41 endif
42 ifdef CONFIG_USE_MUSL
43   TARGET_CFLAGS += -D__UCLIBC__
44 endif
45
46 CONFIGURE_ARGS += \
47         --enable-shared \
48         --enable-static \
49         --disable-rpath \
50         --enable-nls \
51         --disable-java \
52         --disable-native-java \
53         --disable-openmp \
54         --with-included-gettext \
55         --without-libintl-prefix \
56         --without-libexpat-prefix \
57         --without-emacs
58
59 HOST_CONFIGURE_ARGS += \
60         --with-included-libxml --without-libxml2-prefix --with-included-libcroco
61
62 define Build/InstallDev
63         $(INSTALL_DIR) $(1)/usr/lib/libintl-full/include
64         $(CP) $(PKG_INSTALL_DIR)/usr/include/libintl.h $(1)/usr/lib/libintl-full/include/
65
66         $(INSTALL_DIR) $(1)/usr/lib/libintl-full/lib
67         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libintl.{a,so*} $(1)/usr/lib/libintl-full/lib/
68
69         $(INSTALL_DIR) $(1)/usr/share/aclocal
70         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(1)/usr/share/aclocal/
71 endef
72
73 define Package/libintl-full/install
74         $(INSTALL_DIR) $(1)/usr/lib
75         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libintl.so* $(1)/usr/lib/
76 endef
77
78 $(eval $(call HostBuild))
79 $(eval $(call BuildPackage,libintl-full))