mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
coreutils: enable 9.0 on x86
This commit is contained in:
@@ -1,272 +0,0 @@
|
||||
SUMMARY="Standard GNU core utilities"
|
||||
DESCRIPTION="
|
||||
Most of these programs have significant advantages over their Unix \
|
||||
counterparts, such as greater speed, additional options, and fewer \
|
||||
arbitrary limits.
|
||||
|
||||
The programs that can be built with this package are:
|
||||
|
||||
[ arch base64 basename cat chcon chgrp chmod chown chroot cksum comm cp \
|
||||
csplit cut date dd df dir dircolors dirname du echo env expand expr \
|
||||
factor false fmt fold groups head hostid hostname id install join kill \
|
||||
link ln logname ls md5sum mkdir mkfifo mknod mktemp mv nice nl nohup \
|
||||
nproc numfmt od paste pathchk pinky pr printenv printf ptx pwd readlink \
|
||||
realpath rm rmdir runcon seq sha1sum sha224sum sha256sum sha384sum sha512sum \
|
||||
shred shuf sleep sort split stat stdbuf stty sum sync tac tail tee test \
|
||||
timeout touch tr true truncate tsort tty uname unexpand uniq unlink \
|
||||
uptime users vdir wc who whoami yes
|
||||
"
|
||||
HOMEPAGE="http://www.gnu.org/software/coreutils"
|
||||
COPYRIGHT="1994-2013 Free Software Foundation, Inc."
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="2"
|
||||
SOURCE_URI="http://ftp.gnu.org/gnu/coreutils/coreutils-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="a2d75286a4b9ef3a13039c2da3868a61be4ee9f17d8ae380a35a97e506972170"
|
||||
PATCHES="
|
||||
coreutils-$portVersion.patchset
|
||||
"
|
||||
if [ $effectiveTargetArchitecture = x86_gcc2 ]; then
|
||||
PATCHES+="
|
||||
coreutils-$portVersion.gcc2.patchset
|
||||
"
|
||||
fi
|
||||
|
||||
ARCHITECTURES="all"
|
||||
|
||||
PROVIDES="
|
||||
coreutils = $portVersion compat >= 8
|
||||
cmd:[ = $portVersion compat >= 8
|
||||
cmd:base64 = $portVersion compat >= 8
|
||||
cmd:basename = $portVersion compat >= 8
|
||||
cmd:cat = $portVersion compat >= 8
|
||||
cmd:chcon = $portVersion compat >= 8
|
||||
cmd:chgrp = $portVersion compat >= 8
|
||||
cmd:chmod = $portVersion compat >= 8
|
||||
cmd:chown = $portVersion compat >= 8
|
||||
cmd:chroot = $portVersion compat >= 8
|
||||
cmd:cksum = $portVersion compat >= 8
|
||||
cmd:comm = $portVersion compat >= 8
|
||||
cmd:cp = $portVersion compat >= 8
|
||||
cmd:csplit = $portVersion compat >= 8
|
||||
cmd:cut = $portVersion compat >= 8
|
||||
cmd:date = $portVersion compat >= 8
|
||||
cmd:dd = $portVersion compat >= 8
|
||||
cmd:dir = $portVersion compat >= 8
|
||||
cmd:dircolors = $portVersion compat >= 8
|
||||
cmd:dirname = $portVersion compat >= 8
|
||||
cmd:du = $portVersion compat >= 8
|
||||
cmd:echo = $portVersion compat >= 8
|
||||
cmd:env = $portVersion compat >= 8
|
||||
cmd:expand = $portVersion compat >= 8
|
||||
cmd:expr = $portVersion compat >= 8
|
||||
cmd:factor = $portVersion compat >= 8
|
||||
cmd:false = $portVersion compat >= 8
|
||||
cmd:fmt = $portVersion compat >= 8
|
||||
cmd:fold = $portVersion compat >= 8
|
||||
cmd:groups = $portVersion compat >= 8
|
||||
cmd:head = $portVersion compat >= 8
|
||||
cmd:hostname = $portVersion compat >= 8
|
||||
cmd:id = $portVersion compat >= 8
|
||||
cmd:install = $portVersion compat >= 8
|
||||
cmd:join = $portVersion compat >= 8
|
||||
cmd:kill = $portVersion compat >= 8
|
||||
cmd:link = $portVersion compat >= 8
|
||||
cmd:ln = $portVersion compat >= 8
|
||||
cmd:logname = $portVersion compat >= 8
|
||||
cmd:ls = $portVersion compat >= 8
|
||||
cmd:md5sum = $portVersion compat >= 8
|
||||
cmd:mkdir = $portVersion compat >= 8
|
||||
cmd:mkfifo = $portVersion compat >= 8
|
||||
cmd:mknod = $portVersion compat >= 8
|
||||
cmd:mktemp = $portVersion compat >= 8
|
||||
cmd:mv = $portVersion compat >= 8
|
||||
cmd:nl = $portVersion compat >= 8
|
||||
cmd:nohup = $portVersion compat >= 8
|
||||
cmd:nproc = $portVersion compat >= 8
|
||||
cmd:numfmt = $portVersion compat >= 8
|
||||
cmd:od = $portVersion compat >= 8
|
||||
cmd:paste = $portVersion compat >= 8
|
||||
cmd:pathchk = $portVersion compat >= 8
|
||||
cmd:pr = $portVersion compat >= 8
|
||||
cmd:printenv = $portVersion compat >= 8
|
||||
cmd:printf = $portVersion compat >= 8
|
||||
cmd:ptx = $portVersion compat >= 8
|
||||
cmd:pwd = $portVersion compat >= 8
|
||||
cmd:readlink = $portVersion compat >= 8
|
||||
cmd:realpath = $portVersion compat >= 8
|
||||
cmd:rm = $portVersion compat >= 8
|
||||
cmd:rmdir = $portVersion compat >= 8
|
||||
cmd:runcon = $portVersion compat >= 8
|
||||
cmd:seq = $portVersion compat >= 8
|
||||
cmd:sha1sum = $portVersion compat >= 8
|
||||
cmd:sha224sum = $portVersion compat >= 8
|
||||
cmd:sha256sum = $portVersion compat >= 8
|
||||
cmd:sha384sum = $portVersion compat >= 8
|
||||
cmd:sha512sum = $portVersion compat >= 8
|
||||
cmd:shred = $portVersion compat >= 8
|
||||
cmd:shuf = $portVersion compat >= 8
|
||||
cmd:sleep = $portVersion compat >= 8
|
||||
cmd:sort = $portVersion compat >= 8
|
||||
cmd:split = $portVersion compat >= 8
|
||||
cmd:stat = $portVersion compat >= 8
|
||||
cmd:stdbuf = $portVersion compat >= 8
|
||||
cmd:stty = $portVersion compat >= 8
|
||||
cmd:sum = $portVersion compat >= 8
|
||||
cmd:sync = $portVersion compat >= 8
|
||||
cmd:tac = $portVersion compat >= 8
|
||||
cmd:tail = $portVersion compat >= 8
|
||||
cmd:tee = $portVersion compat >= 8
|
||||
cmd:test = $portVersion compat >= 8
|
||||
cmd:timeout = $portVersion compat >= 8
|
||||
cmd:touch = $portVersion compat >= 8
|
||||
cmd:tr = $portVersion compat >= 8
|
||||
cmd:true = $portVersion compat >= 8
|
||||
cmd:truncate = $portVersion compat >= 8
|
||||
cmd:tsort = $portVersion compat >= 8
|
||||
cmd:tty = $portVersion compat >= 8
|
||||
cmd:uname = $portVersion compat >= 8
|
||||
cmd:unexpand = $portVersion compat >= 8
|
||||
cmd:uniq = $portVersion compat >= 8
|
||||
cmd:unlink = $portVersion compat >= 8
|
||||
cmd:uptime = $portVersion compat >= 8
|
||||
cmd:vdir = $portVersion compat >= 8
|
||||
cmd:wc = $portVersion compat >= 8
|
||||
cmd:whoami = $portVersion compat >= 8
|
||||
cmd:yes = $portVersion compat >= 8
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
"
|
||||
|
||||
BUILD_PREREQUIRES="
|
||||
haiku_devel
|
||||
cmd:awk
|
||||
cmd:gcc
|
||||
cmd:grep
|
||||
cmd:help2man
|
||||
cmd:ld
|
||||
cmd:make
|
||||
cmd:makeinfo
|
||||
cmd:sed
|
||||
"
|
||||
|
||||
defineDebugInfoPackage coreutils \
|
||||
$binDir/[ \
|
||||
$binDir/base64 \
|
||||
$binDir/basename \
|
||||
$binDir/cat \
|
||||
$binDir/chcon \
|
||||
$binDir/chgrp \
|
||||
$binDir/chmod \
|
||||
$binDir/chown \
|
||||
$binDir/chroot \
|
||||
$binDir/cksum \
|
||||
$binDir/comm \
|
||||
$binDir/cp \
|
||||
$binDir/csplit \
|
||||
$binDir/cut \
|
||||
$binDir/date \
|
||||
$binDir/dd \
|
||||
$binDir/dir \
|
||||
$binDir/dircolors \
|
||||
$binDir/dirname \
|
||||
$binDir/du \
|
||||
$binDir/echo \
|
||||
$binDir/env \
|
||||
$binDir/expand \
|
||||
$binDir/expr \
|
||||
$binDir/factor \
|
||||
$binDir/false \
|
||||
$binDir/fmt \
|
||||
$binDir/fold \
|
||||
$binDir/groups \
|
||||
$binDir/head \
|
||||
$binDir/hostname \
|
||||
$binDir/id \
|
||||
$binDir/install \
|
||||
$binDir/join \
|
||||
$binDir/kill \
|
||||
$binDir/link \
|
||||
$binDir/ln \
|
||||
$binDir/logname \
|
||||
$binDir/ls \
|
||||
$binDir/md5sum \
|
||||
$binDir/mkdir \
|
||||
$binDir/mkfifo \
|
||||
$binDir/mknod \
|
||||
$binDir/mktemp \
|
||||
$binDir/mv \
|
||||
$binDir/nl \
|
||||
$binDir/nohup \
|
||||
$binDir/nproc \
|
||||
$binDir/numfmt \
|
||||
$binDir/od \
|
||||
$binDir/paste \
|
||||
$binDir/pathchk \
|
||||
$binDir/pr \
|
||||
$binDir/printenv \
|
||||
$binDir/printf \
|
||||
$binDir/ptx \
|
||||
$binDir/pwd \
|
||||
$binDir/readlink \
|
||||
$binDir/realpath \
|
||||
$binDir/rm \
|
||||
$binDir/rmdir \
|
||||
$binDir/runcon \
|
||||
$binDir/seq \
|
||||
$binDir/sha1sum \
|
||||
$binDir/sha224sum \
|
||||
$binDir/sha256sum \
|
||||
$binDir/sha384sum \
|
||||
$binDir/sha512sum \
|
||||
$binDir/shred \
|
||||
$binDir/shuf \
|
||||
$binDir/sleep \
|
||||
$binDir/sort \
|
||||
$binDir/split \
|
||||
$binDir/stat \
|
||||
$binDir/stdbuf \
|
||||
$binDir/stty \
|
||||
$binDir/sum \
|
||||
$binDir/sync \
|
||||
$binDir/tac \
|
||||
$binDir/tail \
|
||||
$binDir/tee \
|
||||
$binDir/test \
|
||||
$binDir/timeout \
|
||||
$binDir/touch \
|
||||
$binDir/tr \
|
||||
$binDir/true \
|
||||
$binDir/truncate \
|
||||
$binDir/tsort \
|
||||
$binDir/tty \
|
||||
$binDir/uname \
|
||||
$binDir/unexpand \
|
||||
$binDir/uniq \
|
||||
$binDir/unlink \
|
||||
$binDir/uptime \
|
||||
$binDir/vdir \
|
||||
$binDir/wc \
|
||||
$binDir/whoami \
|
||||
$binDir/yes
|
||||
|
||||
PATCH()
|
||||
{
|
||||
sed -i -e 's|O_NOCACHE|DD_NOCACHE|g' src/dd.c
|
||||
}
|
||||
|
||||
BUILD()
|
||||
{
|
||||
FORCE_UNSAFE_CONFIGURE=1 runConfigure ./configure \
|
||||
--without-included-regex \
|
||||
--disable-rpath --with-gnu-ld \
|
||||
--enable-no-install-program=df,nice \
|
||||
--enable-install-program=hostname
|
||||
touch doc/*.info
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
}
|
||||
@@ -1,274 +0,0 @@
|
||||
SUMMARY="Standard GNU core utilities"
|
||||
DESCRIPTION="Most of these programs have significant advantages over their \
|
||||
Unix counterparts, such as greater speed, additional options, and fewer \
|
||||
arbitrary limits.
|
||||
|
||||
The programs that can be built with this package are:
|
||||
|
||||
[ arch base64 basename cat chcon chgrp chmod chown chroot cksum comm cp \
|
||||
csplit cut date dd df dir dircolors dirname du echo env expand expr \
|
||||
factor false fmt fold groups head hostid hostname id install join kill \
|
||||
link ln logname ls md5sum mkdir mkfifo mknod mktemp mv nice nl nohup \
|
||||
nproc numfmt od paste pathchk pinky pr printenv printf ptx pwd readlink \
|
||||
realpath rm rmdir runcon seq sha1sum sha224sum sha256sum sha384sum sha512sum \
|
||||
shred shuf sleep sort split stat stdbuf stty sum sync tac tail tee test \
|
||||
timeout touch tr true truncate tsort tty uname unexpand uniq unlink \
|
||||
uptime users vdir wc who whoami yes"
|
||||
HOMEPAGE="https://www.gnu.org/software/coreutils/"
|
||||
COPYRIGHT="1994-2017 Free Software Foundation, Inc."
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://ftpmirror.gnu.org/coreutils/coreutils-$portVersion.tar.xz
|
||||
https://ftp.gnu.org/gnu/coreutils/coreutils-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="92d0fa1c311cacefa89853bdb53c62f4110cdfda3820346b59cbd098f40f955e"
|
||||
PATCHES="coreutils-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all ?x86_gcc2 ?x86 ?arm"
|
||||
|
||||
binVersionCompat="$portVersion compat >= ${portVersion%%.*}"
|
||||
PROVIDES="
|
||||
coreutils = $binVersionCompat
|
||||
cmd:[ = $binVersionCompat
|
||||
cmd:b2sum = $binVersionCompat
|
||||
cmd:base32 = $binVersionCompat
|
||||
cmd:base64 = $binVersionCompat
|
||||
cmd:basename = $binVersionCompat
|
||||
cmd:cat = $binVersionCompat
|
||||
cmd:chcon = $binVersionCompat
|
||||
cmd:chgrp = $binVersionCompat
|
||||
cmd:chmod = $binVersionCompat
|
||||
cmd:chown = $binVersionCompat
|
||||
cmd:chroot = $binVersionCompat
|
||||
cmd:cksum = $binVersionCompat
|
||||
cmd:comm = $binVersionCompat
|
||||
cmd:cp = $binVersionCompat
|
||||
cmd:csplit = $binVersionCompat
|
||||
cmd:cut = $binVersionCompat
|
||||
cmd:date = $binVersionCompat
|
||||
cmd:dd = $binVersionCompat
|
||||
cmd:dir = $binVersionCompat
|
||||
cmd:dircolors = $binVersionCompat
|
||||
cmd:dirname = $binVersionCompat
|
||||
cmd:du = $binVersionCompat
|
||||
cmd:echo = $binVersionCompat
|
||||
cmd:env = $binVersionCompat
|
||||
cmd:expand = $binVersionCompat
|
||||
cmd:expr = $binVersionCompat
|
||||
cmd:factor = $binVersionCompat
|
||||
cmd:false = $binVersionCompat
|
||||
cmd:fmt = $binVersionCompat
|
||||
cmd:fold = $binVersionCompat
|
||||
cmd:groups = $binVersionCompat
|
||||
cmd:head = $binVersionCompat
|
||||
cmd:hostname = $binVersionCompat
|
||||
cmd:id = $binVersionCompat
|
||||
cmd:install = $binVersionCompat
|
||||
cmd:join = $binVersionCompat
|
||||
cmd:kill = $binVersionCompat
|
||||
cmd:link = $binVersionCompat
|
||||
cmd:ln = $binVersionCompat
|
||||
cmd:logname = $binVersionCompat
|
||||
cmd:ls = $binVersionCompat
|
||||
cmd:md5sum = $binVersionCompat
|
||||
cmd:mkdir = $binVersionCompat
|
||||
cmd:mkfifo = $binVersionCompat
|
||||
cmd:mknod = $binVersionCompat
|
||||
cmd:mktemp = $binVersionCompat
|
||||
cmd:mv = $binVersionCompat
|
||||
cmd:nl = $binVersionCompat
|
||||
cmd:nohup = $binVersionCompat
|
||||
cmd:nproc = $binVersionCompat
|
||||
cmd:numfmt = $binVersionCompat
|
||||
cmd:od = $binVersionCompat
|
||||
cmd:paste = $binVersionCompat
|
||||
cmd:pathchk = $binVersionCompat
|
||||
cmd:pr = $binVersionCompat
|
||||
cmd:printenv = $binVersionCompat
|
||||
cmd:printf = $binVersionCompat
|
||||
cmd:ptx = $binVersionCompat
|
||||
cmd:pwd = $binVersionCompat
|
||||
cmd:readlink = $binVersionCompat
|
||||
cmd:realpath = $binVersionCompat
|
||||
cmd:rm = $binVersionCompat
|
||||
cmd:rmdir = $binVersionCompat
|
||||
cmd:runcon = $binVersionCompat
|
||||
cmd:seq = $binVersionCompat
|
||||
cmd:sha1sum = $binVersionCompat
|
||||
cmd:sha224sum = $binVersionCompat
|
||||
cmd:sha256sum = $binVersionCompat
|
||||
cmd:sha384sum = $binVersionCompat
|
||||
cmd:sha512sum = $binVersionCompat
|
||||
cmd:shred = $binVersionCompat
|
||||
cmd:shuf = $binVersionCompat
|
||||
cmd:sleep = $binVersionCompat
|
||||
cmd:sort = $binVersionCompat
|
||||
cmd:split = $binVersionCompat
|
||||
cmd:stat = $binVersionCompat
|
||||
cmd:stdbuf = $binVersionCompat
|
||||
cmd:stty = $binVersionCompat
|
||||
cmd:sum = $binVersionCompat
|
||||
cmd:sync = $binVersionCompat
|
||||
cmd:tac = $binVersionCompat
|
||||
cmd:tail = $binVersionCompat
|
||||
cmd:tee = $binVersionCompat
|
||||
cmd:test = $binVersionCompat
|
||||
cmd:timeout = $binVersionCompat
|
||||
cmd:touch = $binVersionCompat
|
||||
cmd:tr = $binVersionCompat
|
||||
cmd:true = $binVersionCompat
|
||||
cmd:truncate = $binVersionCompat
|
||||
cmd:tsort = $binVersionCompat
|
||||
cmd:tty = $binVersionCompat
|
||||
cmd:uname = $binVersionCompat
|
||||
cmd:unexpand = $binVersionCompat
|
||||
cmd:uniq = $binVersionCompat
|
||||
cmd:unlink = $binVersionCompat
|
||||
cmd:uptime = $binVersionCompat
|
||||
cmd:vdir = $binVersionCompat
|
||||
cmd:wc = $binVersionCompat
|
||||
cmd:whoami = $binVersionCompat
|
||||
cmd:yes = $binVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
"
|
||||
|
||||
BUILD_PREREQUIRES="
|
||||
haiku_devel
|
||||
cmd:awk
|
||||
cmd:gcc
|
||||
cmd:grep
|
||||
cmd:help2man
|
||||
cmd:ld
|
||||
cmd:make
|
||||
cmd:makeinfo
|
||||
cmd:sed
|
||||
"
|
||||
|
||||
defineDebugInfoPackage coreutils \
|
||||
$binDir/[ \
|
||||
$binDir/b2sum \
|
||||
$binDir/base32 \
|
||||
$binDir/base64 \
|
||||
$binDir/basename \
|
||||
$binDir/cat \
|
||||
$binDir/chcon \
|
||||
$binDir/chgrp \
|
||||
$binDir/chmod \
|
||||
$binDir/chown \
|
||||
$binDir/chroot \
|
||||
$binDir/cksum \
|
||||
$binDir/comm \
|
||||
$binDir/cp \
|
||||
$binDir/csplit \
|
||||
$binDir/cut \
|
||||
$binDir/date \
|
||||
$binDir/dd \
|
||||
$binDir/dir \
|
||||
$binDir/dircolors \
|
||||
$binDir/dirname \
|
||||
$binDir/du \
|
||||
$binDir/echo \
|
||||
$binDir/env \
|
||||
$binDir/expand \
|
||||
$binDir/expr \
|
||||
$binDir/factor \
|
||||
$binDir/false \
|
||||
$binDir/fmt \
|
||||
$binDir/fold \
|
||||
$binDir/groups \
|
||||
$binDir/head \
|
||||
$binDir/hostname \
|
||||
$binDir/id \
|
||||
$binDir/install \
|
||||
$binDir/join \
|
||||
$binDir/kill \
|
||||
$binDir/link \
|
||||
$binDir/ln \
|
||||
$binDir/logname \
|
||||
$binDir/ls \
|
||||
$binDir/md5sum \
|
||||
$binDir/mkdir \
|
||||
$binDir/mkfifo \
|
||||
$binDir/mknod \
|
||||
$binDir/mktemp \
|
||||
$binDir/mv \
|
||||
$binDir/nl \
|
||||
$binDir/nohup \
|
||||
$binDir/nproc \
|
||||
$binDir/numfmt \
|
||||
$binDir/od \
|
||||
$binDir/paste \
|
||||
$binDir/pathchk \
|
||||
$binDir/pr \
|
||||
$binDir/printenv \
|
||||
$binDir/printf \
|
||||
$binDir/ptx \
|
||||
$binDir/pwd \
|
||||
$binDir/readlink \
|
||||
$binDir/realpath \
|
||||
$binDir/rm \
|
||||
$binDir/rmdir \
|
||||
$binDir/runcon \
|
||||
$binDir/seq \
|
||||
$binDir/sha1sum \
|
||||
$binDir/sha224sum \
|
||||
$binDir/sha256sum \
|
||||
$binDir/sha384sum \
|
||||
$binDir/sha512sum \
|
||||
$binDir/shred \
|
||||
$binDir/shuf \
|
||||
$binDir/sleep \
|
||||
$binDir/sort \
|
||||
$binDir/split \
|
||||
$binDir/stat \
|
||||
$binDir/stdbuf \
|
||||
$binDir/stty \
|
||||
$binDir/sum \
|
||||
$binDir/sync \
|
||||
$binDir/tac \
|
||||
$binDir/tail \
|
||||
$binDir/tee \
|
||||
$binDir/test \
|
||||
$binDir/timeout \
|
||||
$binDir/touch \
|
||||
$binDir/tr \
|
||||
$binDir/true \
|
||||
$binDir/truncate \
|
||||
$binDir/tsort \
|
||||
$binDir/tty \
|
||||
$binDir/uname \
|
||||
$binDir/unexpand \
|
||||
$binDir/uniq \
|
||||
$binDir/unlink \
|
||||
$binDir/uptime \
|
||||
$binDir/vdir \
|
||||
$binDir/wc \
|
||||
$binDir/whoami \
|
||||
$binDir/yes
|
||||
|
||||
PATCH()
|
||||
{
|
||||
sed -i -e 's|O_NOCACHE|DD_NOCACHE|g' src/dd.c
|
||||
}
|
||||
|
||||
BUILD()
|
||||
{
|
||||
FORCE_UNSAFE_CONFIGURE=1 runConfigure ./configure \
|
||||
--without-included-regex \
|
||||
--disable-rpath --with-gnu-ld \
|
||||
--enable-no-install-program=df \
|
||||
--enable-install-program=hostname
|
||||
touch doc/*.info
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make check
|
||||
}
|
||||
@@ -23,233 +23,246 @@ SOURCE_URI="https://ftpmirror.gnu.org/coreutils/coreutils-$portVersion.tar.xz
|
||||
CHECKSUM_SHA256="ce30acdf4a41bc5bb30dd955e9eaa75fa216b4e3deb08889ed32433c7b3b97ce"
|
||||
PATCHES="coreutils-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all ?x86_gcc2"
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
commandSuffix=$secondaryArchSuffix
|
||||
commandBinDir=$binDir
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandSuffix=
|
||||
commandBinDir=$prefix/bin
|
||||
fi
|
||||
|
||||
binVersionCompat="$portVersion compat >= 8"
|
||||
PROVIDES="
|
||||
coreutils = $binVersionCompat
|
||||
cmd:[ = $binVersionCompat
|
||||
cmd:b2sum = $binVersionCompat
|
||||
cmd:base32 = $binVersionCompat
|
||||
cmd:base64 = $binVersionCompat
|
||||
cmd:basename = $binVersionCompat
|
||||
cmd:basenc = $binVersionCompat
|
||||
cmd:cat = $binVersionCompat
|
||||
cmd:chcon = $binVersionCompat
|
||||
cmd:chgrp = $binVersionCompat
|
||||
cmd:chmod = $binVersionCompat
|
||||
cmd:chown = $binVersionCompat
|
||||
cmd:chroot = $binVersionCompat
|
||||
cmd:cksum = $binVersionCompat
|
||||
cmd:comm = $binVersionCompat
|
||||
cmd:cp = $binVersionCompat
|
||||
cmd:csplit = $binVersionCompat
|
||||
cmd:cut = $binVersionCompat
|
||||
cmd:date = $binVersionCompat
|
||||
cmd:dd = $binVersionCompat
|
||||
cmd:dir = $binVersionCompat
|
||||
cmd:dircolors = $binVersionCompat
|
||||
cmd:dirname = $binVersionCompat
|
||||
cmd:du = $binVersionCompat
|
||||
cmd:echo = $binVersionCompat
|
||||
cmd:env = $binVersionCompat
|
||||
cmd:expand = $binVersionCompat
|
||||
cmd:expr = $binVersionCompat
|
||||
cmd:factor = $binVersionCompat
|
||||
cmd:false = $binVersionCompat
|
||||
cmd:fmt = $binVersionCompat
|
||||
cmd:fold = $binVersionCompat
|
||||
cmd:groups = $binVersionCompat
|
||||
cmd:head = $binVersionCompat
|
||||
cmd:hostname = $binVersionCompat
|
||||
cmd:id = $binVersionCompat
|
||||
cmd:install = $binVersionCompat
|
||||
cmd:join = $binVersionCompat
|
||||
cmd:kill = $binVersionCompat
|
||||
cmd:link = $binVersionCompat
|
||||
cmd:ln = $binVersionCompat
|
||||
cmd:logname = $binVersionCompat
|
||||
cmd:ls = $binVersionCompat
|
||||
cmd:md5sum = $binVersionCompat
|
||||
cmd:mkdir = $binVersionCompat
|
||||
cmd:mkfifo = $binVersionCompat
|
||||
cmd:mknod = $binVersionCompat
|
||||
cmd:mktemp = $binVersionCompat
|
||||
cmd:mv = $binVersionCompat
|
||||
cmd:nice = $binVersionCompat
|
||||
cmd:nl = $binVersionCompat
|
||||
cmd:nohup = $binVersionCompat
|
||||
cmd:nproc = $binVersionCompat
|
||||
cmd:numfmt = $binVersionCompat
|
||||
cmd:od = $binVersionCompat
|
||||
cmd:paste = $binVersionCompat
|
||||
cmd:pathchk = $binVersionCompat
|
||||
cmd:pr = $binVersionCompat
|
||||
cmd:printenv = $binVersionCompat
|
||||
cmd:printf = $binVersionCompat
|
||||
cmd:ptx = $binVersionCompat
|
||||
cmd:pwd = $binVersionCompat
|
||||
cmd:readlink = $binVersionCompat
|
||||
cmd:realpath = $binVersionCompat
|
||||
cmd:rm = $binVersionCompat
|
||||
cmd:rmdir = $binVersionCompat
|
||||
cmd:runcon = $binVersionCompat
|
||||
cmd:seq = $binVersionCompat
|
||||
cmd:sha1sum = $binVersionCompat
|
||||
cmd:sha224sum = $binVersionCompat
|
||||
cmd:sha256sum = $binVersionCompat
|
||||
cmd:sha384sum = $binVersionCompat
|
||||
cmd:sha512sum = $binVersionCompat
|
||||
cmd:shred = $binVersionCompat
|
||||
cmd:shuf = $binVersionCompat
|
||||
cmd:sleep = $binVersionCompat
|
||||
cmd:sort = $binVersionCompat
|
||||
cmd:split = $binVersionCompat
|
||||
cmd:stat = $binVersionCompat
|
||||
cmd:stdbuf = $binVersionCompat
|
||||
cmd:stty = $binVersionCompat
|
||||
cmd:sum = $binVersionCompat
|
||||
cmd:sync = $binVersionCompat
|
||||
cmd:tac = $binVersionCompat
|
||||
cmd:tail = $binVersionCompat
|
||||
cmd:tee = $binVersionCompat
|
||||
cmd:test = $binVersionCompat
|
||||
cmd:timeout = $binVersionCompat
|
||||
cmd:touch = $binVersionCompat
|
||||
cmd:tr = $binVersionCompat
|
||||
cmd:true = $binVersionCompat
|
||||
cmd:truncate = $binVersionCompat
|
||||
cmd:tsort = $binVersionCompat
|
||||
cmd:tty = $binVersionCompat
|
||||
cmd:uname = $binVersionCompat
|
||||
cmd:unexpand = $binVersionCompat
|
||||
cmd:uniq = $binVersionCompat
|
||||
cmd:unlink = $binVersionCompat
|
||||
cmd:uptime = $binVersionCompat
|
||||
cmd:vdir = $binVersionCompat
|
||||
cmd:wc = $binVersionCompat
|
||||
cmd:whoami = $binVersionCompat
|
||||
cmd:yes = $binVersionCompat
|
||||
coreutils$secondaryArchSuffix = $binVersionCompat
|
||||
cmd:[$commandSuffix = $binVersionCompat
|
||||
cmd:b2sum$commandSuffix = $binVersionCompat
|
||||
cmd:base32$commandSuffix = $binVersionCompat
|
||||
cmd:base64$commandSuffix = $binVersionCompat
|
||||
cmd:basename$commandSuffix = $binVersionCompat
|
||||
cmd:basenc$commandSuffix = $binVersionCompat
|
||||
cmd:cat$commandSuffix = $binVersionCompat
|
||||
cmd:chcon$commandSuffix = $binVersionCompat
|
||||
cmd:chgrp$commandSuffix = $binVersionCompat
|
||||
cmd:chmod$commandSuffix = $binVersionCompat
|
||||
cmd:chown$commandSuffix = $binVersionCompat
|
||||
cmd:chroot$commandSuffix = $binVersionCompat
|
||||
cmd:cksum$commandSuffix = $binVersionCompat
|
||||
cmd:comm$commandSuffix = $binVersionCompat
|
||||
cmd:cp$commandSuffix = $binVersionCompat
|
||||
cmd:csplit$commandSuffix = $binVersionCompat
|
||||
cmd:cut$commandSuffix = $binVersionCompat
|
||||
cmd:date$commandSuffix = $binVersionCompat
|
||||
cmd:dd$commandSuffix = $binVersionCompat
|
||||
cmd:dir$commandSuffix = $binVersionCompat
|
||||
cmd:dircolors$commandSuffix = $binVersionCompat
|
||||
cmd:dirname$commandSuffix = $binVersionCompat
|
||||
cmd:du$commandSuffix = $binVersionCompat
|
||||
cmd:echo$commandSuffix = $binVersionCompat
|
||||
cmd:env$commandSuffix = $binVersionCompat
|
||||
cmd:expand$commandSuffix = $binVersionCompat
|
||||
cmd:expr$commandSuffix = $binVersionCompat
|
||||
cmd:factor$commandSuffix = $binVersionCompat
|
||||
cmd:false$commandSuffix = $binVersionCompat
|
||||
cmd:fmt$commandSuffix = $binVersionCompat
|
||||
cmd:fold$commandSuffix = $binVersionCompat
|
||||
cmd:groups$commandSuffix = $binVersionCompat
|
||||
cmd:head$commandSuffix = $binVersionCompat
|
||||
cmd:hostname$commandSuffix = $binVersionCompat
|
||||
cmd:id$commandSuffix = $binVersionCompat
|
||||
cmd:install$commandSuffix = $binVersionCompat
|
||||
cmd:join$commandSuffix = $binVersionCompat
|
||||
cmd:kill$commandSuffix = $binVersionCompat
|
||||
cmd:link$commandSuffix = $binVersionCompat
|
||||
cmd:ln$commandSuffix = $binVersionCompat
|
||||
cmd:logname$commandSuffix = $binVersionCompat
|
||||
cmd:ls$commandSuffix = $binVersionCompat
|
||||
cmd:md5sum$commandSuffix = $binVersionCompat
|
||||
cmd:mkdir$commandSuffix = $binVersionCompat
|
||||
cmd:mkfifo$commandSuffix = $binVersionCompat
|
||||
cmd:mknod$commandSuffix = $binVersionCompat
|
||||
cmd:mktemp$commandSuffix = $binVersionCompat
|
||||
cmd:mv$commandSuffix = $binVersionCompat
|
||||
cmd:nice$commandSuffix = $binVersionCompat
|
||||
cmd:nl$commandSuffix = $binVersionCompat
|
||||
cmd:nohup$commandSuffix = $binVersionCompat
|
||||
cmd:nproc$commandSuffix = $binVersionCompat
|
||||
cmd:numfmt$commandSuffix = $binVersionCompat
|
||||
cmd:od$commandSuffix = $binVersionCompat
|
||||
cmd:paste$commandSuffix = $binVersionCompat
|
||||
cmd:pathchk$commandSuffix = $binVersionCompat
|
||||
cmd:pr$commandSuffix = $binVersionCompat
|
||||
cmd:printenv$commandSuffix = $binVersionCompat
|
||||
cmd:printf$commandSuffix = $binVersionCompat
|
||||
cmd:ptx$commandSuffix = $binVersionCompat
|
||||
cmd:pwd$commandSuffix = $binVersionCompat
|
||||
cmd:readlink$commandSuffix = $binVersionCompat
|
||||
cmd:realpath$commandSuffix = $binVersionCompat
|
||||
cmd:rm$commandSuffix = $binVersionCompat
|
||||
cmd:rmdir$commandSuffix = $binVersionCompat
|
||||
cmd:runcon$commandSuffix = $binVersionCompat
|
||||
cmd:seq$commandSuffix = $binVersionCompat
|
||||
cmd:sha1sum$commandSuffix = $binVersionCompat
|
||||
cmd:sha224sum$commandSuffix = $binVersionCompat
|
||||
cmd:sha256sum$commandSuffix = $binVersionCompat
|
||||
cmd:sha384sum$commandSuffix = $binVersionCompat
|
||||
cmd:sha512sum$commandSuffix = $binVersionCompat
|
||||
cmd:shred$commandSuffix = $binVersionCompat
|
||||
cmd:shuf$commandSuffix = $binVersionCompat
|
||||
cmd:sleep$commandSuffix = $binVersionCompat
|
||||
cmd:sort$commandSuffix = $binVersionCompat
|
||||
cmd:split$commandSuffix = $binVersionCompat
|
||||
cmd:stat$commandSuffix = $binVersionCompat
|
||||
cmd:stdbuf$commandSuffix = $binVersionCompat
|
||||
cmd:stty$commandSuffix = $binVersionCompat
|
||||
cmd:sum$commandSuffix = $binVersionCompat
|
||||
cmd:sync$commandSuffix = $binVersionCompat
|
||||
cmd:tac$commandSuffix = $binVersionCompat
|
||||
cmd:tail$commandSuffix = $binVersionCompat
|
||||
cmd:tee$commandSuffix = $binVersionCompat
|
||||
cmd:test$commandSuffix = $binVersionCompat
|
||||
cmd:timeout$commandSuffix = $binVersionCompat
|
||||
cmd:touch$commandSuffix = $binVersionCompat
|
||||
cmd:tr$commandSuffix = $binVersionCompat
|
||||
cmd:true$commandSuffix = $binVersionCompat
|
||||
cmd:truncate$commandSuffix = $binVersionCompat
|
||||
cmd:tsort$commandSuffix = $binVersionCompat
|
||||
cmd:tty$commandSuffix = $binVersionCompat
|
||||
cmd:uname$commandSuffix = $binVersionCompat
|
||||
cmd:unexpand$commandSuffix = $binVersionCompat
|
||||
cmd:uniq$commandSuffix = $binVersionCompat
|
||||
cmd:unlink$commandSuffix = $binVersionCompat
|
||||
cmd:uptime$commandSuffix = $binVersionCompat
|
||||
cmd:vdir$commandSuffix = $binVersionCompat
|
||||
cmd:wc$commandSuffix = $binVersionCompat
|
||||
cmd:whoami$commandSuffix = $binVersionCompat
|
||||
cmd:yes$commandSuffix = $binVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
REPLACES="
|
||||
coreutils
|
||||
"
|
||||
fi
|
||||
|
||||
BUILD_PREREQUIRES="
|
||||
haiku_devel
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
cmd:awk
|
||||
cmd:gcc
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:grep
|
||||
cmd:help2man
|
||||
cmd:ld
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:makeinfo
|
||||
cmd:sed
|
||||
"
|
||||
|
||||
defineDebugInfoPackage coreutils \
|
||||
$binDir/[ \
|
||||
$binDir/b2sum \
|
||||
$binDir/base32 \
|
||||
$binDir/base64 \
|
||||
$binDir/basename \
|
||||
$binDir/basenc \
|
||||
$binDir/cat \
|
||||
$binDir/chcon \
|
||||
$binDir/chgrp \
|
||||
$binDir/chmod \
|
||||
$binDir/chown \
|
||||
$binDir/chroot \
|
||||
$binDir/cksum \
|
||||
$binDir/comm \
|
||||
$binDir/cp \
|
||||
$binDir/csplit \
|
||||
$binDir/cut \
|
||||
$binDir/date \
|
||||
$binDir/dd \
|
||||
$binDir/dir \
|
||||
$binDir/dircolors \
|
||||
$binDir/dirname \
|
||||
$binDir/du \
|
||||
$binDir/echo \
|
||||
$binDir/env \
|
||||
$binDir/expand \
|
||||
$binDir/expr \
|
||||
$binDir/factor \
|
||||
$binDir/false \
|
||||
$binDir/fmt \
|
||||
$binDir/fold \
|
||||
$binDir/groups \
|
||||
$binDir/head \
|
||||
$binDir/hostname \
|
||||
$binDir/id \
|
||||
$binDir/install \
|
||||
$binDir/join \
|
||||
$binDir/kill \
|
||||
$binDir/link \
|
||||
$binDir/ln \
|
||||
$binDir/logname \
|
||||
$binDir/ls \
|
||||
$binDir/md5sum \
|
||||
$binDir/mkdir \
|
||||
$binDir/mkfifo \
|
||||
$binDir/mknod \
|
||||
$binDir/mktemp \
|
||||
$binDir/mv \
|
||||
$binDir/nice \
|
||||
$binDir/nl \
|
||||
$binDir/nohup \
|
||||
$binDir/nproc \
|
||||
$binDir/numfmt \
|
||||
$binDir/od \
|
||||
$binDir/paste \
|
||||
$binDir/pathchk \
|
||||
$binDir/pr \
|
||||
$binDir/printenv \
|
||||
$binDir/printf \
|
||||
$binDir/ptx \
|
||||
$binDir/pwd \
|
||||
$binDir/readlink \
|
||||
$binDir/realpath \
|
||||
$binDir/rm \
|
||||
$binDir/rmdir \
|
||||
$binDir/runcon \
|
||||
$binDir/seq \
|
||||
$binDir/sha1sum \
|
||||
$binDir/sha224sum \
|
||||
$binDir/sha256sum \
|
||||
$binDir/sha384sum \
|
||||
$binDir/sha512sum \
|
||||
$binDir/shred \
|
||||
$binDir/shuf \
|
||||
$binDir/sleep \
|
||||
$binDir/sort \
|
||||
$binDir/split \
|
||||
$binDir/stat \
|
||||
$binDir/stdbuf \
|
||||
$binDir/stty \
|
||||
$binDir/sum \
|
||||
$binDir/sync \
|
||||
$binDir/tac \
|
||||
$binDir/tail \
|
||||
$binDir/tee \
|
||||
$binDir/test \
|
||||
$binDir/timeout \
|
||||
$binDir/touch \
|
||||
$binDir/tr \
|
||||
$binDir/true \
|
||||
$binDir/truncate \
|
||||
$binDir/tsort \
|
||||
$binDir/tty \
|
||||
$binDir/uname \
|
||||
$binDir/unexpand \
|
||||
$binDir/uniq \
|
||||
$binDir/unlink \
|
||||
$binDir/uptime \
|
||||
$binDir/vdir \
|
||||
$binDir/wc \
|
||||
$binDir/whoami \
|
||||
$binDir/yes
|
||||
defineDebugInfoPackage coreutils$secondaryArchSuffix \
|
||||
$commandBinDir/[ \
|
||||
$commandBinDir/b2sum \
|
||||
$commandBinDir/base32 \
|
||||
$commandBinDir/base64 \
|
||||
$commandBinDir/basename \
|
||||
$commandBinDir/basenc \
|
||||
$commandBinDir/cat \
|
||||
$commandBinDir/chcon \
|
||||
$commandBinDir/chgrp \
|
||||
$commandBinDir/chmod \
|
||||
$commandBinDir/chown \
|
||||
$commandBinDir/chroot \
|
||||
$commandBinDir/cksum \
|
||||
$commandBinDir/comm \
|
||||
$commandBinDir/cp \
|
||||
$commandBinDir/csplit \
|
||||
$commandBinDir/cut \
|
||||
$commandBinDir/date \
|
||||
$commandBinDir/dd \
|
||||
$commandBinDir/dir \
|
||||
$commandBinDir/dircolors \
|
||||
$commandBinDir/dirname \
|
||||
$commandBinDir/du \
|
||||
$commandBinDir/echo \
|
||||
$commandBinDir/env \
|
||||
$commandBinDir/expand \
|
||||
$commandBinDir/expr \
|
||||
$commandBinDir/factor \
|
||||
$commandBinDir/false \
|
||||
$commandBinDir/fmt \
|
||||
$commandBinDir/fold \
|
||||
$commandBinDir/groups \
|
||||
$commandBinDir/head \
|
||||
$commandBinDir/hostname \
|
||||
$commandBinDir/id \
|
||||
$commandBinDir/install \
|
||||
$commandBinDir/join \
|
||||
$commandBinDir/kill \
|
||||
$commandBinDir/link \
|
||||
$commandBinDir/ln \
|
||||
$commandBinDir/logname \
|
||||
$commandBinDir/ls \
|
||||
$commandBinDir/md5sum \
|
||||
$commandBinDir/mkdir \
|
||||
$commandBinDir/mkfifo \
|
||||
$commandBinDir/mknod \
|
||||
$commandBinDir/mktemp \
|
||||
$commandBinDir/mv \
|
||||
$commandBinDir/nice \
|
||||
$commandBinDir/nl \
|
||||
$commandBinDir/nohup \
|
||||
$commandBinDir/nproc \
|
||||
$commandBinDir/numfmt \
|
||||
$commandBinDir/od \
|
||||
$commandBinDir/paste \
|
||||
$commandBinDir/pathchk \
|
||||
$commandBinDir/pr \
|
||||
$commandBinDir/printenv \
|
||||
$commandBinDir/printf \
|
||||
$commandBinDir/ptx \
|
||||
$commandBinDir/pwd \
|
||||
$commandBinDir/readlink \
|
||||
$commandBinDir/realpath \
|
||||
$commandBinDir/rm \
|
||||
$commandBinDir/rmdir \
|
||||
$commandBinDir/runcon \
|
||||
$commandBinDir/seq \
|
||||
$commandBinDir/sha1sum \
|
||||
$commandBinDir/sha224sum \
|
||||
$commandBinDir/sha256sum \
|
||||
$commandBinDir/sha384sum \
|
||||
$commandBinDir/sha512sum \
|
||||
$commandBinDir/shred \
|
||||
$commandBinDir/shuf \
|
||||
$commandBinDir/sleep \
|
||||
$commandBinDir/sort \
|
||||
$commandBinDir/split \
|
||||
$commandBinDir/stat \
|
||||
$commandBinDir/stdbuf \
|
||||
$commandBinDir/stty \
|
||||
$commandBinDir/sum \
|
||||
$commandBinDir/sync \
|
||||
$commandBinDir/tac \
|
||||
$commandBinDir/tail \
|
||||
$commandBinDir/tee \
|
||||
$commandBinDir/test \
|
||||
$commandBinDir/timeout \
|
||||
$commandBinDir/touch \
|
||||
$commandBinDir/tr \
|
||||
$commandBinDir/true \
|
||||
$commandBinDir/truncate \
|
||||
$commandBinDir/tsort \
|
||||
$commandBinDir/tty \
|
||||
$commandBinDir/uname \
|
||||
$commandBinDir/unexpand \
|
||||
$commandBinDir/uniq \
|
||||
$commandBinDir/unlink \
|
||||
$commandBinDir/uptime \
|
||||
$commandBinDir/vdir \
|
||||
$commandBinDir/wc \
|
||||
$commandBinDir/whoami \
|
||||
$commandBinDir/yes
|
||||
|
||||
PATCH()
|
||||
{
|
||||
@@ -259,7 +272,8 @@ PATCH()
|
||||
BUILD()
|
||||
{
|
||||
export CPPFLAGS=-Dst_birthtim=st_crtim
|
||||
FORCE_UNSAFE_CONFIGURE=1 runConfigure ./configure \
|
||||
FORCE_UNSAFE_CONFIGURE=1 runConfigure --omit-dirs binDir ./configure \
|
||||
--bindir=$commandBinDir \
|
||||
--without-included-regex \
|
||||
--disable-rpath --with-gnu-ld \
|
||||
--enable-no-install-program=df,pinky,users,who \
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,622 +0,0 @@
|
||||
From 5658840eee54435e0481e66becfc195e7e9526b3 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Tue, 13 May 2014 17:18:52 +0000
|
||||
Subject: define __USE_GNU for wempcpy
|
||||
|
||||
|
||||
diff --git a/lib/fnmatch.c b/lib/fnmatch.c
|
||||
index f4a9e7c..c48f02c 100644
|
||||
--- a/lib/fnmatch.c
|
||||
+++ b/lib/fnmatch.c
|
||||
@@ -21,6 +21,9 @@
|
||||
#ifndef _GNU_SOURCE
|
||||
# define _GNU_SOURCE 1
|
||||
#endif
|
||||
+#ifndef __USE_GNU
|
||||
+# define __USE_GNU 1
|
||||
+#endif
|
||||
|
||||
#if ! defined __builtin_expect && __GNUC__ < 3
|
||||
# define __builtin_expect(expr, expected) (expr)
|
||||
--
|
||||
2.2.2
|
||||
|
||||
|
||||
From ca4637a2b09e592d76431968246046bf5cccc041 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Tue, 13 May 2014 17:22:10 +0000
|
||||
Subject: force declaration of rpl_inet_ntop
|
||||
|
||||
|
||||
diff --git a/lib/arpa_inet.in.h b/lib/arpa_inet.in.h
|
||||
index 4cad48f..7dea9d1 100644
|
||||
--- a/lib/arpa_inet.in.h
|
||||
+++ b/lib/arpa_inet.in.h
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
For more details, see the POSIX:2001 specification
|
||||
<http://www.opengroup.org/susv3xsh/inet_ntop.html>. */
|
||||
-# if @REPLACE_INET_NTOP@
|
||||
+# if 1
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef inet_ntop
|
||||
# define inet_ntop rpl_inet_ntop
|
||||
--
|
||||
2.2.2
|
||||
|
||||
|
||||
From 6732b1fdc586231b354c160a1732f3989fe3fd76 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Tue, 13 May 2014 17:32:36 +0000
|
||||
Subject: Haiku defines mknod in unistd.h
|
||||
|
||||
|
||||
diff --git a/lib/mknod.c b/lib/mknod.c
|
||||
index 86a7c39..89fe068 100644
|
||||
--- a/lib/mknod.c
|
||||
+++ b/lib/mknod.c
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
+#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <errno.h>
|
||||
--
|
||||
2.2.2
|
||||
|
||||
|
||||
From 2e96f642d4dbea03a1aea87cd614b7fcab3e6cbd Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Tue, 13 May 2014 17:35:25 +0000
|
||||
Subject: protect the label, not used on Haiku
|
||||
|
||||
|
||||
diff --git a/lib/mountlist.c b/lib/mountlist.c
|
||||
index 6f04f55..7a4e940 100644
|
||||
--- a/lib/mountlist.c
|
||||
+++ b/lib/mountlist.c
|
||||
@@ -1082,6 +1082,7 @@ read_file_system_list (bool need_fs_type)
|
||||
return mount_list;
|
||||
|
||||
|
||||
+#ifndef __HAIKU__
|
||||
free_then_fail: _GL_UNUSED_LABEL
|
||||
{
|
||||
int saved_errno = errno;
|
||||
@@ -1097,6 +1098,7 @@ read_file_system_list (bool need_fs_type)
|
||||
errno = saved_errno;
|
||||
return NULL;
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
/* Free a mount entry as returned from read_file_system_list (). */
|
||||
--
|
||||
2.2.2
|
||||
|
||||
|
||||
From fcae25b00f489dceb930d80f39f7926c18652910 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Thu, 15 May 2014 15:40:32 +0000
|
||||
Subject: strchrnul needs __USE_GNU on Haiku
|
||||
|
||||
|
||||
diff --git a/lib/regex.h b/lib/regex.h
|
||||
index 0f0f369..7ed5bfe 100644
|
||||
--- a/lib/regex.h
|
||||
+++ b/lib/regex.h
|
||||
@@ -31,8 +31,10 @@ extern "C" {
|
||||
/* Define __USE_GNU to declare GNU extensions that violate the
|
||||
POSIX name space rules. */
|
||||
#ifdef _GNU_SOURCE
|
||||
+#ifndef __USE_GNU
|
||||
# define __USE_GNU 1
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#ifdef _REGEX_LARGE_OFFSETS
|
||||
|
||||
diff --git a/lib/string.in.h b/lib/string.in.h
|
||||
index 2abd6bc..41ae186 100644
|
||||
--- a/lib/string.in.h
|
||||
+++ b/lib/string.in.h
|
||||
@@ -37,6 +37,9 @@
|
||||
#define _GL_ALREADY_INCLUDING_STRING_H
|
||||
|
||||
/* The include_next requires a split double-inclusion guard. */
|
||||
+#ifndef __USE_GNU
|
||||
+#define __USE_GNU
|
||||
+#endif
|
||||
#@INCLUDE_NEXT@ @NEXT_STRING_H@
|
||||
|
||||
#undef _GL_ALREADY_INCLUDING_STRING_H
|
||||
--
|
||||
2.2.2
|
||||
|
||||
|
||||
From 499494b20a9675e8d66650babacdbd2f40c7412d Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Thu, 15 May 2014 20:13:58 +0000
|
||||
Subject: don't build hostid, uptime, nice, users, who, dd
|
||||
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 4de1234..00adfb8 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -1493,16 +1493,15 @@ nodist_src_libver_a_OBJECTS = src/version.$(OBJEXT)
|
||||
src_libver_a_OBJECTS = $(nodist_src_libver_a_OBJECTS)
|
||||
am__EXEEXT_1 = src/arch$(EXEEXT) src/coreutils$(EXEEXT) \
|
||||
src/hostname$(EXEEXT)
|
||||
-am__EXEEXT_2 = src/chroot$(EXEEXT) src/df$(EXEEXT) src/hostid$(EXEEXT) \
|
||||
- src/libstdbuf.so$(EXEEXT) src/nice$(EXEEXT) src/pinky$(EXEEXT) \
|
||||
- src/stdbuf$(EXEEXT) src/stty$(EXEEXT) src/uptime$(EXEEXT) \
|
||||
- src/users$(EXEEXT) src/who$(EXEEXT)
|
||||
+am__EXEEXT_2 = src/chroot$(EXEEXT) src/df$(EXEEXT) \
|
||||
+ src/libstdbuf.so$(EXEEXT) \
|
||||
+ src/stdbuf$(EXEEXT) src/stty$(EXEEXT)
|
||||
am__EXEEXT_3 = src/[$(EXEEXT) src/base64$(EXEEXT) \
|
||||
src/basename$(EXEEXT) src/cat$(EXEEXT) src/chcon$(EXEEXT) \
|
||||
src/chgrp$(EXEEXT) src/chmod$(EXEEXT) src/chown$(EXEEXT) \
|
||||
src/cksum$(EXEEXT) src/comm$(EXEEXT) src/cp$(EXEEXT) \
|
||||
src/csplit$(EXEEXT) src/cut$(EXEEXT) src/date$(EXEEXT) \
|
||||
- src/dd$(EXEEXT) src/dir$(EXEEXT) src/dircolors$(EXEEXT) \
|
||||
+ src/dir$(EXEEXT) src/dircolors$(EXEEXT) \
|
||||
src/dirname$(EXEEXT) src/du$(EXEEXT) src/echo$(EXEEXT) \
|
||||
src/env$(EXEEXT) src/expand$(EXEEXT) src/expr$(EXEEXT) \
|
||||
src/factor$(EXEEXT) src/false$(EXEEXT) src/fmt$(EXEEXT) \
|
||||
@@ -4350,7 +4349,7 @@ WARN_ON_USE_H = lib/warn-on-use.h
|
||||
# FIXME: once lib/ and gnulib-tests/ are also converted, hoist to Makefile.am
|
||||
AM_CFLAGS = $(WERROR_CFLAGS)
|
||||
no_install__progs = src/arch src/coreutils src/hostname
|
||||
-build_if_possible__progs = src/chroot src/df src/hostid \
|
||||
+build_if_possible__progs = src/chroot src/df \
|
||||
src/libstdbuf.so src/nice src/pinky src/stdbuf src/stty \
|
||||
src/uptime src/users src/who
|
||||
default__progs = src/[ src/base64 src/basename src/cat src/chcon \
|
||||
--
|
||||
2.2.2
|
||||
|
||||
|
||||
From 8d21f2dc24ea52fd9b34b18435728a76f79f3bab Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Fri, 6 Feb 2015 20:24:12 +0000
|
||||
Subject: import Haiku changes, fix warnings.
|
||||
|
||||
|
||||
diff --git a/INSTALL b/INSTALL
|
||||
index dadea5c..1bfb99a 100644
|
||||
--- a/INSTALL
|
||||
+++ b/INSTALL
|
||||
@@ -245,10 +245,10 @@ directory contains several dysfunctional programs; working variants of
|
||||
these programs are available in '/usr/bin'. So, if you need '/usr/ucb'
|
||||
in your 'PATH', put it _after_ '/usr/bin'.
|
||||
|
||||
- On Haiku, software installed for all users goes in '/boot/common',
|
||||
+ On Haiku, software installed for all users goes in '/boot/system',
|
||||
not '/usr/local'. It is recommended to use the following options:
|
||||
|
||||
- ./configure --prefix=/boot/common
|
||||
+ ./configure --prefix=/boot/system
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
diff --git a/lib/localcharset.c b/lib/localcharset.c
|
||||
index 1f02aa5..0cdc727 100644
|
||||
--- a/lib/localcharset.c
|
||||
+++ b/lib/localcharset.c
|
||||
@@ -128,7 +128,7 @@ get_charset_aliases (void)
|
||||
cp = charset_aliases;
|
||||
if (cp == NULL)
|
||||
{
|
||||
-#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__ || defined OS2)
|
||||
+#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__ || defined OS2 || defined __HAIKU__)
|
||||
const char *dir;
|
||||
const char *base = "charset.alias";
|
||||
char *file_name;
|
||||
@@ -372,6 +372,13 @@ get_charset_aliases (void)
|
||||
"CP1386" "\0" "GBK" "\0"
|
||||
"CP3372" "\0" "EUC-JP" "\0";
|
||||
# endif
|
||||
+
|
||||
+# if defined __HAIKU__
|
||||
+ /* To avoid the troubles of installing a separate file in the same
|
||||
+ directory as the DLL and of retrieving the DLL's directory at
|
||||
+ runtime, simply inline the aliases here. */
|
||||
+ cp = "UTF-8" "\0";
|
||||
+# endif
|
||||
#endif
|
||||
|
||||
charset_aliases = cp;
|
||||
diff --git a/src/copy.c b/src/copy.c
|
||||
index 5fe69ea..e8f74df 100644
|
||||
--- a/src/copy.c
|
||||
+++ b/src/copy.c
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
+#include <unistd.h>
|
||||
#include <assert.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/types.h>
|
||||
@@ -63,6 +64,10 @@
|
||||
#include "yesno.h"
|
||||
#include "selinux.h"
|
||||
|
||||
+#if (defined(__BEOS__) || defined(__HAIKU__))
|
||||
+# include <fs_attr.h>
|
||||
+#endif
|
||||
+
|
||||
#if USE_XATTR
|
||||
# include <attr/error_context.h>
|
||||
# include <attr/libattr.h>
|
||||
@@ -575,6 +580,92 @@ is_ancestor (const struct stat *sb, const struct dir_list *ancestors)
|
||||
return false;
|
||||
}
|
||||
|
||||
+
|
||||
+static int
|
||||
+copy_attributes(int fromFd, int toFd)
|
||||
+{
|
||||
+ struct dirent *dirent;
|
||||
+ char buffer[65536];
|
||||
+
|
||||
+ DIR *attributes = fs_fopen_attr_dir(fromFd);
|
||||
+ if (attributes == NULL)
|
||||
+ return errno == B_UNSUPPORTED ? 0 : -1;
|
||||
+
|
||||
+ while ((dirent = fs_read_attr_dir(attributes)) != NULL) {
|
||||
+ struct stat stat;
|
||||
+ off_t pos = 0;
|
||||
+ int attrFromFD = fs_fopen_attr(fromFd, dirent->d_name, 0, O_RDONLY);
|
||||
+ int attrToFD;
|
||||
+
|
||||
+ if (attrFromFD < 0)
|
||||
+ continue;
|
||||
+
|
||||
+ if (fstat(attrFromFD, &stat) != 0) {
|
||||
+ close(attrFromFD);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ attrToFD = fs_fopen_attr(toFd, dirent->d_name, stat.st_type,
|
||||
+ O_WRONLY | O_TRUNC | O_CREAT);
|
||||
+ if (attrToFD < 0) {
|
||||
+ close(attrFromFD);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ while (true) {
|
||||
+ ssize_t bytesRead, bytesWritten;
|
||||
+
|
||||
+ bytesRead = read_pos(attrFromFD, pos, buffer, sizeof(buffer));
|
||||
+ if (bytesRead < 0) {
|
||||
+ fprintf(stderr, "error reading attribute '%s'", dirent->d_name);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ bytesWritten = write_pos(attrToFD, pos, buffer, bytesRead);
|
||||
+ if (bytesWritten != bytesRead) {
|
||||
+ fprintf(stderr, "error writing attribute '%s'", dirent->d_name);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ pos += bytesWritten;
|
||||
+ stat.st_size -= bytesWritten;
|
||||
+
|
||||
+ if (stat.st_size <= 0)
|
||||
+ break;
|
||||
+ }
|
||||
+ close(attrToFD);
|
||||
+ close(attrFromFD);
|
||||
+ }
|
||||
+
|
||||
+ fs_close_attr_dir(attributes);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int
|
||||
+copy_attributes_by_name(const char *from, const char *to, int resolveLinks)
|
||||
+{
|
||||
+ int fromFd, toFd, result;
|
||||
+
|
||||
+ fromFd = open(from, O_RDONLY | (resolveLinks ? 0 : O_NOTRAVERSE));
|
||||
+ if (fromFd < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ toFd = open(to, O_RDONLY | (resolveLinks ? 0 : O_NOTRAVERSE));
|
||||
+ if (toFd < 0) {
|
||||
+ close(fromFd);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ result = copy_attributes(fromFd, toFd);
|
||||
+
|
||||
+ close(fromFd);
|
||||
+ close(toFd);
|
||||
+
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
+
|
||||
static bool
|
||||
errno_unsupported (int err)
|
||||
{
|
||||
@@ -708,6 +799,10 @@ copy_dir (char const *src_name_in, char const *dst_name_in, bool new_dst,
|
||||
error (0, errno, _("cannot access %s"), quote (src_name_in));
|
||||
return false;
|
||||
}
|
||||
+
|
||||
+ if (x->ignore_attributes == 0
|
||||
+ && copy_attributes_by_name(src_name_in, dst_name_in, true) != 0)
|
||||
+ fprintf(stderr, "%s: could not copy attributes\n", src_name_in);
|
||||
|
||||
/* For cp's -H option, dereference command line arguments, but do not
|
||||
dereference symlinks that are found via recursive traversal. */
|
||||
@@ -1380,6 +1475,11 @@ preserve_metadata:
|
||||
return_val = false;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ if (x->ignore_attributes == 0
|
||||
+ && copy_attributes(source_desc, dest_desc) != 0)
|
||||
+ fprintf(stderr, "%s: could not copy attributes\n", src_name);
|
||||
+
|
||||
|
||||
close_src_and_dst_desc:
|
||||
if (close (dest_desc) < 0)
|
||||
@@ -2302,6 +2402,12 @@ copy_internal (char const *src_name, char const *dst_name,
|
||||
dereference))
|
||||
goto un_backup;
|
||||
|
||||
+ if (x->ignore_attributes == 0
|
||||
+ && copy_attributes_by_name (earlier_file, dst_name,
|
||||
+ false) != 0)
|
||||
+ error (0, errno, "cannot copy attributes from %s\n",
|
||||
+ earlier_file);
|
||||
+
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -2702,6 +2808,11 @@ copy_internal (char const *src_name, char const *dst_name,
|
||||
preserving owner/group is a potential security problem. */
|
||||
}
|
||||
}
|
||||
+
|
||||
+ if (x->ignore_attributes == 0
|
||||
+ && copy_attributes_by_name(src_name, dst_name, false) != 0)
|
||||
+ fprintf(stderr, "%s: could not copy attributes\n", src_name);
|
||||
+
|
||||
}
|
||||
else
|
||||
{
|
||||
diff --git a/src/copy.h b/src/copy.h
|
||||
index bff5ff8..c62422c 100644
|
||||
--- a/src/copy.h
|
||||
+++ b/src/copy.h
|
||||
@@ -184,6 +184,9 @@ struct cp_options
|
||||
must be false. */
|
||||
bool require_preserve;
|
||||
|
||||
+ /* If nonzero, attributes will be ignored when copying. */
|
||||
+ int ignore_attributes;
|
||||
+
|
||||
/* If true, attempt to preserve the SELinux security context, too.
|
||||
Set this only if the kernel is SELinux enabled. */
|
||||
bool preserve_security_context;
|
||||
diff --git a/src/cp.c b/src/cp.c
|
||||
index 0ffd12d..a2a5e39 100644
|
||||
--- a/src/cp.c
|
||||
+++ b/src/cp.c
|
||||
@@ -73,6 +73,7 @@ struct dir_attr
|
||||
enum
|
||||
{
|
||||
ATTRIBUTES_ONLY_OPTION = CHAR_MAX + 1,
|
||||
+ IGNORE_ATTRIBUTES,
|
||||
COPY_CONTENTS_OPTION,
|
||||
NO_PRESERVE_ATTRIBUTES_OPTION,
|
||||
PARENTS_OPTION,
|
||||
@@ -121,6 +122,7 @@ static struct option const long_opts[] =
|
||||
{"copy-contents", no_argument, NULL, COPY_CONTENTS_OPTION},
|
||||
{"dereference", no_argument, NULL, 'L'},
|
||||
{"force", no_argument, NULL, 'f'},
|
||||
+ {"ignore-attributes", no_argument, NULL, IGNORE_ATTRIBUTES},
|
||||
{"interactive", no_argument, NULL, 'i'},
|
||||
{"link", no_argument, NULL, 'l'},
|
||||
{"no-clobber", no_argument, NULL, 'n'},
|
||||
@@ -179,6 +181,7 @@ Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n\
|
||||
-f, --force if an existing destination file cannot be\n\
|
||||
opened, remove it and try again (this option\n\
|
||||
is ignored when the -n option is also used)\n\
|
||||
+ --ignore-attributes do not copy attributes\n\
|
||||
-i, --interactive prompt before overwrite (overrides a previous -n\
|
||||
\n\
|
||||
option)\n\
|
||||
@@ -799,6 +802,7 @@ cp_option_init (struct cp_options *x)
|
||||
x->data_copy_required = true;
|
||||
x->require_preserve = false;
|
||||
x->recursive = false;
|
||||
+ x->ignore_attributes = false;
|
||||
x->sparse_mode = SPARSE_AUTO;
|
||||
x->symbolic_link = false;
|
||||
x->set_mode = false;
|
||||
@@ -1004,6 +1008,10 @@ main (int argc, char **argv)
|
||||
x.dereference = DEREF_COMMAND_LINE_ARGUMENTS;
|
||||
break;
|
||||
|
||||
+ case IGNORE_ATTRIBUTES:
|
||||
+ x.ignore_attributes = true;
|
||||
+ break;
|
||||
+
|
||||
case 'i':
|
||||
x.interactive = I_ASK_USER;
|
||||
break;
|
||||
diff --git a/src/dircolors.h b/src/dircolors.h
|
||||
index 74a4494..b8f94bd 100644
|
||||
--- a/src/dircolors.h
|
||||
+++ b/src/dircolors.h
|
||||
@@ -90,7 +90,7 @@ static char const G_line[] =
|
||||
'S','E','T','G','I','D',' ','3','0',';','4','3',' ','#',' ','f','i','l','e',' ','t','h','a','t',' ','i','s',' ','s','e','t','g','i','d',' ','(','g','+','s',')',0,
|
||||
'C','A','P','A','B','I','L','I','T','Y',' ','3','0',';','4','1',' ','#',' ','f','i','l','e',' ','w','i','t','h',' ','c','a','p','a','b','i','l','i','t','y',0,
|
||||
'S','T','I','C','K','Y','_','O','T','H','E','R','_','W','R','I','T','A','B','L','E',' ','3','0',';','4','2',' ','#',' ','d','i','r',' ','t','h','a','t',' ','i','s',' ','s','t','i','c','k','y',' ','a','n','d',' ','o','t','h','e','r','-','w','r','i','t','a','b','l','e',' ','(','+','t',',','o','+','w',')',0,
|
||||
- 'O','T','H','E','R','_','W','R','I','T','A','B','L','E',' ','3','4',';','4','2',' ','#',' ','d','i','r',' ','t','h','a','t',' ','i','s',' ','o','t','h','e','r','-','w','r','i','t','a','b','l','e',' ','(','o','+','w',')',' ','a','n','d',' ','n','o','t',' ','s','t','i','c','k','y',0,
|
||||
+ 'O','T','H','E','R','_','W','R','I','T','A','B','L','E',' ','3','4',';','4','3',' ','#',' ','d','i','r',' ','t','h','a','t',' ','i','s',' ','o','t','h','e','r','-','w','r','i','t','a','b','l','e',' ','(','o','+','w',')',' ','a','n','d',' ','n','o','t',' ','s','t','i','c','k','y',0,
|
||||
'S','T','I','C','K','Y',' ','3','7',';','4','4',' ','#',' ','d','i','r',' ','w','i','t','h',' ','t','h','e',' ','s','t','i','c','k','y',' ','b','i','t',' ','s','e','t',' ','(','+','t',')',' ','a','n','d',' ','n','o','t',' ','o','t','h','e','r','-','w','r','i','t','a','b','l','e',0,
|
||||
'#',' ','T','h','i','s',' ','i','s',' ','f','o','r',' ','f','i','l','e','s',' ','w','i','t','h',' ','e','x','e','c','u','t','e',' ','p','e','r','m','i','s','s','i','o','n',':',0,
|
||||
'E','X','E','C',' ','0','1',';','3','2',0,
|
||||
diff --git a/src/dircolors.hin b/src/dircolors.hin
|
||||
index 277711f..de3311d 100644
|
||||
--- a/src/dircolors.hin
|
||||
+++ b/src/dircolors.hin
|
||||
@@ -92,7 +92,7 @@ SETUID 37;41 # file that is setuid (u+s)
|
||||
SETGID 30;43 # file that is setgid (g+s)
|
||||
CAPABILITY 30;41 # file with capability
|
||||
STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w)
|
||||
-OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
|
||||
+OTHER_WRITABLE 34;43 # dir that is other-writable (o+w) and not sticky
|
||||
STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable
|
||||
|
||||
# This is for files with execute permission:
|
||||
diff --git a/src/ls.c b/src/ls.c
|
||||
index 6860dd4..19e1fae 100644
|
||||
--- a/src/ls.c
|
||||
+++ b/src/ls.c
|
||||
@@ -680,6 +680,11 @@ static struct ignore_pattern *hide_patterns;
|
||||
want to mess up the terminal if control chars get sent to it, and some
|
||||
quoting methods pass through control chars as-is. */
|
||||
static bool qmark_funny_chars;
|
||||
+#if defined(__HAIKU__) /* Default to show UTF8 chars in Haiku terminal. */
|
||||
+#define QMARK_FUNNY_CHARS_TTY 0
|
||||
+#else
|
||||
+#define QMARK_FUNNY_CHARS_TTY 1
|
||||
+#endif
|
||||
|
||||
/* Quoting options for file and dir name output. */
|
||||
|
||||
@@ -1528,7 +1533,7 @@ decode_switches (int argc, char **argv)
|
||||
bool sort_type_specified = false;
|
||||
bool kibibytes_specified = false;
|
||||
|
||||
- qmark_funny_chars = false;
|
||||
+ qmark_funny_chars = QMARK_FUNNY_CHARS_TTY;
|
||||
|
||||
/* initialize all switches to default settings */
|
||||
|
||||
@@ -1552,7 +1557,9 @@ decode_switches (int argc, char **argv)
|
||||
{
|
||||
format = many_per_line;
|
||||
/* See description of qmark_funny_chars, above. */
|
||||
+#ifndef __HAIKU__
|
||||
qmark_funny_chars = true;
|
||||
+#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2077,11 +2084,13 @@ decode_switches (int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
+#ifdef HAVE_NL_LANGINFO
|
||||
/* Note we leave %5b etc. alone so user widths/flags are honored. */
|
||||
if (strstr (long_time_format[0], "%b")
|
||||
|| strstr (long_time_format[1], "%b"))
|
||||
if (!abmon_init ())
|
||||
error (0, 0, _("error initializing month strings"));
|
||||
+#endif
|
||||
}
|
||||
|
||||
return optind;
|
||||
@@ -3919,6 +3928,7 @@ print_long_format (const struct fileinfo *f)
|
||||
p = buf;
|
||||
}
|
||||
|
||||
+#if !defined(__HAIKU__)
|
||||
if (f->stat_ok
|
||||
&& (S_ISCHR (f->stat.st_mode) || S_ISBLK (f->stat.st_mode)))
|
||||
{
|
||||
@@ -3935,6 +3945,7 @@ print_long_format (const struct fileinfo *f)
|
||||
p += file_size_width + 1;
|
||||
}
|
||||
else
|
||||
+#endif
|
||||
{
|
||||
char hbuf[LONGEST_HUMAN_READABLE + 1];
|
||||
char const *size =
|
||||
diff --git a/src/mv.c b/src/mv.c
|
||||
index 0bcc1bb..b608894 100644
|
||||
--- a/src/mv.c
|
||||
+++ b/src/mv.c
|
||||
@@ -125,6 +125,7 @@ cp_option_init (struct cp_options *x)
|
||||
x->reduce_diagnostics = false;
|
||||
x->data_copy_required = true;
|
||||
x->require_preserve = false; /* FIXME: maybe make this an option */
|
||||
+ x->ignore_attributes = false;
|
||||
x->require_preserve_context = false;
|
||||
x->preserve_xattr = true;
|
||||
x->require_preserve_xattr = false;
|
||||
diff --git a/src/remove.c b/src/remove.c
|
||||
index db8f993..e913ce3 100644
|
||||
--- a/src/remove.c
|
||||
+++ b/src/remove.c
|
||||
@@ -215,7 +215,7 @@ prompt (FTS const *fts, FTSENT const *ent, bool is_dir,
|
||||
wp_errno = errno;
|
||||
}
|
||||
|
||||
- if (write_protected || x->interactive == RMI_ALWAYS)
|
||||
+ if (write_protected || errno || x->interactive == RMI_ALWAYS)
|
||||
{
|
||||
if (0 <= write_protected && dirent_type == DT_UNKNOWN)
|
||||
{
|
||||
diff --git a/src/uname.c b/src/uname.c
|
||||
index 39bd28c..44cba6e 100644
|
||||
--- a/src/uname.c
|
||||
+++ b/src/uname.c
|
||||
@@ -49,6 +49,10 @@
|
||||
# include <mach-o/arch.h>
|
||||
#endif
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+# include <OS.h>
|
||||
+#endif
|
||||
+
|
||||
#include "system.h"
|
||||
#include "error.h"
|
||||
#include "quote.h"
|
||||
@@ -337,6 +341,30 @@ main (int argc, char **argv)
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
+
|
||||
+#ifdef __HAIKU__
|
||||
+ {
|
||||
+ cpu_topology_node_info root;
|
||||
+ uint32 count = 1;
|
||||
+ status_t error = get_cpu_topology_info(&root, &count);
|
||||
+ if (error != B_OK || count < 1)
|
||||
+ element = "unknown";
|
||||
+ else {
|
||||
+ switch (root.data.root.platform) {
|
||||
+ case B_CPU_x86:
|
||||
+ element = "x86";
|
||||
+ break;
|
||||
+ case B_CPU_x86_64:
|
||||
+ element = "x86_64";
|
||||
+ break;
|
||||
+ default:
|
||||
+ element = "other";
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
if (! (toprint == UINT_MAX && element == unknown))
|
||||
print_element (element);
|
||||
}
|
||||
--
|
||||
2.2.2
|
||||
|
||||
@@ -1,608 +0,0 @@
|
||||
From 2ad10befa33d331800346cab63417bebb1db3e6f Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Tue, 13 May 2014 17:18:52 +0000
|
||||
Subject: define __USE_GNU for wempcpy
|
||||
|
||||
|
||||
diff --git a/lib/fnmatch.c b/lib/fnmatch.c
|
||||
index 0a7e887..83dcaad 100644
|
||||
--- a/lib/fnmatch.c
|
||||
+++ b/lib/fnmatch.c
|
||||
@@ -21,6 +21,9 @@
|
||||
#ifndef _GNU_SOURCE
|
||||
# define _GNU_SOURCE 1
|
||||
#endif
|
||||
+#ifndef __USE_GNU
|
||||
+# define __USE_GNU 1
|
||||
+#endif
|
||||
|
||||
#include <fnmatch.h>
|
||||
|
||||
--
|
||||
2.14.2
|
||||
|
||||
|
||||
From 2524d0dde2a381c8f8c76620c3fe01befb8e83fd Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Tue, 13 May 2014 17:22:10 +0000
|
||||
Subject: force declaration of rpl_inet_ntop
|
||||
|
||||
|
||||
diff --git a/lib/arpa_inet.in.h b/lib/arpa_inet.in.h
|
||||
index bfe2232..4c68c5e 100644
|
||||
--- a/lib/arpa_inet.in.h
|
||||
+++ b/lib/arpa_inet.in.h
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
For more details, see the POSIX:2001 specification
|
||||
<http://www.opengroup.org/susv3xsh/inet_ntop.html>. */
|
||||
-# if @REPLACE_INET_NTOP@
|
||||
+# if 1
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef inet_ntop
|
||||
# define inet_ntop rpl_inet_ntop
|
||||
--
|
||||
2.14.2
|
||||
|
||||
|
||||
From c09450fe92943d42ee78ed86944d38ebcd18726a Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Tue, 13 May 2014 17:32:36 +0000
|
||||
Subject: Haiku defines mknod in unistd.h
|
||||
|
||||
|
||||
diff --git a/lib/mknod.c b/lib/mknod.c
|
||||
index d12d4fe..eee3fd3 100644
|
||||
--- a/lib/mknod.c
|
||||
+++ b/lib/mknod.c
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
+#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <errno.h>
|
||||
--
|
||||
2.14.2
|
||||
|
||||
|
||||
From ecd1f97294f01f1d3ee3d71e40601acd624ecd8a Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Tue, 13 May 2014 17:35:25 +0000
|
||||
Subject: protect the label, not used on Haiku
|
||||
|
||||
|
||||
diff --git a/lib/mountlist.c b/lib/mountlist.c
|
||||
index d880450..c8772dd 100644
|
||||
--- a/lib/mountlist.c
|
||||
+++ b/lib/mountlist.c
|
||||
@@ -1109,6 +1109,7 @@ read_file_system_list (bool need_fs_type)
|
||||
return mount_list;
|
||||
|
||||
|
||||
+#ifndef __HAIKU__
|
||||
free_then_fail: _GL_UNUSED_LABEL
|
||||
{
|
||||
int saved_errno = errno;
|
||||
@@ -1124,6 +1125,7 @@ read_file_system_list (bool need_fs_type)
|
||||
errno = saved_errno;
|
||||
return NULL;
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
/* Free a mount entry as returned from read_file_system_list (). */
|
||||
--
|
||||
2.14.2
|
||||
|
||||
|
||||
From 7f075f99fa7a5d78148ab5d79965a969db423c45 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Thu, 15 May 2014 15:40:32 +0000
|
||||
Subject: strchrnul needs __USE_GNU on Haiku
|
||||
|
||||
|
||||
diff --git a/lib/regex.h b/lib/regex.h
|
||||
index b236a1b..0646c86 100644
|
||||
--- a/lib/regex.h
|
||||
+++ b/lib/regex.h
|
||||
@@ -31,8 +31,10 @@ extern "C" {
|
||||
/* Define __USE_GNU to declare GNU extensions that violate the
|
||||
POSIX name space rules. */
|
||||
#ifdef _GNU_SOURCE
|
||||
+#ifndef __USE_GNU
|
||||
# define __USE_GNU 1
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#ifdef _REGEX_LARGE_OFFSETS
|
||||
|
||||
diff --git a/lib/string.in.h b/lib/string.in.h
|
||||
index 0e0e0c5..60edfa5 100644
|
||||
--- a/lib/string.in.h
|
||||
+++ b/lib/string.in.h
|
||||
@@ -37,6 +37,9 @@
|
||||
#define _GL_ALREADY_INCLUDING_STRING_H
|
||||
|
||||
/* The include_next requires a split double-inclusion guard. */
|
||||
+#ifndef __USE_GNU
|
||||
+#define __USE_GNU
|
||||
+#endif
|
||||
#@INCLUDE_NEXT@ @NEXT_STRING_H@
|
||||
|
||||
#undef _GL_ALREADY_INCLUDING_STRING_H
|
||||
--
|
||||
2.14.2
|
||||
|
||||
|
||||
From c7af057601c8fa8f0dd152c10257b44ec132c1f9 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Thu, 15 May 2014 20:13:58 +0000
|
||||
Subject: don't build hostid, nice, users, who
|
||||
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 60bb1ed..6a2c2df 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -1543,16 +1543,16 @@ nodist_src_libver_a_OBJECTS = src/version.$(OBJEXT)
|
||||
src_libver_a_OBJECTS = $(nodist_src_libver_a_OBJECTS)
|
||||
am__EXEEXT_1 = src/arch$(EXEEXT) src/coreutils$(EXEEXT) \
|
||||
src/hostname$(EXEEXT)
|
||||
-am__EXEEXT_2 = src/chroot$(EXEEXT) src/df$(EXEEXT) src/hostid$(EXEEXT) \
|
||||
- src/libstdbuf.so$(EXEEXT) src/nice$(EXEEXT) src/pinky$(EXEEXT) \
|
||||
+am__EXEEXT_2 = src/chroot$(EXEEXT) src/df$(EXEEXT) \
|
||||
+ src/libstdbuf.so$(EXEEXT) \
|
||||
src/stdbuf$(EXEEXT) src/stty$(EXEEXT) src/timeout$(EXEEXT) \
|
||||
- src/uptime$(EXEEXT) src/users$(EXEEXT) src/who$(EXEEXT)
|
||||
+ src/uptime$(EXEEXT) src/users$(EXEEXT) src/who$(EXEEXT)
|
||||
am__EXEEXT_3 = src/[$(EXEEXT) src/b2sum$(EXEEXT) src/base64$(EXEEXT) \
|
||||
src/base32$(EXEEXT) src/basename$(EXEEXT) src/cat$(EXEEXT) \
|
||||
src/chcon$(EXEEXT) src/chgrp$(EXEEXT) src/chmod$(EXEEXT) \
|
||||
src/chown$(EXEEXT) src/cksum$(EXEEXT) src/comm$(EXEEXT) \
|
||||
src/cp$(EXEEXT) src/csplit$(EXEEXT) src/cut$(EXEEXT) \
|
||||
- src/date$(EXEEXT) src/dd$(EXEEXT) src/dir$(EXEEXT) \
|
||||
+ src/date$(EXEEXT) src/dd$(EXEEXT) src/dir$(EXEEXT) \
|
||||
src/dircolors$(EXEEXT) src/dirname$(EXEEXT) src/du$(EXEEXT) \
|
||||
src/echo$(EXEEXT) src/env$(EXEEXT) src/expand$(EXEEXT) \
|
||||
src/expr$(EXEEXT) src/factor$(EXEEXT) src/false$(EXEEXT) \
|
||||
@@ -4477,7 +4477,7 @@ WARN_ON_USE_H = $(top_srcdir)/lib/warn-on-use.h
|
||||
# FIXME: once lib/ and gnulib-tests/ are also converted, hoist to Makefile.am
|
||||
AM_CFLAGS = $(WERROR_CFLAGS)
|
||||
no_install__progs = src/arch src/coreutils src/hostname
|
||||
-build_if_possible__progs = src/chroot src/df src/hostid \
|
||||
+build_if_possible__progs = src/chroot src/df \
|
||||
src/libstdbuf.so src/nice src/pinky src/stdbuf src/stty \
|
||||
src/timeout src/uptime src/users src/who
|
||||
default__progs = src/[ src/b2sum src/base64 src/base32 src/basename \
|
||||
--
|
||||
2.14.2
|
||||
|
||||
|
||||
From 4215e27a5cd2f0e04547345544301b7d85aba915 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Fri, 6 Feb 2015 20:24:12 +0000
|
||||
Subject: import Haiku changes, fix warnings.
|
||||
|
||||
|
||||
diff --git a/INSTALL b/INSTALL
|
||||
index 8865734..5bc8a54 100644
|
||||
--- a/INSTALL
|
||||
+++ b/INSTALL
|
||||
@@ -245,10 +245,10 @@ directory contains several dysfunctional programs; working variants of
|
||||
these programs are available in '/usr/bin'. So, if you need '/usr/ucb'
|
||||
in your 'PATH', put it _after_ '/usr/bin'.
|
||||
|
||||
- On Haiku, software installed for all users goes in '/boot/common',
|
||||
+ On Haiku, software installed for all users goes in '/boot/system',
|
||||
not '/usr/local'. It is recommended to use the following options:
|
||||
|
||||
- ./configure --prefix=/boot/common
|
||||
+ ./configure --prefix=/boot/system
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
diff --git a/lib/localcharset.c b/lib/localcharset.c
|
||||
index f16a1a1..418e2af 100644
|
||||
--- a/lib/localcharset.c
|
||||
+++ b/lib/localcharset.c
|
||||
@@ -129,7 +129,7 @@ get_charset_aliases (void)
|
||||
cp = charset_aliases;
|
||||
if (cp == NULL)
|
||||
{
|
||||
-#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__ || defined OS2)
|
||||
+#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__ || defined OS2 || defined __HAIKU__)
|
||||
char *malloc_dir = NULL;
|
||||
const char *dir;
|
||||
const char *base = "charset.alias";
|
||||
@@ -376,6 +376,13 @@ get_charset_aliases (void)
|
||||
"CP1386" "\0" "GBK" "\0"
|
||||
"CP3372" "\0" "EUC-JP" "\0";
|
||||
# endif
|
||||
+
|
||||
+# if defined __HAIKU__
|
||||
+ /* To avoid the troubles of installing a separate file in the same
|
||||
+ directory as the DLL and of retrieving the DLL's directory at
|
||||
+ runtime, simply inline the aliases here. */
|
||||
+ cp = "UTF-8" "\0";
|
||||
+# endif
|
||||
#endif
|
||||
|
||||
charset_aliases = cp;
|
||||
diff --git a/src/copy.c b/src/copy.c
|
||||
index 165c5ce..cf4f51b 100644
|
||||
--- a/src/copy.c
|
||||
+++ b/src/copy.c
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
+#include <unistd.h>
|
||||
#include <assert.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/types.h>
|
||||
@@ -65,6 +66,10 @@
|
||||
#include "yesno.h"
|
||||
#include "selinux.h"
|
||||
|
||||
+#if (defined(__BEOS__) || defined(__HAIKU__))
|
||||
+# include <fs_attr.h>
|
||||
+#endif
|
||||
+
|
||||
#if USE_XATTR
|
||||
# include <attr/error_context.h>
|
||||
# include <attr/libattr.h>
|
||||
@@ -591,6 +596,92 @@ is_ancestor (const struct stat *sb, const struct dir_list *ancestors)
|
||||
return false;
|
||||
}
|
||||
|
||||
+
|
||||
+static int
|
||||
+copy_attributes(int fromFd, int toFd)
|
||||
+{
|
||||
+ struct dirent *dirent;
|
||||
+ char buffer[65536];
|
||||
+
|
||||
+ DIR *attributes = fs_fopen_attr_dir(fromFd);
|
||||
+ if (attributes == NULL)
|
||||
+ return errno == B_UNSUPPORTED ? 0 : -1;
|
||||
+
|
||||
+ while ((dirent = fs_read_attr_dir(attributes)) != NULL) {
|
||||
+ struct stat stat;
|
||||
+ off_t pos = 0;
|
||||
+ int attrFromFD = fs_fopen_attr(fromFd, dirent->d_name, 0, O_RDONLY);
|
||||
+ int attrToFD;
|
||||
+
|
||||
+ if (attrFromFD < 0)
|
||||
+ continue;
|
||||
+
|
||||
+ if (fstat(attrFromFD, &stat) != 0) {
|
||||
+ close(attrFromFD);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ attrToFD = fs_fopen_attr(toFd, dirent->d_name, stat.st_type,
|
||||
+ O_WRONLY | O_TRUNC | O_CREAT);
|
||||
+ if (attrToFD < 0) {
|
||||
+ close(attrFromFD);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ while (true) {
|
||||
+ ssize_t bytesRead, bytesWritten;
|
||||
+
|
||||
+ bytesRead = read_pos(attrFromFD, pos, buffer, sizeof(buffer));
|
||||
+ if (bytesRead < 0) {
|
||||
+ fprintf(stderr, "error reading attribute '%s'", dirent->d_name);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ bytesWritten = write_pos(attrToFD, pos, buffer, bytesRead);
|
||||
+ if (bytesWritten != bytesRead) {
|
||||
+ fprintf(stderr, "error writing attribute '%s'", dirent->d_name);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ pos += bytesWritten;
|
||||
+ stat.st_size -= bytesWritten;
|
||||
+
|
||||
+ if (stat.st_size <= 0)
|
||||
+ break;
|
||||
+ }
|
||||
+ close(attrToFD);
|
||||
+ close(attrFromFD);
|
||||
+ }
|
||||
+
|
||||
+ fs_close_attr_dir(attributes);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int
|
||||
+copy_attributes_by_name(const char *from, const char *to, int resolveLinks)
|
||||
+{
|
||||
+ int fromFd, toFd, result;
|
||||
+
|
||||
+ fromFd = open(from, O_RDONLY | (resolveLinks ? 0 : O_NOTRAVERSE));
|
||||
+ if (fromFd < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ toFd = open(to, O_RDONLY | (resolveLinks ? 0 : O_NOTRAVERSE));
|
||||
+ if (toFd < 0) {
|
||||
+ close(fromFd);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ result = copy_attributes(fromFd, toFd);
|
||||
+
|
||||
+ close(fromFd);
|
||||
+ close(toFd);
|
||||
+
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
+
|
||||
static bool
|
||||
errno_unsupported (int err)
|
||||
{
|
||||
@@ -724,6 +815,10 @@ copy_dir (char const *src_name_in, char const *dst_name_in, bool new_dst,
|
||||
error (0, errno, _("cannot access %s"), quoteaf (src_name_in));
|
||||
return false;
|
||||
}
|
||||
+
|
||||
+ if (x->ignore_attributes == 0
|
||||
+ && copy_attributes_by_name(src_name_in, dst_name_in, true) != 0)
|
||||
+ fprintf(stderr, "%s: could not copy attributes\n", src_name_in);
|
||||
|
||||
/* For cp's -H option, dereference command line arguments, but do not
|
||||
dereference symlinks that are found via recursive traversal. */
|
||||
@@ -1392,6 +1487,11 @@ preserve_metadata:
|
||||
return_val = false;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ if (x->ignore_attributes == 0
|
||||
+ && copy_attributes(source_desc, dest_desc) != 0)
|
||||
+ fprintf(stderr, "%s: could not copy attributes\n", src_name);
|
||||
+
|
||||
|
||||
close_src_and_dst_desc:
|
||||
if (close (dest_desc) < 0)
|
||||
@@ -2313,6 +2413,12 @@ copy_internal (char const *src_name, char const *dst_name,
|
||||
dereference))
|
||||
goto un_backup;
|
||||
|
||||
+ if (x->ignore_attributes == 0
|
||||
+ && copy_attributes_by_name (earlier_file, dst_name,
|
||||
+ false) != 0)
|
||||
+ error (0, errno, "cannot copy attributes from %s\n",
|
||||
+ earlier_file);
|
||||
+
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -2729,6 +2835,11 @@ copy_internal (char const *src_name, char const *dst_name,
|
||||
preserving owner/group is a potential security problem. */
|
||||
}
|
||||
}
|
||||
+
|
||||
+ if (x->ignore_attributes == 0
|
||||
+ && copy_attributes_by_name(src_name, dst_name, false) != 0)
|
||||
+ fprintf(stderr, "%s: could not copy attributes\n", src_name);
|
||||
+
|
||||
}
|
||||
else
|
||||
{
|
||||
diff --git a/src/copy.h b/src/copy.h
|
||||
index eef5663..89b4322 100644
|
||||
--- a/src/copy.h
|
||||
+++ b/src/copy.h
|
||||
@@ -187,6 +187,9 @@ struct cp_options
|
||||
must be false. */
|
||||
bool require_preserve;
|
||||
|
||||
+ /* If nonzero, attributes will be ignored when copying. */
|
||||
+ int ignore_attributes;
|
||||
+
|
||||
/* If true, attempt to preserve the SELinux security context, too.
|
||||
Set this only if the kernel is SELinux enabled. */
|
||||
bool preserve_security_context;
|
||||
diff --git a/src/cp.c b/src/cp.c
|
||||
index 6743f10..d2f4d6c 100644
|
||||
--- a/src/cp.c
|
||||
+++ b/src/cp.c
|
||||
@@ -74,6 +74,7 @@ struct dir_attr
|
||||
enum
|
||||
{
|
||||
ATTRIBUTES_ONLY_OPTION = CHAR_MAX + 1,
|
||||
+ IGNORE_ATTRIBUTES,
|
||||
COPY_CONTENTS_OPTION,
|
||||
NO_PRESERVE_ATTRIBUTES_OPTION,
|
||||
PARENTS_OPTION,
|
||||
@@ -122,6 +123,7 @@ static struct option const long_opts[] =
|
||||
{"copy-contents", no_argument, NULL, COPY_CONTENTS_OPTION},
|
||||
{"dereference", no_argument, NULL, 'L'},
|
||||
{"force", no_argument, NULL, 'f'},
|
||||
+ {"ignore-attributes", no_argument, NULL, IGNORE_ATTRIBUTES},
|
||||
{"interactive", no_argument, NULL, 'i'},
|
||||
{"link", no_argument, NULL, 'l'},
|
||||
{"no-clobber", no_argument, NULL, 'n'},
|
||||
@@ -180,6 +182,7 @@ Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n\
|
||||
-f, --force if an existing destination file cannot be\n\
|
||||
opened, remove it and try again (this option\n\
|
||||
is ignored when the -n option is also used)\n\
|
||||
+ --ignore-attributes do not copy attributes\n\
|
||||
-i, --interactive prompt before overwrite (overrides a previous -n\
|
||||
\n\
|
||||
option)\n\
|
||||
@@ -809,6 +812,7 @@ cp_option_init (struct cp_options *x)
|
||||
x->data_copy_required = true;
|
||||
x->require_preserve = false;
|
||||
x->recursive = false;
|
||||
+ x->ignore_attributes = false;
|
||||
x->sparse_mode = SPARSE_AUTO;
|
||||
x->symbolic_link = false;
|
||||
x->set_mode = false;
|
||||
@@ -1010,6 +1014,10 @@ main (int argc, char **argv)
|
||||
x.dereference = DEREF_COMMAND_LINE_ARGUMENTS;
|
||||
break;
|
||||
|
||||
+ case IGNORE_ATTRIBUTES:
|
||||
+ x.ignore_attributes = true;
|
||||
+ break;
|
||||
+
|
||||
case 'i':
|
||||
x.interactive = I_ASK_USER;
|
||||
break;
|
||||
diff --git a/src/dircolors.h b/src/dircolors.h
|
||||
index 259336d..2529504 100644
|
||||
--- a/src/dircolors.h
|
||||
+++ b/src/dircolors.h
|
||||
@@ -59,7 +59,7 @@ static char const G_line[] =
|
||||
'S','E','T','G','I','D',' ','3','0',';','4','3',' ','#',' ','f','i','l','e',' ','t','h','a','t',' ','i','s',' ','s','e','t','g','i','d',' ','(','g','+','s',')',0,
|
||||
'C','A','P','A','B','I','L','I','T','Y',' ','3','0',';','4','1',' ','#',' ','f','i','l','e',' ','w','i','t','h',' ','c','a','p','a','b','i','l','i','t','y',0,
|
||||
'S','T','I','C','K','Y','_','O','T','H','E','R','_','W','R','I','T','A','B','L','E',' ','3','0',';','4','2',' ','#',' ','d','i','r',' ','t','h','a','t',' ','i','s',' ','s','t','i','c','k','y',' ','a','n','d',' ','o','t','h','e','r','-','w','r','i','t','a','b','l','e',' ','(','+','t',',','o','+','w',')',0,
|
||||
- 'O','T','H','E','R','_','W','R','I','T','A','B','L','E',' ','3','4',';','4','2',' ','#',' ','d','i','r',' ','t','h','a','t',' ','i','s',' ','o','t','h','e','r','-','w','r','i','t','a','b','l','e',' ','(','o','+','w',')',' ','a','n','d',' ','n','o','t',' ','s','t','i','c','k','y',0,
|
||||
+ 'O','T','H','E','R','_','W','R','I','T','A','B','L','E',' ','3','4',';','4','3',' ','#',' ','d','i','r',' ','t','h','a','t',' ','i','s',' ','o','t','h','e','r','-','w','r','i','t','a','b','l','e',' ','(','o','+','w',')',' ','a','n','d',' ','n','o','t',' ','s','t','i','c','k','y',0,
|
||||
'S','T','I','C','K','Y',' ','3','7',';','4','4',' ','#',' ','d','i','r',' ','w','i','t','h',' ','t','h','e',' ','s','t','i','c','k','y',' ','b','i','t',' ','s','e','t',' ','(','+','t',')',' ','a','n','d',' ','n','o','t',' ','o','t','h','e','r','-','w','r','i','t','a','b','l','e',0,
|
||||
'#',' ','T','h','i','s',' ','i','s',' ','f','o','r',' ','f','i','l','e','s',' ','w','i','t','h',' ','e','x','e','c','u','t','e',' ','p','e','r','m','i','s','s','i','o','n',':',0,
|
||||
'E','X','E','C',' ','0','1',';','3','2',0,
|
||||
diff --git a/src/dircolors.hin b/src/dircolors.hin
|
||||
index fca51f2..83706ba 100644
|
||||
--- a/src/dircolors.hin
|
||||
+++ b/src/dircolors.hin
|
||||
@@ -61,7 +61,7 @@ SETUID 37;41 # file that is setuid (u+s)
|
||||
SETGID 30;43 # file that is setgid (g+s)
|
||||
CAPABILITY 30;41 # file with capability
|
||||
STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w)
|
||||
-OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
|
||||
+OTHER_WRITABLE 34;43 # dir that is other-writable (o+w) and not sticky
|
||||
STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable
|
||||
|
||||
# This is for files with execute permission:
|
||||
diff --git a/src/ls.c b/src/ls.c
|
||||
index 4becd06..7641096 100644
|
||||
--- a/src/ls.c
|
||||
+++ b/src/ls.c
|
||||
@@ -708,6 +708,11 @@ static struct ignore_pattern *hide_patterns;
|
||||
want to mess up the terminal if control chars get sent to it, and some
|
||||
quoting methods pass through control chars as-is. */
|
||||
static bool qmark_funny_chars;
|
||||
+#if defined(__HAIKU__) /* Default to show UTF8 chars in Haiku terminal. */
|
||||
+#define QMARK_FUNNY_CHARS_TTY 0
|
||||
+#else
|
||||
+#define QMARK_FUNNY_CHARS_TTY 1
|
||||
+#endif
|
||||
|
||||
/* Quoting options for file and dir name output. */
|
||||
|
||||
@@ -1684,7 +1689,7 @@ decode_switches (int argc, char **argv)
|
||||
bool sort_type_specified = false;
|
||||
bool kibibytes_specified = false;
|
||||
|
||||
- qmark_funny_chars = false;
|
||||
+ qmark_funny_chars = QMARK_FUNNY_CHARS_TTY;
|
||||
|
||||
/* initialize all switches to default settings */
|
||||
|
||||
@@ -1709,7 +1714,9 @@ decode_switches (int argc, char **argv)
|
||||
format = many_per_line;
|
||||
set_quoting_style (NULL, shell_escape_quoting_style);
|
||||
/* See description of qmark_funny_chars, above. */
|
||||
+#ifndef __HAIKU__
|
||||
qmark_funny_chars = true;
|
||||
+#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4122,6 +4129,7 @@ print_long_format (const struct fileinfo *f)
|
||||
p = buf;
|
||||
}
|
||||
|
||||
+#if !defined(__HAIKU__)
|
||||
if (f->stat_ok
|
||||
&& (S_ISCHR (f->stat.st_mode) || S_ISBLK (f->stat.st_mode)))
|
||||
{
|
||||
@@ -4138,6 +4146,7 @@ print_long_format (const struct fileinfo *f)
|
||||
p += file_size_width + 1;
|
||||
}
|
||||
else
|
||||
+#endif
|
||||
{
|
||||
char hbuf[LONGEST_HUMAN_READABLE + 1];
|
||||
char const *size =
|
||||
diff --git a/src/mv.c b/src/mv.c
|
||||
index 9e80193..675c803 100644
|
||||
--- a/src/mv.c
|
||||
+++ b/src/mv.c
|
||||
@@ -126,6 +126,7 @@ cp_option_init (struct cp_options *x)
|
||||
x->reduce_diagnostics = false;
|
||||
x->data_copy_required = true;
|
||||
x->require_preserve = false; /* FIXME: maybe make this an option */
|
||||
+ x->ignore_attributes = false;
|
||||
x->require_preserve_context = false;
|
||||
x->preserve_xattr = true;
|
||||
x->require_preserve_xattr = false;
|
||||
diff --git a/src/remove.c b/src/remove.c
|
||||
index b2740c7..e4df0a6 100644
|
||||
--- a/src/remove.c
|
||||
+++ b/src/remove.c
|
||||
@@ -214,7 +214,7 @@ prompt (FTS const *fts, FTSENT const *ent, bool is_dir,
|
||||
wp_errno = errno;
|
||||
}
|
||||
|
||||
- if (write_protected || x->interactive == RMI_ALWAYS)
|
||||
+ if (write_protected || errno || x->interactive == RMI_ALWAYS)
|
||||
{
|
||||
if (0 <= write_protected && dirent_type == DT_UNKNOWN)
|
||||
{
|
||||
diff --git a/src/uname.c b/src/uname.c
|
||||
index 6635a6a..4187ffb 100644
|
||||
--- a/src/uname.c
|
||||
+++ b/src/uname.c
|
||||
@@ -49,6 +49,10 @@
|
||||
# include <mach-o/arch.h>
|
||||
#endif
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+# include <OS.h>
|
||||
+#endif
|
||||
+
|
||||
#include "system.h"
|
||||
#include "die.h"
|
||||
#include "error.h"
|
||||
@@ -338,6 +342,30 @@ main (int argc, char **argv)
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
+
|
||||
+#ifdef __HAIKU__
|
||||
+ {
|
||||
+ cpu_topology_node_info root;
|
||||
+ uint32 count = 1;
|
||||
+ status_t error = get_cpu_topology_info(&root, &count);
|
||||
+ if (error != B_OK || count < 1)
|
||||
+ element = "unknown";
|
||||
+ else {
|
||||
+ switch (root.data.root.platform) {
|
||||
+ case B_CPU_x86:
|
||||
+ element = "x86";
|
||||
+ break;
|
||||
+ case B_CPU_x86_64:
|
||||
+ element = "x86_64";
|
||||
+ break;
|
||||
+ default:
|
||||
+ element = "other";
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
if (! (toprint == UINT_MAX && element == unknown))
|
||||
print_element (element);
|
||||
}
|
||||
--
|
||||
2.14.2
|
||||
|
||||
Reference in New Issue
Block a user