forked from pool/ncurses
.
OBS-URL: https://build.opensuse.org/package/show/Base:System/ncurses?expand=0&rev=360
This commit is contained in:
102
ncurses.spec
102
ncurses.spec
@@ -29,6 +29,7 @@ Name: ncurses
|
||||
%if %{with hasheddb}
|
||||
BuildRequires: db-devel
|
||||
%endif
|
||||
BuildRequires: expect
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: screen
|
||||
@@ -66,6 +67,7 @@ Source6: edit.sed
|
||||
Source7: baselibs.conf
|
||||
Patch0: ncurses-6.1.dif
|
||||
Patch1: ncurses-5.9-ibm327x.dif
|
||||
Patch2: ncurses-6.1-weakpthreads.dif
|
||||
Patch4: ncurses-5.7-tack.dif
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%global _miscdir %{_datadir}/misc
|
||||
@@ -221,7 +223,7 @@ the ncurses library in its ABI version 5 form.
|
||||
|
||||
%package -n tack
|
||||
Summary: Terminfo action checker
|
||||
License: GPL-2.0+
|
||||
License: GPL-2.0-or-later
|
||||
Group: Development/Tools/Building
|
||||
Provides: ncurses-devel:%{_bindir}/tack
|
||||
Requires: ncurses = %{version}-%{release}
|
||||
@@ -251,6 +253,7 @@ rm -fr tack
|
||||
tar -xzf %{S:5}
|
||||
mv tack-* tack
|
||||
%patch1 -p0 -b .327x
|
||||
%patch2 -p0 -b .pth
|
||||
%patch4 -p0 -b .hs
|
||||
%patch0 -p0 -b .p0
|
||||
|
||||
@@ -388,6 +391,7 @@ mv tack-* tack
|
||||
--without-debug \
|
||||
--without-profile \
|
||||
--without-manpage-tbl \
|
||||
--without-tests \
|
||||
--with-shared \
|
||||
--with-normal \
|
||||
--with-manpage-format=gzip \
|
||||
@@ -529,28 +533,46 @@ mv tack-* tack
|
||||
sh %{S:6} --cflags "-D_GNU_SOURCE -I%{_incdir}/ncursesw" --libs "-lncursesw" --libs "-ltinfow" %{root}%{_bindir}/ncursesw6-config
|
||||
mkdir pc
|
||||
mv -f %{root}%{_libdir}/pkgconfig/*.pc pc/
|
||||
#
|
||||
# Some tests
|
||||
#
|
||||
%if 0%{?qemu_user_space_build:1}%{?_crossbuild}
|
||||
echo "Skipping tests due to running under QEMU / cross-building"
|
||||
%else
|
||||
#
|
||||
# Check for tack program on base of above ncurses
|
||||
#
|
||||
LD_LIBRARY_PATH=$PWD/lib
|
||||
export LD_LIBRARY_PATH PATH
|
||||
pushd tack/
|
||||
%if 0%{?qemu_user_space_build:1}%{?_crossbuild}
|
||||
echo "Skipping LDD test due to running under QEMU / cross-building"
|
||||
%else
|
||||
ldd ./tack
|
||||
%endif
|
||||
popd
|
||||
unset LD_LIBRARY_PATH
|
||||
#
|
||||
# Make the test suite for ncursesw6
|
||||
#
|
||||
pushd test
|
||||
CFLAGS="$CFLAGS -I%{root}%{_incdir}" LDFLAGS="$LDFLAGS -L%{root}%{_libdir}" \
|
||||
./configure --with-ncursesw --enable-widec --prefix=$PWD
|
||||
LD_LIBRARY_PATH=%{root}%{_libdir} \
|
||||
make %{?_smp_mflags} TEST_ARGS='-lformw -lmenuw -lpanelw -lncursesw -lticw -ltinfow -Wl,--as-needed'
|
||||
make install TEST_ARGS='-lformw -lmenuw -lpanelw -lncursesw -lticw -ltinfow -Wl,--as-needed'
|
||||
mv bin binw
|
||||
make distclean
|
||||
popd
|
||||
%endif
|
||||
test ! -L tack || rm -f tack
|
||||
make clean
|
||||
> $SCREENLOG
|
||||
tail -q -s 0.5 -f $SCREENLOG & pid=$!
|
||||
|
||||
#
|
||||
# Now use --without-pthread to disable pthread support (abi == 5).
|
||||
#
|
||||
> $SCREENLOG
|
||||
tail -q -s 0.5 -f $SCREENLOG & pid=$!
|
||||
|
||||
eval screen -D -m ./${c#*./} --with-abi-version=5 \
|
||||
--without-manpages \
|
||||
--without-progs \
|
||||
--without-tack \
|
||||
--without-pthread \
|
||||
--disable-reentrant \
|
||||
--disable-opaque-curses \
|
||||
@@ -606,6 +628,9 @@ mv tack-* tack
|
||||
> $SCREENLOG
|
||||
tail -q -s 0.5 -f $SCREENLOG & pid=$!
|
||||
eval screen -D -m ./${c#*./} --with-pthread \
|
||||
--without-manpages \
|
||||
--without-progs \
|
||||
--without-tack \
|
||||
--enable-reentrant \
|
||||
--enable-opaque-curses \
|
||||
--enable-opaque-form \
|
||||
@@ -636,11 +661,29 @@ mv tack-* tack
|
||||
sh ../edit_man.sh normal installing %{root}%{_mandir} . ncurses6-config.1
|
||||
popd
|
||||
mv -f %{root}%{_libdir}/pkgconfig/*.pc pc/
|
||||
|
||||
#
|
||||
# Some tests
|
||||
#
|
||||
%if 0%{?qemu_user_space_build:1}%{?_crossbuild}
|
||||
echo "Skipping tests due to running under QEMU / cross-building"
|
||||
%else
|
||||
#
|
||||
# Make the test suite for ncurses6
|
||||
#
|
||||
pushd test
|
||||
CFLAGS="$CFLAGS -I%{root}%{_incdir}" LDFLAGS="$LDFLAGS -L%{root}%{_libdir}" \
|
||||
./configure --with-ncurses --disable-widec --prefix=$PWD
|
||||
LD_LIBRARY_PATH=%{root}%{_libdir} \
|
||||
make %{?_smp_mflags} TEST_ARGS='-lform -lmenu -lpanel -lncurses -ltic -ltinfo -Wl,--as-needed'
|
||||
make install TEST_ARGS='-lform -lmenu -lpanel -lncurses -ltic -ltinfo -Wl,--as-needed'
|
||||
make distclean
|
||||
popd
|
||||
%endif
|
||||
test ! -L tack || rm -f tack
|
||||
make clean
|
||||
#
|
||||
# ABI == 5
|
||||
#
|
||||
make clean
|
||||
> $SCREENLOG
|
||||
tail -q -s 0.5 -f $SCREENLOG & pid=$!
|
||||
|
||||
@@ -648,6 +691,9 @@ mv tack-* tack
|
||||
# Now use --without-pthread to disable pthread support (abi == 5).
|
||||
#
|
||||
eval screen -D -m ./${c#*./} --with-abi-version=5 \
|
||||
--without-manpages \
|
||||
--without-progs \
|
||||
--without-tack \
|
||||
--without-pthread \
|
||||
--disable-reentrant \
|
||||
--disable-opaque-curses \
|
||||
@@ -905,6 +951,42 @@ mv tack-* tack
|
||||
rm -f %{buildroot}%{_prefix}/lib/terminfo
|
||||
mv pc/*.pc %{buildroot}%{_libdir}/pkgconfig/
|
||||
|
||||
%if 0%{?qemu_user_space_build:1}%{?_crossbuild}
|
||||
# No test here
|
||||
%else
|
||||
%check
|
||||
LD_LIBRARY_PATH=%{buildroot}/%{_lib}:%{buildroot}%{_libdir}
|
||||
export LD_LIBRARY_PATH
|
||||
pushd test
|
||||
expect -d <<-'EOF'
|
||||
set env(TERM) xterm
|
||||
set timeout 10
|
||||
spawn -noecho "binw/newdemo"
|
||||
send -- "x"
|
||||
sleep 5
|
||||
send -- "x"
|
||||
sleep 5
|
||||
send -- "x"
|
||||
sleep 5
|
||||
send -- "q"
|
||||
wait
|
||||
EOF
|
||||
expect -d <<-'EOF'
|
||||
set env(TERM) xterm
|
||||
set timeout 10
|
||||
spawn -noecho "bin/newdemo"
|
||||
send -- "x"
|
||||
sleep 5
|
||||
send -- "x"
|
||||
sleep 5
|
||||
send -- "x"
|
||||
sleep 5
|
||||
send -- "q"
|
||||
wait
|
||||
EOF
|
||||
popd
|
||||
%endif
|
||||
|
||||
%post -n libncurses5 -p /sbin/ldconfig
|
||||
|
||||
%postun -n libncurses5 -p /sbin/ldconfig
|
||||
|
Reference in New Issue
Block a user