.
OBS-URL: https://build.opensuse.org/package/show/shells/ksh?expand=0&rev=27
This commit is contained in:
parent
6fd7b98491
commit
c81913902b
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 8 15:10:07 CET 2010 - werner@suse.de
|
||||||
|
|
||||||
|
- Make it build for SLES10 and SLES9
|
||||||
|
- Check if the shell used for build ignores SIGPIPE
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Mar 5 20:07:06 UTC 2010 - guido+opensuse.org@berhoerster.name
|
Fri Mar 5 20:07:06 UTC 2010 - guido+opensuse.org@berhoerster.name
|
||||||
|
|
||||||
|
53
ksh.spec
53
ksh.spec
@ -19,13 +19,12 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: ksh
|
Name: ksh
|
||||||
BuildRequires: bind-libs bind-utils bison flex gdbm-devel glibc-devel ncurses-devel procps psmisc pwdutils zlib-devel
|
BuildRequires: bind-utils bison flex gdbm-devel glibc-devel ncurses-devel procps psmisc pwdutils zlib-devel
|
||||||
%if %suse_version > 1020
|
%if %suse_version > 1020
|
||||||
BuildRequires: libbz2-devel
|
BuildRequires: bind-libs libbz2-devel
|
||||||
%endif
|
%endif
|
||||||
%if %suse_version > 1120
|
%if %suse_version > 1120
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
BuildRequires: gcc43
|
|
||||||
%endif
|
%endif
|
||||||
Url: http://www.research.att.com/~gsf/download/
|
Url: http://www.research.att.com/~gsf/download/
|
||||||
License: Common Public License Version 1.0 (CPL1.0)
|
License: Common Public License Version 1.0 (CPL1.0)
|
||||||
@ -136,36 +135,39 @@ find share/ -type d -a -empty | xargs -r rm -vrf
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
typeset -i IGNORED=0x$(ps --no-headers -o ignored $$)
|
||||||
|
typeset -i SIGPIPE=0x1000
|
||||||
|
if ((IGNORED & SIGPIPE)) ; then
|
||||||
|
# Warn ans show signal state of this working shell
|
||||||
|
echo Warning: signal SIGPIPE is ignored by this shell 1>&2
|
||||||
|
ps s $$ 1>&2
|
||||||
|
fi
|
||||||
# This package failed when testing with -Wl,-as-needed being default.
|
# This package failed when testing with -Wl,-as-needed being default.
|
||||||
# So we disable it here, if you want to retest, just delete this comment and the line below.
|
# So we disable it here, if you want to retest, just delete this
|
||||||
|
# comment and the line below.
|
||||||
export SUSE_ASNEEDED=0
|
export SUSE_ASNEEDED=0
|
||||||
test -n "${!LC_*}" && unset "${!LC_*}"
|
test -n "${!LC_*}" && unset "${!LC_*}"
|
||||||
%if %suse_version > 1120
|
|
||||||
CC=gcc-4.3
|
|
||||||
%else
|
|
||||||
CC=gcc
|
CC=gcc
|
||||||
%endif
|
|
||||||
cflags ()
|
cflags ()
|
||||||
{
|
{
|
||||||
local flag=$1; shift
|
local flag=$1; shift
|
||||||
case "${RPM_OPT_FLAGS}" in
|
local var=$1; shift
|
||||||
|
test -n "${flag}" -a -n "${var}" || return
|
||||||
|
case "${!var}" in
|
||||||
*${flag}*) return
|
*${flag}*) return
|
||||||
esac
|
esac
|
||||||
test -z "$1" && return
|
|
||||||
case "$flag" in
|
case "$flag" in
|
||||||
-Wl,*)
|
-Wl,*)
|
||||||
set -o noclobber
|
set -o noclobber
|
||||||
echo 'int main () { return 0; }' > ldtest.c
|
echo 'int main () { return 0; }' > ldtest.c
|
||||||
if $CC -Werror $flag -o /dev/null -xc ldtest.c > /dev/null 2>&1 ; then
|
if ${CC:-gcc} -Werror $flag -o /dev/null -xc ldtest.c > /dev/null 2>&1 ; then
|
||||||
local var=$1; shift
|
|
||||||
eval $var=\${$var:+\$$var\ }$flag
|
eval $var=\${$var:+\$$var\ }$flag
|
||||||
fi
|
fi
|
||||||
set +o noclobber
|
set +o noclobber
|
||||||
rm -f ldtest.c
|
rm -f ldtest.c
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if $CC -Werror $flag -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then
|
if ${CC:-gcc} -Werror $flag -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then
|
||||||
local var=$1; shift
|
|
||||||
eval $var=\${$var:+\$$var\ }$flag
|
eval $var=\${$var:+\$$var\ }$flag
|
||||||
fi
|
fi
|
||||||
esac
|
esac
|
||||||
@ -177,9 +179,14 @@ find share/ -type d -a -empty | xargs -r rm -vrf
|
|||||||
# If _you_ are knowing how to fix this in the autogenerated
|
# If _you_ are knowing how to fix this in the autogenerated
|
||||||
# sources of ksh/ast without breaking them, then let me know.
|
# sources of ksh/ast without breaking them, then let me know.
|
||||||
#
|
#
|
||||||
IGNORE="-Wno-missing-braces -Wno-unknown-pragmas -Wno-parentheses"
|
cflags -Wno-missing-braces IGNORE
|
||||||
IGNORE="$IGNORE -Wno-char-subscripts -Wno-uninitialized -Wno-implicit"
|
cflags -Wno-unknown-pragmas IGNORE
|
||||||
IGNORE="$IGNORE -Wno-unused-value -Wno-unused-variable -Wno-type-limits"
|
cflags -Wno-parentheses IGNORE
|
||||||
|
cflags -Wno-char-subscripts IGNORE
|
||||||
|
cflags -Wno-uninitialized IGNORE
|
||||||
|
cflags -Wno-implicit IGNORE
|
||||||
|
cflags -Wno-unused-value IGNORE
|
||||||
|
cflags -Wno-type-limits IGNORE
|
||||||
#
|
#
|
||||||
# Do not use -DSHOPT_SPAWN=1 and/or -DSHOPT_AMP=1 this would cause
|
# Do not use -DSHOPT_SPAWN=1 and/or -DSHOPT_AMP=1 this would cause
|
||||||
# errors due race conditions while executing the test suite.
|
# errors due race conditions while executing the test suite.
|
||||||
@ -318,13 +325,13 @@ find share/ -type d -a -empty | xargs -r rm -vrf
|
|||||||
typeset -i failed=0
|
typeset -i failed=0
|
||||||
ln -sf ${root}/lib ${test}/../
|
ln -sf ${root}/lib ${test}/../
|
||||||
${root}/bin/ksh.test shtests
|
${root}/bin/ksh.test shtests
|
||||||
|
killall -q -s 9 ${root}/bin/ksh.test || true
|
||||||
${root}/bin/ksh.test %{S:10}
|
${root}/bin/ksh.test %{S:10}
|
||||||
${root}/bin/ksh.test %{S:11}
|
${root}/bin/ksh.test %{S:11}
|
||||||
%if %suse_version <= 1120
|
if test $((IGNORED & SIGPIPE)) -eq 0 ; then
|
||||||
# This fails in current factory (aka next 11.3) it
|
# This may fail in current factory (aka next 11.3)
|
||||||
# seems not to be the gcc as gcc-4.3 also fails
|
|
||||||
${root}/bin/ksh.test -c 'g="false"; trap "print -u2 PIPED; \$g && exit 0 ; g=true" PIPE ; while true ; do echo hello ; done' | head -n 10
|
${root}/bin/ksh.test -c 'g="false"; trap "print -u2 PIPED; \$g && exit 0 ; g=true" PIPE ; while true ; do echo hello ; done' | head -n 10
|
||||||
%endif
|
fi
|
||||||
killall -q -s 9 ${root}/bin/ksh.test || true
|
killall -q -s 9 ${root}/bin/ksh.test || true
|
||||||
popd
|
popd
|
||||||
pushd ${root}/bin
|
pushd ${root}/bin
|
||||||
@ -445,8 +452,8 @@ fi
|
|||||||
%if %suse_version > 1120
|
%if %suse_version > 1120
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
if [ $1 -eq 0 ]; then
|
if test $1 -eq 0 ; then
|
||||||
/usr/sbin/update-alternatives --remove ksh /%{_lib}/ast/bin/ksh
|
%{_sbindir}/update-alternatives --remove ksh /%{_lib}/ast/bin/ksh
|
||||||
fi
|
fi
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user