16 # fields enclosed by brackets "[]" replaced with your own identifying |
16 # fields enclosed by brackets "[]" replaced with your own identifying |
17 # information: Portions Copyright [yyyy] [name of copyright owner] |
17 # information: Portions Copyright [yyyy] [name of copyright owner] |
18 # |
18 # |
19 # CDDL HEADER END |
19 # CDDL HEADER END |
20 # |
20 # |
21 # Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. |
21 |
22 # |
22 # |
23 |
23 # Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. |
|
24 # |
|
25 BUILD_BITS= 64 |
24 include ../../make-rules/shared-macros.mk |
26 include ../../make-rules/shared-macros.mk |
25 |
27 |
26 COMPONENT_NAME= text-utilities |
28 COMPONENT_NAME= text-utilities |
27 COMPONENT_VERSION= 2.25.2 |
29 COMPONENT_VERSION= 2.25.2 |
28 COMPONENT_PROJECT_URL= https://www.kernel.org/pub/linux/utils/util-linux |
30 COMPONENT_PROJECT_URL= https://www.kernel.org/pub/linux/utils/util-linux |
29 COMPONENT_SRC= util-linux-$(COMPONENT_VERSION) |
31 COMPONENT_SRC= util-linux-$(COMPONENT_VERSION) |
30 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz |
32 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz |
31 COMPONENT_ARCHIVE_HASH= \ |
33 COMPONENT_ARCHIVE_HASH= \ |
32 sha256:e0457f715b73f4a349e1acb08cb410bf0edc9a74a3f75c357070f31f70e33cd6 |
34 sha256:e0457f715b73f4a349e1acb08cb410bf0edc9a74a3f75c357070f31f70e33cd6 |
33 COMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)/v2.25/$(COMPONENT_ARCHIVE) |
35 COMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)/v2.25/$(COMPONENT_ARCHIVE) |
34 COMPONENT_BUGDB= utility/text-utilities |
|
35 |
36 |
36 TPNO= 21750 |
37 TPNO= 21750 |
37 |
38 |
38 include $(WS_MAKE_RULES)/prep.mk |
39 TEST_TARGET= install $(TEST_64) |
39 include $(WS_MAKE_RULES)/configure.mk |
40 SYSTEM_TEST_TARGET= configure $(SYSTEM_TEST_64) |
40 include $(WS_MAKE_RULES)/ips.mk |
41 include $(WS_MAKE_RULES)/common.mk |
41 |
42 |
42 # We currently only want some of the text-utils text utilities from this |
43 # We currently only want some of the text-utils text utilities from this |
43 # component, so enumerate it in a macro that we can use for build and install. |
44 # component, so enumerate it in a macro that we can use for build and install. |
44 # Anything else that we want should be added to this macro in the future. |
45 # Anything else that we want should be added to this macro in the future. |
45 PROGRAMS = colcrt colrm column hexdump rev tailf |
46 PROGRAMS = colcrt colrm column hexdump rev tailf |
48 PROGRAMS += test_sysinfo |
49 PROGRAMS += test_sysinfo |
49 |
50 |
50 # Limit translations to the text utilities (and lib/* and include/* ) only. |
51 # Limit translations to the text utilities (and lib/* and include/* ) only. |
51 COMPONENT_PRE_INSTALL_ACTION = \ |
52 COMPONENT_PRE_INSTALL_ACTION = \ |
52 (cd $(@D)/po ; $(GMAKE) text-utilities.pot-update) |
53 (cd $(@D)/po ; $(GMAKE) text-utilities.pot-update) |
53 |
|
54 CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" |
|
55 CONFIGURE_OPTIONS += --bindir=$(CONFIGURE_BINDIR.32) |
|
56 |
54 |
57 # We don't need the Python bindings built. |
55 # We don't need the Python bindings built. |
58 CONFIGURE_OPTIONS += --without-python |
56 CONFIGURE_OPTIONS += --without-python |
59 |
57 |
60 # Makefile incorrectly includes gcc(1) '-fsigned-char' in AM_CFLAGS, so we |
58 # Makefile incorrectly includes gcc(1) '-fsigned-char' in AM_CFLAGS, so we |
74 |
72 |
75 # Install the message files. |
73 # Install the message files. |
76 COMPONENT_POST_INSTALL_ACTION = \ |
74 COMPONENT_POST_INSTALL_ACTION = \ |
77 (cd $(@D)/po ; $(GMAKE) $(COMPONENT_INSTALL_ARGS) install) |
75 (cd $(@D)/po ; $(GMAKE) $(COMPONENT_INSTALL_ARGS) install) |
78 |
76 |
79 ASLR_MODE = $(ASLR_ENABLE) |
77 COMPONENT_TEST_ENV += TS_CMD_COLRM=$(PROTOUSRBINDIR)/colrm |
80 |
78 COMPONENT_TEST_ENV += TS_CMD_COLUMN=$(PROTOUSRBINDIR)/column |
81 COMPONENT_TEST_ENV += TS_CMD_COLRM=$(PROTO_DIR)/usr/bin/colrm |
79 COMPONENT_TEST_ENV += TS_CMD_HEXDUMP=$(PROTOUSRBINDIR)/hexdump |
82 COMPONENT_TEST_ENV += TS_CMD_COLUMN=$(PROTO_DIR)/usr/bin/column |
80 COMPONENT_TEST_ENV += TS_CMD_TAILF=$(PROTOUSRBINDIR)/tailf |
83 COMPONENT_TEST_ENV += TS_CMD_HEXDUMP=$(PROTO_DIR)/usr/bin/hexdump |
|
84 COMPONENT_TEST_ENV += TS_CMD_TAILF=$(PROTO_DIR)/usr/bin/tailf |
|
85 COMPONENT_TEST_ENV += PATH="$(GNUBIN):$(PATH)" |
81 COMPONENT_TEST_ENV += PATH="$(GNUBIN):$(PATH)" |
86 COMPONENT_TEST_DIR = $(COMPONENT_SRC)/tests |
82 COMPONENT_TEST_DIR = $(COMPONENT_SRC)/tests |
87 |
83 |
88 # The hexdump tests expect the test_sysinfo program in a different location |
84 # The hexdump tests expect the test_sysinfo program in a different location |
89 # than where it's built. |
85 # than where it's built. |
91 |
87 |
92 COMPONENT_TEST_CMD = ./run.sh |
88 COMPONENT_TEST_CMD = ./run.sh |
93 COMPONENT_TEST_ARGS = --verbose |
89 COMPONENT_TEST_ARGS = --verbose |
94 COMPONENT_TEST_TARGETS = colrm column hexdump tailf |
90 COMPONENT_TEST_TARGETS = colrm column hexdump tailf |
95 |
91 |
96 COMPONENT_SYSTEM_TEST_ENV += TS_CMD_COLRM=/usr/bin/colrm |
92 COMPONENT_SYSTEM_TEST_ENV += TS_CMD_COLRM=$(USRBINDIR)/colrm |
97 COMPONENT_SYSTEM_TEST_ENV += TS_CMD_COLUMN=/usr/bin/column |
93 COMPONENT_SYSTEM_TEST_ENV += TS_CMD_COLUMN=$(USRBINDIR)/column |
98 COMPONENT_SYSTEM_TEST_ENV += TS_CMD_HEXDUMP=/usr/bin/hexdump |
94 COMPONENT_SYSTEM_TEST_ENV += TS_CMD_HEXDUMP=$(USRBINDIR)/hexdump |
99 COMPONENT_SYSTEM_TEST_ENV += TS_CMD_TAILF=/usr/bin/tailf |
95 COMPONENT_SYSTEM_TEST_ENV += TS_CMD_TAILF=$(USRBINDIR)/tailf |
100 COMPONENT_SYSTEM_TEST_ENV += PATH="$(GNUBIN):$(PATH)" |
96 COMPONENT_SYSTEM_TEST_ENV += PATH="$(GNUBIN):$(PATH)" |
101 COMPONENT_SYSTEM_TEST_DIR = $(COMPONENT_SRC)/tests |
97 COMPONENT_SYSTEM_TEST_DIR = $(COMPONENT_SRC)/tests |
102 |
98 |
103 # Build the test_sysinfo program; copy it where the tests are looking for it. |
99 # Build the test_sysinfo program; copy it where the tests are looking for it. |
104 COMPONENT_PRE_SYSTEM_TEST_ACTION = \ |
100 COMPONENT_PRE_SYSTEM_TEST_ACTION = \ |
107 $(CP) test_sysinfo $(SOURCE_DIR)) |
103 $(CP) test_sysinfo $(SOURCE_DIR)) |
108 |
104 |
109 COMPONENT_SYSTEM_TEST_CMD = ./run.sh |
105 COMPONENT_SYSTEM_TEST_CMD = ./run.sh |
110 COMPONENT_SYSTEM_TEST_ARGS = --verbose |
106 COMPONENT_SYSTEM_TEST_ARGS = --verbose |
111 COMPONENT_SYSTEM_TEST_TARGETS = colrm column hexdump tailf |
107 COMPONENT_SYSTEM_TEST_TARGETS = colrm column hexdump tailf |
112 |
|
113 configure: $(CONFIGURE_64) |
|
114 |
|
115 build: $(BUILD_64) |
|
116 |
|
117 install: $(INSTALL_64) |
|
118 |
|
119 test: install $(TEST_64) |
|
120 |
|
121 system-test: configure $(SYSTEM_TEST_64) |
|
122 |
|
123 REQUIRED_PACKAGES += system/library |
|