3666N/A#
3666N/A# CDDL HEADER START
3666N/A#
3666N/A# The contents of this file are subject to the terms of the
3666N/A# Common Development and Distribution License (the "License").
3666N/A# You may not use this file except in compliance with the License.
3666N/A#
3666N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3666N/A# or http://www.opensolaris.org/os/licensing.
3666N/A# See the License for the specific language governing permissions
3666N/A# and limitations under the License.
3666N/A#
3666N/A# When distributing Covered Code, include this CDDL HEADER in each
3666N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3666N/A# If applicable, add the following below this CDDL HEADER, with the
3666N/A# fields enclosed by brackets "[]" replaced with your own identifying
3666N/A# information: Portions Copyright [yyyy] [name of copyright owner]
3666N/A#
3666N/A# CDDL HEADER END
3666N/A#
3666N/A# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
3666N/A#
4275N/A
4275N/A# parfait fails to compile us (20889777)
4275N/Aexport PARFAIT_BUILD=no
4275N/A
3666N/Ainclude ../../make-rules/shared-macros.mk
3666N/A
3666N/ACOMPONENT_NAME= text-utilities
3666N/ACOMPONENT_VERSION= 2.24.2
3666N/ACOMPONENT_PROJECT_URL= https://www.kernel.org/pub/linux/utils/util-linux
3666N/ACOMPONENT_SRC= util-linux-$(COMPONENT_VERSION)
3666N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz
3666N/ACOMPONENT_ARCHIVE_HASH= \
3666N/A sha256:1243d6c07f1c5b38aa4c3814c81a71c24cba7dafe08942916bf216a90a460ff0
3666N/ACOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)/v2.24/$(COMPONENT_ARCHIVE)
3666N/ACOMPONENT_BUGDB= utility/text-utilities
3666N/A
3666N/ATPNO= 17825
3666N/A
3996N/Ainclude $(WS_MAKE_RULES)/prep.mk
3996N/Ainclude $(WS_MAKE_RULES)/configure.mk
3996N/Ainclude $(WS_MAKE_RULES)/ips.mk
3666N/A
3666N/A# We currently only want some of the text-utils text utilities from this
3666N/A# component, so enumerate it in a macro that we can use for build and install.
3666N/A# Anything else that we want should be added to this macro in the future.
3666N/APROGRAMS = colcrt colrm column hexdump rev tailf
3666N/A
3666N/A# Limit translations to the text utilities (and lib/* and include/* ) only.
3666N/ACOMPONENT_PRE_INSTALL_ACTION = \
3666N/A (cd $(@D)/po ; $(GMAKE) text-utilities.pot-update)
3666N/A
3666N/ACONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
3666N/ACONFIGURE_OPTIONS += --bindir=$(CONFIGURE_BINDIR.32)
3666N/A
3666N/A# Makefile incorrectly includes gcc(1) '-fsigned-char' in AM_CFLAGS, so we
3666N/A# override it.
3666N/ACOMPONENT_BUILD_ARGS += AM_CFLAGS=""
3666N/A
3666N/A# Always show the build and link lines for easier debugging.
3666N/ACOMPONENT_BUILD_ARGS += V=1
3666N/A
3666N/A# Only build the programs that we want.
3666N/ACOMPONENT_BUILD_ARGS += bin_PROGRAMS="$(PROGRAMS)"
3666N/ACOMPONENT_BUILD_TARGETS = $(PROGRAMS)
3666N/A
3666N/A# Only install the bits we want.
3666N/ACOMPONENT_INSTALL_ARGS += bin_PROGRAMS="$(PROGRAMS)"
3666N/ACOMPONENT_INSTALL_TARGETS = install-man install-binPROGRAMS
3666N/A
3666N/A# Install the message files.
3666N/ACOMPONENT_POST_INSTALL_ACTION = \
3666N/A (cd $(@D)/po ; $(GMAKE) $(COMPONENT_INSTALL_ARGS) install)
3666N/A
3666N/AASLR_MODE = $(ASLR_ENABLE)
3666N/A
3666N/ACOMPONENT_TEST_ENV += TS_CMD_COLRM=$(PROTO_DIR)/usr/bin/colrm
3666N/ACOMPONENT_TEST_ENV += TS_CMD_COLUMN=$(PROTO_DIR)/usr/bin/column
3666N/ACOMPONENT_TEST_ENV += TS_CMD_HEXDUMP=$(PROTO_DIR)/usr/bin/hexdump
3666N/ACOMPONENT_TEST_ENV += TS_CMD_TAILF=$(PROTO_DIR)/usr/bin/tailf
3666N/ACOMPONENT_TEST_ENV += PATH="$(GNUBIN):$(PATH)"
3666N/ACOMPONENT_TEST_DIR = $(COMPONENT_SRC)/tests
3666N/A
3666N/A# The given hexdump tests are little-endian specific, so the test script
3666N/A# has been adjusted to do some endian-neutral ones. Copy the input and
3666N/A# the expected results to where they are needed.
3666N/ACOMPONENT_PRE_TEST_ACTION = ( \
3666N/A $(CP) $(COMPONENT_DIR)/files/hexdump-input \
3666N/A $(COMPONENT_SRC)/tests/ts/hexdump/; \
3666N/A $(CP) $(COMPONENT_DIR)/files/hexdump-expected \
3666N/A $(COMPONENT_SRC)/tests/expected/hexdump/empty-format; )
3666N/A
3666N/A# common targets
3666N/Abuild: $(BUILD_64)
3666N/A
3666N/Ainstall: $(INSTALL_64)
3666N/A
3666N/Atest: install
3666N/A $(COMPONENT_PRE_TEST_ACTION)
3666N/A (cd $(COMPONENT_TEST_DIR) ; $(ENV) $(COMPONENT_TEST_ENV) \
3666N/A ./run.sh --verbose colrm column hexdump tailf)
3666N/A
3666N/A
3996N/AREQUIRED_PACKAGES += system/library