blob: 15ee497eeaea706c58fe2255c09d2bc4fde31f75 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
#############################################################
#
# gettext
#
#############################################################
GETTEXT_SOURCE:=gettext-0.11.5.tar.gz
GETTEXT_SITE:=ftp://ftp.gnu.org/gnu/gettext
GETTEXT_DIR:=$(BUILD_DIR)/gettext-0.11.5
GETTEXT_CAT:=zcat
GETTEXT_BINARY:=src/gettext
GETTEXT_TARGET_BINARY:=usr/bin/gettext
$(DL_DIR)/$(GETTEXT_SOURCE):
$(WGET) -P $(DL_DIR) $(GETTEXT_SITE)/$(GETTEXT_SOURCE)
gettext-source: $(DL_DIR)/$(GETTEXT_SOURCE)
$(GETTEXT_DIR)/.unpacked: $(DL_DIR)/$(GETTEXT_SOURCE)
$(GETTEXT_CAT) $(DL_DIR)/$(GETTEXT_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
touch $(GETTEXT_DIR)/.unpacked
$(GETTEXT_DIR)/.configured: $(GETTEXT_DIR)/.unpacked
(cd $(GETTEXT_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
);
touch $(GETTEXT_DIR)/.configured
$(GETTEXT_DIR)/$(GETTEXT_BINARY): $(GETTEXT_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(GETTEXT_DIR)
$(STAGING_DIR)/$(GETTEXT_TARGET_BINARY): $(GETTEXT_DIR)/$(GETTEXT_BINARY)
$(MAKE) DESTDIR=$(STAGING_DIR) CC=$(TARGET_CC) -C $(GETTEXT_DIR) install
gettext: uclibc $(STAGING_DIR)/$(GETTEXT_TARGET_BINARY)
gettext-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(GETTEXT_DIR) uninstall
-$(MAKE) -C $(GETTEXT_DIR) clean
gettext-dirclean:
rm -rf $(GETTEXT_DIR)
#############################################################
#
# gettext on the target
#
#############################################################
gettext-target: $(GETTEXT_DIR)/$(GETTEXT_BINARY)
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(GETTEXT_DIR) install
chmod +x $(TARGET_DIR)/usr/lib/libintl.so.2.2.0 # identify as needing to be stipped
rm -rf $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc \
$(TARGET_DIR)/usr/doc $(TARGET_DIR)/usr/share/aclocal \
$(TARGET_DIR)/usr/include/libintl.h
-rmdir $(TARGET_DIR)/usr/include
libintl: $(TARGET_DIR)/usr/lib/libintl.so
$(TARGET_DIR)/usr/lib/libintl.so: $(STAGING_DIR)/$(GETTEXT_TARGET_BINARY)
cp -a $(STAGING_DIR)/usr/lib/libintl.so* $(TARGET_DIR)/usr/lib
touch $@
#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(strip $(BR2_PACKAGE_LIBINTL)),y)
TARGETS+=libintl
endif
ifeq ($(strip $(BR2_PACKAGE_GETTEXT)),y)
TARGETS+=gettext-target
endif
|