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