4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
23 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
24 # Copyright 2017 Gary Mills
25 # Copyright 2017 Aurelien Larcher
26 # Copyright 2019 Michal Nowak
27 # Copyright 2020-2021 Nona Hansel
31 USE_PARALLEL_BUILD
= yes
32 USE_DEFAULT_TEST_TRANSFORMS
= yes
33 USE_COMMON_TEST_MASTER
= no
34 include ..
/..
/..
/make-rules
/shared-macros.mk
36 COMPONENT_NAME
= coreutils
37 COMPONENT_VERSION
= 9.6
38 COMPONENT_SUMMARY
= GNU Core Utilities are the basic file
, shell and text manipulation utilities
39 COMPONENT_PROJECT_URL
= https
://www.gnu.org
/software
/coreutils
/
40 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(COMPONENT_VERSION
)
41 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.xz
42 COMPONENT_ARCHIVE_HASH
= sha256
:7a0124327b398fd9eb1a6abde583389821422c744ffa10734b24f557610d3283
43 COMPONENT_ARCHIVE_URL
= https
://ftp.gnu.org
/gnu
/coreutils
/$(COMPONENT_ARCHIVE
)
44 COMPONENT_FMRI
= file
/gnu-coreutils
45 COMPONENT_CLASSIFICATION
=Applications
/System Utilities
46 COMPONENT_LICENSE
= GPL-3.0
-only
47 COMPONENT_LICENSE_FILE
= COPYING
49 include $(WS_MAKE_RULES
)/common.mk
51 gcc_OPT.sparc
.32 = -O1
53 CFLAGS
+= $(CPP_LARGEFILES
)
55 CONFIGURE_PREFIX
= $(GNUDIR
)
56 CONFIGURE_BINDIR
.64 = $(GNUBIN
)
57 CONFIGURE_OPTIONS
+= CPPFLAGS
=" -I$(USRINCDIR)/gmp"
58 CONFIGURE_OPTIONS
+= --libdir=$(USRLIBDIR.
$(BITS
))
59 # Put libstdbuf in the library directory
60 CONFIGURE_OPTIONS
+= --libexecdir
=$(USRLIBDIR.
$(BITS
))
61 CONFIGURE_OPTIONS
.32 += --disable-year2038
62 # chcon and runcon are linux only
63 CONFIGURE_OPTIONS
+= --enable-no-install-program
=chcon
,runcon
65 # Enable ASLR for this component
66 ASLR_MODE
= $(ASLR_ENABLE
)
68 # OS as reported by `uname -o`
69 CONFIGURE_ENV
+= gl_cv_host_operating_system
=illumos
71 # Drop 32-bit binaries
72 COMPONENT_POST_INSTALL_ACTION
.32 += $(RM
) -r
$(PROTOGNUBIN32
) ;
73 # Drop info files installed for 32-bit build
74 COMPONENT_POST_INSTALL_ACTION
.32 += $(RM
) -r
$(PROTOUSRSHAREDIR
)/info ;
75 # Drop man pages installed for 32-bit build
76 COMPONENT_POST_INSTALL_ACTION
.32 += $(RM
) -r
$(PROTOGNUSHAREMAN
) ;
77 # Drop locale installed for 32-bit build
78 COMPONENT_POST_INSTALL_ACTION
.32 += $(RM
) -r
$(PROTOGNUSHARE
)/locale
;
80 # We do not want the info index file
81 COMPONENT_POST_INSTALL_ACTION
+= $(RM
) $(PROTOUSRSHAREDIR
)/info/dir ;
83 # Move some non-conflicting binaries and their manpages to default location
84 # /usr/bin or /usr/share/man respectively.
85 COMPONENT_POST_INSTALL_ACTION
.64 += \
86 $(MKDIR
) $(PROTOUSRBINDIR
) ; \
87 $(MKDIR
) $(PROTOUSRSHAREMAN1DIR
) ; \
88 for f in b2sum base32 base64
dir dircolors md5sum pinky printenv ptx \
89 readlink realpath seq sha1sum sha224sum sha256sum sha384sum sha512sum \
90 shred shuf stat stdbuf tac timeout truncate vdir whoami
; do \
91 $(MV
) $(PROTOGNUBIN
)/$$f $(PROTOUSRBINDIR
) ; \
92 $(MV
) $(PROTOGNUSHAREMAN1
)/$$f.1 $(PROTOUSRSHAREMAN1DIR
) ; \
95 # Compatibility symlinks for binaries and their manpages
96 COMPONENT_POST_INSTALL_ACTION
.64 += \
97 for f in
$$(ls
$(PROTOGNUBIN
)) ; do \
98 [ "$$f" == "[" ] && continue
; \
99 [ "$$f" == "nproc" ] && continue
; \
100 [ "$$f" == "numfmt" ] && continue
; \
101 [ "$$f" == "users" ] && continue
; \
102 $(SYMLINK
) ..
/gnu
/bin
/$$f $(PROTOUSRBINDIR
)/g
$$f ; \
103 $(SYMLINK
) ..
/..
/..
/gnu
/share
/man
/man1
/$$f.1 $(PROTOUSRSHAREMAN1DIR
)/g
$$f.1 ; \
106 # We want the libstdbuf.so library at default location
107 COMPONENT_POST_INSTALL_ACTION
+= $(MV
) $(PROTOUSRLIBDIR.
$(BITS
))/coreutils
/libstdbuf.so
$(PROTOUSRLIBDIR.
$(BITS
)) ;
109 # Get the binaries to test from the component proto area.
110 COMPONENT_TEST_ENV
+= PATH
=$(PROTOGNUBIN
):$(USRBINDIR
)
112 # Auto-generated dependencies
113 REQUIRED_PACKAGES
+= library
/gmp
114 REQUIRED_PACKAGES
+= system
/library