/
Portfile
115 lines (89 loc) · 4.12 KB
/
Portfile
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup compiler_blacklist_versions 1.0
name coreutils
conflicts gexpr coreutils-devel
set my_name coreutils
version 9.1
revision 0
categories sysutils
platforms darwin
license GPL-3+
installs_libs no
maintainers {mascguy @mascguy} openmaintainer
description GNU File, Shell, and Text utilities
long_description \
The GNU Core Utilities are the basic file, shell, and text \
manipulation utilities of the GNU operating system. These are the \
core utilities which are expected to exist on every operating \
system. Previously these utilities were offered as three individual \
sets of GNU utilities, fileutils, shellutils, and textutils. Those \
three have been combined into a single set of utilities called the \
coreutils.
homepage https://www.gnu.org/software/${my_name}/
master_sites gnu:${my_name}
distname ${my_name}-${version}
dist_subdir ${my_name}
use_xz yes
checksums rmd160 c240beab8617b8530aca797f591ee1809c4cbf49 \
sha256 61a1f410d78ba7e7f37a5a4f50e6d1320aca33375484a3255eddf17a38580423 \
size 5712104
depends_build-append \
port:gettext
depends_lib-append \
port:gettext-runtime \
port:gmp \
port:libiconv
# Fix issues with older Clang releases
compiler.blacklist-append \
{clang < 900}
configure.args-append \
--disable-silent-rules \
--program-prefix=g
# Bypass year 2038 awareness code that causes the universal variant to fail.
configure.args-append \
TIME_T_32_BIT_OK=yes
# Whether deliberately or not, some users run MacPorts as root without privilege dropping.
configure.env-append \
FORCE_UNSAFE_CONFIGURE=1
post-destroot {
if {[file exists ${destroot}${prefix}/share/info/dir]} {
delete ${destroot}${prefix}/share/info/dir
}
if {[file exists ${destroot}${prefix}/lib/charset.alias]} {
delete ${destroot}${prefix}/lib/charset.alias
}
set docdir ${prefix}/share/doc/${my_name}
xinstall -d ${destroot}${docdir}
xinstall -m 0644 -W ${worksrcpath} AUTHORS COPYING ChangeLog NEWS README \
THANKS THANKS-to-translators TODO ${destroot}${docdir}
# Prevent conflict with gegl
# See https://trac.macports.org/ticket/55327
move ${destroot}${prefix}/bin/gcut ${destroot}${prefix}/bin/gnucut
xinstall -m 755 -d ${destroot}${prefix}/libexec/gnubin
foreach binary [glob -tails -directory ${destroot}${prefix}/bin g*] {
ln -s ${prefix}/bin/${binary} ${destroot}${prefix}/libexec/gnubin/[string range $binary 1 end]
}
# Fix symlink to gnu cut
move ${destroot}${prefix}/libexec/gnubin/nucut ${destroot}${prefix}/libexec/gnubin/cut
xinstall -m 755 -d ${destroot}${prefix}/libexec/gnubin/man/man1
foreach manpage [glob -tails -directory ${destroot}${prefix}/share/man/man1 g*] {
ln -s ${prefix}/share/man/man1/${manpage}.gz ${destroot}${prefix}/libexec/gnubin/man/man1/[string range $manpage 1 end].gz
}
# Fix manpage for gnucut
move ${destroot}${prefix}/share/man/man1/gcut.1 ${destroot}${prefix}/share/man/man1/gnucut.1
delete ${destroot}${prefix}/libexec/gnubin/man/man1/cut.1.gz
ln -s ${prefix}/share/man/man1/gnucut.1.gz ${destroot}${prefix}/libexec/gnubin/man/man1/cut.1.gz
}
# Set the RUN_EXPENSIVE_TESTS environmental variable to 'yes' to run more
# expensive tests. Set the RUN_VERY_EXPENSIVE_TESTS environmental variable
# to 'yes' to run even more expensive tests.
test.run yes
test.target check
notes "
The tools provided by GNU coreutils are prefixed with the character 'g' by default to distinguish them from the BSD commands.
For example, cp becomes gcp and ls becomes gls.
If you want to use the GNU tools by default, add this directory to the front of your PATH environment variable:
${prefix}/libexec/gnubin/
"
livecheck.name ${my_name}