2006-12-19 00:17:11 +01:00
|
|
|
#
|
2011-03-09 17:08:23 +01:00
|
|
|
# spec file for package ncurses
|
2006-12-19 00:17:11 +01:00
|
|
|
#
|
2020-01-07 10:48:33 +01:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2006-12-19 00:17:11 +01:00
|
|
|
#
|
2008-08-15 22:20:03 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-05-13 09:52:50 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2006-12-19 00:17:11 +01:00
|
|
|
#
|
|
|
|
|
2012-03-05 13:04:16 +01:00
|
|
|
|
2015-01-12 16:12:55 +01:00
|
|
|
%bcond_with hasheddb
|
2015-01-26 10:45:35 +01:00
|
|
|
%if 0%{?suse_version} > 1320
|
2015-01-21 16:59:35 +01:00
|
|
|
%bcond_without symversion
|
2015-01-26 10:45:35 +01:00
|
|
|
%else
|
|
|
|
%bcond_with symversion
|
|
|
|
%endif
|
2017-12-22 12:45:11 +01:00
|
|
|
%bcond_with memleakck
|
2018-03-02 11:18:56 +01:00
|
|
|
%bcond_without onlytinfo
|
|
|
|
|
|
|
|
%if %{with onlytinfo}
|
|
|
|
%global soname_tinfo tinfo
|
|
|
|
%else
|
|
|
|
%global soname_tinfo tinfow
|
|
|
|
%endif
|
2015-01-12 16:12:55 +01:00
|
|
|
|
2020-04-06 12:41:08 +02:00
|
|
|
%define patchlvl %(bash %{_sourcedir}/get_version_number.sh %{_sourcedir})
|
2020-04-06 10:20:23 +02:00
|
|
|
%define basevers 6.2
|
|
|
|
|
2006-12-19 00:17:11 +01:00
|
|
|
Name: ncurses
|
|
|
|
#!BuildIgnore: terminfo
|
2015-01-12 16:12:55 +01:00
|
|
|
%if %{with hasheddb}
|
|
|
|
BuildRequires: db-devel
|
|
|
|
%endif
|
2018-03-01 14:42:38 +01:00
|
|
|
BuildRequires: expect
|
2015-09-16 14:14:53 +02:00
|
|
|
BuildRequires: gcc-c++
|
2014-08-25 16:06:26 +02:00
|
|
|
BuildRequires: pkg-config
|
2013-02-18 13:51:49 +01:00
|
|
|
BuildRequires: screen
|
2010-09-09 14:40:03 +02:00
|
|
|
%if 0%{?suse_version} > 1130
|
|
|
|
BuildRequires: gpm-devel
|
|
|
|
%else
|
|
|
|
BuildRequires: gpm
|
|
|
|
%endif
|
2006-12-19 00:17:11 +01:00
|
|
|
%define terminfo() %{_datadir}/%{0}/%{1}
|
|
|
|
%define tabset() %{_datadir}/%{0}/%{1}
|
2009-01-09 01:37:36 +01:00
|
|
|
# bug437293
|
|
|
|
%ifarch ppc64
|
|
|
|
Obsoletes: ncurses-64bit
|
|
|
|
%endif
|
|
|
|
#
|
2015-10-06 13:34:31 +02:00
|
|
|
# Note that this spec files does not only build the ABI version 6
|
|
|
|
# but also build the ABI version 5 as this is part of the source
|
|
|
|
# tar ball including the latest upstream fixes for ABI 5.
|
|
|
|
#
|
2020-04-06 10:20:23 +02:00
|
|
|
Version: 6.2.%{patchlvl}
|
2011-12-22 12:06:01 +01:00
|
|
|
Release: 0
|
2017-02-09 13:31:49 +01:00
|
|
|
Summary: Terminal control library
|
2018-10-22 13:26:14 +02:00
|
|
|
#Git: http://ncurses.scripts.mit.edu
|
2011-12-22 12:06:01 +01:00
|
|
|
License: MIT
|
|
|
|
Group: System/Base
|
2019-11-15 14:17:21 +01:00
|
|
|
URL: http://www.invisible-island.net/ncurses/ncurses.html
|
2020-02-12 12:30:22 +01:00
|
|
|
Source0: ftp://ftp.invisible-island.net/ncurses/ncurses-6.2.tar.gz
|
|
|
|
Source1: ncurses-6.2-patches.tar.bz2
|
2006-12-19 00:17:11 +01:00
|
|
|
Source2: handle.linux
|
2008-04-09 21:39:42 +02:00
|
|
|
Source3: README.devel
|
|
|
|
Source4: ncurses-rpmlintrc
|
2018-01-29 13:49:42 +01:00
|
|
|
# Latest tack can be found at ftp://ftp.invisible-island.net/pub/ncurses/current/
|
2020-02-12 15:14:36 +01:00
|
|
|
Source5: ftp://ftp.invisible-island.net/pub/ncurses/current/tack-1.09-20200202.tgz
|
2008-08-21 17:51:08 +02:00
|
|
|
Source6: edit.sed
|
2010-01-14 15:17:59 +01:00
|
|
|
Source7: baselibs.conf
|
2020-02-12 12:30:22 +01:00
|
|
|
Patch0: ncurses-6.2.dif
|
2014-01-28 19:21:55 +01:00
|
|
|
Patch1: ncurses-5.9-ibm327x.dif
|
2019-03-25 12:21:41 +01:00
|
|
|
Patch2: ncurses-5.7-tack.dif
|
2006-12-19 00:17:11 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2007-12-06 02:05:01 +01:00
|
|
|
%global _miscdir %{_datadir}/misc
|
|
|
|
%global _incdir %{_includedir}
|
2008-04-09 21:39:42 +02:00
|
|
|
%global root %{_tmppath}/%{name}-%{version}-store
|
2006-12-19 00:17:11 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
As soon as a text application needs to directly control its output to
|
|
|
|
the screen (if it wants to place the cursor at location (x,y) then
|
|
|
|
write text), ncurses is used. The panel and the forms libraries are
|
2017-02-09 13:36:58 +01:00
|
|
|
included in this package. The ncurses libraries support color, special
|
|
|
|
characters, forms, and panels.
|
2006-12-19 00:17:11 +01:00
|
|
|
|
2008-04-25 15:24:46 +02:00
|
|
|
%package -n ncurses-utils
|
2008-05-07 23:35:52 +02:00
|
|
|
Summary: Tools using the new curses libraries
|
2011-12-22 12:06:01 +01:00
|
|
|
License: MIT
|
2008-04-25 15:24:46 +02:00
|
|
|
Group: System/Base
|
|
|
|
Provides: ncurses:%{_bindir}/tput
|
|
|
|
|
|
|
|
%description -n ncurses-utils
|
2008-05-07 23:35:52 +02:00
|
|
|
The ncurses based utilities are as follows:
|
|
|
|
|
|
|
|
clear -- emits clear-screen for current terminal
|
|
|
|
|
2012-07-26 10:10:38 +02:00
|
|
|
tabs -- set tabs on a terminal
|
|
|
|
|
2008-05-07 23:35:52 +02:00
|
|
|
toe -- table of entries utility
|
|
|
|
|
|
|
|
tput -- shell-script access to terminal capabilities.
|
|
|
|
|
|
|
|
tset -- terminal-initialization utility
|
|
|
|
|
|
|
|
reset -- terminal initialization utility
|
2008-04-25 15:24:46 +02:00
|
|
|
|
|
|
|
%package -n terminfo-base
|
2008-05-07 23:35:52 +02:00
|
|
|
Summary: A terminal descriptions database
|
2011-12-22 12:06:01 +01:00
|
|
|
License: MIT
|
2008-04-25 15:24:46 +02:00
|
|
|
Group: System/Base
|
2018-04-04 14:26:20 +02:00
|
|
|
Requires: ncurses >= %{version}
|
2018-08-09 14:00:50 +02:00
|
|
|
Recommends: terminfo-screen = %{version}
|
2008-04-25 15:24:46 +02:00
|
|
|
Provides: ncurses:%{_datadir}/tabset
|
|
|
|
|
|
|
|
%description -n terminfo-base
|
2008-05-07 23:35:52 +02:00
|
|
|
This is the terminfo basic database, maintained in the ncurses package.
|
|
|
|
This database is the official successor to the 4.4BSD termcap file and
|
|
|
|
contains information about any known terminal. The ncurses library
|
|
|
|
makes use of this database to use terminals correctly.
|
2008-04-25 15:24:46 +02:00
|
|
|
|
2017-05-19 15:43:11 +02:00
|
|
|
%package -n terminfo-screen
|
2017-09-11 12:53:18 +02:00
|
|
|
Summary: A terminal descriptions database for screen
|
2017-05-19 15:43:11 +02:00
|
|
|
License: MIT
|
|
|
|
Group: System/Base
|
|
|
|
Requires: terminfo-base
|
|
|
|
Provides: terminfo:%{_datadir}/terminfo/s/screen.konsole
|
|
|
|
|
|
|
|
%description -n terminfo-screen
|
|
|
|
This package includes some useful entries for the screen utility in the
|
|
|
|
terminfo database, which might introduce trouble if used over network
|
|
|
|
connections like ssh or slogin onto systems without those terminfo database
|
|
|
|
entries.
|
|
|
|
|
2017-09-11 12:53:18 +02:00
|
|
|
%package -n terminfo-iterm
|
|
|
|
Summary: A terminal descriptions database for iterm
|
|
|
|
License: MIT
|
|
|
|
Group: System/Base
|
|
|
|
Requires: terminfo-base
|
|
|
|
Provides: terminfo:%{_datadir}/terminfo/i/iTerm.app
|
|
|
|
|
|
|
|
%description -n terminfo-iterm
|
|
|
|
This package includes some useful entries for the iterm utility in the
|
|
|
|
terminfo database, which might introduce trouble if used over network
|
|
|
|
connections like ssh or slogin onto systems without those terminfo database
|
|
|
|
entries.
|
|
|
|
|
2008-04-09 21:39:42 +02:00
|
|
|
%package -n libncurses5
|
2017-02-09 13:31:49 +01:00
|
|
|
Summary: Terminal control library
|
2011-12-22 12:06:01 +01:00
|
|
|
License: MIT
|
2008-04-09 21:39:42 +02:00
|
|
|
Group: System/Libraries
|
2008-04-25 15:24:46 +02:00
|
|
|
Requires: terminfo-base
|
2015-07-07 14:12:30 +02:00
|
|
|
Provides: ncurses = 5.9
|
|
|
|
Obsoletes: ncurses < 5.9
|
2009-01-09 01:37:36 +01:00
|
|
|
# bug437293
|
|
|
|
%ifarch ppc64
|
|
|
|
Obsoletes: ncurses-64bit
|
|
|
|
%endif
|
|
|
|
#
|
2008-04-09 21:39:42 +02:00
|
|
|
|
|
|
|
%description -n libncurses5
|
2017-02-09 13:31:49 +01:00
|
|
|
The ncurses library is used by many terminal applications for
|
|
|
|
controlling output to the screen and input from the user.
|
2008-04-09 21:39:42 +02:00
|
|
|
|
2017-02-09 13:31:49 +01:00
|
|
|
This package contains the library built with the version 5 ABI.
|
2008-08-15 22:20:03 +02:00
|
|
|
|
|
|
|
%package -n libncurses6
|
2017-02-09 13:31:49 +01:00
|
|
|
Summary: Terminal control library
|
2011-12-22 12:06:01 +01:00
|
|
|
License: MIT
|
2008-08-15 22:20:03 +02:00
|
|
|
Group: System/Libraries
|
|
|
|
Requires: terminfo-base
|
|
|
|
Provides: ncurses = %{version}
|
2015-07-07 14:12:30 +02:00
|
|
|
Recommends: ncurses-utils = %{version}
|
2008-08-15 22:20:03 +02:00
|
|
|
|
|
|
|
%description -n libncurses6
|
2017-02-09 13:31:49 +01:00
|
|
|
The ncurses library is used by many terminal applications for
|
|
|
|
controlling output to the screen and input from the user.
|
2008-08-15 22:20:03 +02:00
|
|
|
|
2017-02-09 13:31:49 +01:00
|
|
|
This package contains the library built with the version 6 ABI.
|
2006-12-19 00:17:11 +01:00
|
|
|
|
|
|
|
%package -n terminfo
|
|
|
|
Summary: A terminal descriptions database
|
2011-12-22 12:06:01 +01:00
|
|
|
License: SUSE-Public-Domain
|
2006-12-19 00:17:11 +01:00
|
|
|
Group: System/Base
|
2018-04-04 14:26:20 +02:00
|
|
|
Requires: terminfo-base = %{version}
|
2006-12-19 00:17:11 +01:00
|
|
|
|
|
|
|
%description -n terminfo
|
2007-02-02 01:32:54 +01:00
|
|
|
This is the terminfo reference database, maintained in the ncurses
|
|
|
|
package. This database is the official successor to the 4.4BSD termcap
|
|
|
|
file and contains information about any known terminal. The ncurses
|
|
|
|
library makes use of this database to use terminals correctly. If you
|
|
|
|
just use the Linux console, xterm, and VT100, you probably will not
|
|
|
|
need this database -- a minimal /usr/share/terminfo tree for these
|
2008-08-15 22:20:03 +02:00
|
|
|
terminals is already included in the terminfo-base package.
|
2006-12-19 00:17:11 +01:00
|
|
|
|
|
|
|
%package -n ncurses-devel
|
2017-02-09 13:31:49 +01:00
|
|
|
Summary: Development files for the ncurses6 terminal control library
|
2011-12-22 12:06:01 +01:00
|
|
|
License: MIT
|
2006-12-19 00:17:11 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2017-02-03 09:04:49 +01:00
|
|
|
Provides: ncurses6-devel
|
2007-12-06 02:05:01 +01:00
|
|
|
Provides: ncurses:%{_incdir}/ncurses.h
|
2012-05-31 13:47:34 +02:00
|
|
|
Requires: %{_bindir}/tack
|
2012-01-30 18:08:01 +01:00
|
|
|
Requires: libncurses6 = %{version}-%{release}
|
2015-07-07 14:12:30 +02:00
|
|
|
Requires: ncurses = %{version}-%{release}
|
2009-01-09 01:37:36 +01:00
|
|
|
# bug437293
|
|
|
|
%ifarch ppc64
|
|
|
|
Obsoletes: ncurses-devel-64bit
|
|
|
|
%endif
|
|
|
|
#
|
2006-12-19 00:17:11 +01:00
|
|
|
|
|
|
|
%description -n ncurses-devel
|
2017-02-09 13:31:49 +01:00
|
|
|
This package contains the headers needed to build against
|
|
|
|
the ncurses library in its ABI version 6 form.
|
2017-02-03 09:04:49 +01:00
|
|
|
|
2019-02-18 09:55:24 +01:00
|
|
|
%package -n ncurses-devel-static
|
|
|
|
Summary: Static libraries for the ncurses6 terminal control library
|
|
|
|
License: MIT
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Provides: ncurses-devel:%{_libdir}/libform.a
|
|
|
|
Provides: ncurses-devel:%{_libdir}/libformw.a
|
|
|
|
Provides: ncurses-devel:%{_libdir}/libmenu.a
|
|
|
|
Provides: ncurses-devel:%{_libdir}/libmenuw.a
|
|
|
|
Provides: ncurses-devel:%{_libdir}/libncurses++.a
|
|
|
|
Provides: ncurses-devel:%{_libdir}/libncurses++w.a
|
|
|
|
Provides: ncurses-devel:%{_libdir}/libncurses.a
|
|
|
|
Provides: ncurses-devel:%{_libdir}/libncurses.a
|
|
|
|
Provides: ncurses-devel:%{_libdir}/libncursesw.a
|
|
|
|
Provides: ncurses-devel:%{_libdir}/libpanel.a
|
|
|
|
Provides: ncurses-devel:%{_libdir}/libpanelw.a
|
|
|
|
Provides: ncurses-devel:%{_libdir}/libtic.a
|
|
|
|
Provides: ncurses-devel:%{_libdir}/libticw.a
|
|
|
|
Provides: ncurses-devel:%{_libdir}/libtinfo.a
|
|
|
|
Requires: ncurses-devel = %{version}-%{release}
|
|
|
|
|
|
|
|
%description -n ncurses-devel-static
|
|
|
|
This package contains the static library files for
|
|
|
|
the ncurses library in its ABI version 6 form.
|
|
|
|
|
2017-02-03 09:04:49 +01:00
|
|
|
%package -n ncurses5-devel
|
2017-02-09 13:31:49 +01:00
|
|
|
Summary: Development files for the ncurses5 terminal control library
|
2017-02-03 09:04:49 +01:00
|
|
|
License: MIT
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Provides: ncurses:%{_incdir}/ncurses5/ncurses.h
|
|
|
|
Requires: %{_bindir}/tack
|
|
|
|
Requires: libncurses5 = %{version}-%{release}
|
|
|
|
Requires: ncurses = %{version}-%{release}
|
|
|
|
Requires: ncurses-devel = %{version}-%{release}
|
|
|
|
|
|
|
|
%description -n ncurses5-devel
|
2017-02-09 13:31:49 +01:00
|
|
|
This package contains the headers needed to build against
|
|
|
|
the ncurses library in its ABI version 5 form.
|
2007-02-02 01:32:54 +01:00
|
|
|
|
2019-02-18 09:55:24 +01:00
|
|
|
%package -n ncurses5-devel-static
|
|
|
|
Summary: Static libraries for the ncurses5 terminal control library
|
|
|
|
License: MIT
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Provides: ncurses5-devel:%{_libdir}/ncurses5/libform.a
|
|
|
|
Provides: ncurses5-devel:%{_libdir}/ncurses5/libformw.a
|
|
|
|
Provides: ncurses5-devel:%{_libdir}/ncurses5/libmenu.a
|
|
|
|
Provides: ncurses5-devel:%{_libdir}/ncurses5/libmenuw.a
|
|
|
|
Provides: ncurses5-devel:%{_libdir}/ncurses5/libncurses++.a
|
|
|
|
Provides: ncurses5-devel:%{_libdir}/ncurses5/libncurses++w.a
|
|
|
|
Provides: ncurses5-devel:%{_libdir}/ncurses5/libncurses.a
|
|
|
|
Provides: ncurses5-devel:%{_libdir}/ncurses5/libncurses.a
|
|
|
|
Provides: ncurses5-devel:%{_libdir}/ncurses5/libncursesw.a
|
|
|
|
Provides: ncurses5-devel:%{_libdir}/ncurses5/libpanel.a
|
|
|
|
Provides: ncurses5-devel:%{_libdir}/ncurses5/libpanelw.a
|
|
|
|
Provides: ncurses5-devel:%{_libdir}/ncurses5/libtic.a
|
|
|
|
Provides: ncurses5-devel:%{_libdir}/ncurses5/libticw.a
|
|
|
|
Provides: ncurses5-devel:%{_libdir}/ncurses5/libtinfo.a
|
|
|
|
Requires: ncurses5-devel = %{version}-%{release}
|
|
|
|
|
|
|
|
%description -n ncurses5-devel-static
|
|
|
|
This package contains the static library files for
|
|
|
|
the ncurses library in its ABI version 5 form.
|
|
|
|
|
2007-02-02 01:32:54 +01:00
|
|
|
%package -n tack
|
|
|
|
Summary: Terminfo action checker
|
2018-03-01 14:42:38 +01:00
|
|
|
License: GPL-2.0-or-later
|
2007-02-02 01:32:54 +01:00
|
|
|
Group: Development/Tools/Building
|
2007-12-06 02:05:01 +01:00
|
|
|
Provides: ncurses-devel:%{_bindir}/tack
|
2007-02-02 01:32:54 +01:00
|
|
|
Requires: ncurses = %{version}-%{release}
|
|
|
|
|
|
|
|
%description -n tack
|
|
|
|
This package contains the tack utility to help to build a new terminfo
|
|
|
|
entry describing an unknown terminal. It can also be used to test the
|
|
|
|
correctness of an existing entry, and to develop the correct pad
|
|
|
|
timings needed to ensure that screen updates do not fall behind the
|
|
|
|
incoming data stream.
|
|
|
|
|
2006-12-19 00:17:11 +01:00
|
|
|
%prep
|
2020-04-06 10:49:56 +02:00
|
|
|
%setup -q -n %{name}-%{basevers}
|
2017-02-09 13:31:49 +01:00
|
|
|
tar -xjf %{S:1}
|
2015-06-01 10:44:39 +02:00
|
|
|
set +x
|
|
|
|
for patch in patches/ncurses*.patch
|
|
|
|
do
|
2018-01-29 11:58:22 +01:00
|
|
|
test -e "$patch" || continue
|
2018-06-12 11:38:49 +02:00
|
|
|
echo Apply patch: $patch
|
2015-06-01 10:44:39 +02:00
|
|
|
patch -f -T -p1 -s < $patch
|
|
|
|
done
|
|
|
|
set -x
|
|
|
|
rm -rf patches/
|
2017-02-09 13:31:49 +01:00
|
|
|
find -name '*.orig' -delete
|
2015-10-08 10:10:43 +02:00
|
|
|
# replace tack from ncurses tarball with the latest version in
|
|
|
|
# separate tarball
|
|
|
|
rm -fr tack
|
2017-02-09 13:31:49 +01:00
|
|
|
tar -xzf %{S:5}
|
2010-01-14 15:17:59 +01:00
|
|
|
mv tack-* tack
|
2016-07-07 11:04:02 +02:00
|
|
|
%patch1 -p0 -b .327x
|
2019-03-25 12:21:41 +01:00
|
|
|
%patch2 -p0 -b .hs
|
2016-07-07 11:04:02 +02:00
|
|
|
%patch0 -p0 -b .p0
|
2006-12-19 00:17:11 +01:00
|
|
|
|
|
|
|
%build
|
2019-10-14 12:06:32 +02:00
|
|
|
%global _lto_cflags %{?_lto_cflags} -ffat-lto-objects
|
2015-10-06 13:34:31 +02:00
|
|
|
#
|
|
|
|
# Note that there is a test if the system call poll(2) really works
|
|
|
|
# on terminal or files. To make sure that even in OBS the configure
|
|
|
|
# script has its own terminal we use screen here (could be also tmux).
|
|
|
|
#
|
|
|
|
# Remark: A better solution would be that in OBS a real pty/tty pair
|
|
|
|
# would be used instead of redirecting stdout/stderr to a log file.
|
|
|
|
#
|
2017-01-19 13:22:23 +01:00
|
|
|
%global _configure screen -D -m ./configure
|
2013-02-18 14:59:31 +01:00
|
|
|
SCREENDIR=$(mktemp -d ${PWD}/screen.XXXXXX) || exit 1
|
|
|
|
SCREENRC=${SCREENDIR}/ncurses
|
|
|
|
export SCREENRC SCREENDIR
|
2013-02-18 13:51:49 +01:00
|
|
|
exec 0< /dev/null
|
2013-03-26 14:01:42 +01:00
|
|
|
SCREENLOG=${SCREENDIR}/log
|
2013-02-18 13:51:49 +01:00
|
|
|
cat > $SCREENRC<<-EOF
|
|
|
|
deflogin off
|
2015-09-16 13:48:46 +02:00
|
|
|
deflog on
|
2013-02-18 13:51:49 +01:00
|
|
|
logfile $SCREENLOG
|
|
|
|
logfile flush 1
|
|
|
|
logtstamp off
|
|
|
|
log on
|
2013-03-26 14:01:42 +01:00
|
|
|
setsid on
|
2013-02-18 13:51:49 +01:00
|
|
|
scrollback 0
|
|
|
|
silence on
|
|
|
|
utf8 on
|
|
|
|
EOF
|
2015-10-06 13:34:31 +02:00
|
|
|
#
|
|
|
|
# Used to test out various cflags of the gcc
|
|
|
|
#
|
2011-11-18 13:03:18 +01:00
|
|
|
cflags ()
|
|
|
|
{
|
|
|
|
local flag=$1; shift
|
|
|
|
local var=$1; shift
|
|
|
|
test -n "${flag}" -a -n "${var}" || return
|
|
|
|
case "${!var}" in
|
|
|
|
*${flag}*) return
|
|
|
|
esac
|
|
|
|
set -o noclobber
|
|
|
|
case "$flag" in
|
|
|
|
-Wl,*)
|
|
|
|
if echo 'int main () { return 0; }' | \
|
|
|
|
${CC:-gcc} -Werror $flag -o /dev/null -xc - > /dev/null 2>&1 ; then
|
|
|
|
eval $var=\${$var:+\$$var\ }$flag
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
if ${CC:-gcc} -Werror $flag -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then
|
|
|
|
eval $var=\${$var:+\$$var\ }$flag
|
|
|
|
fi
|
|
|
|
if ${CXX:-g++} -Werror $flag -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1 ; then
|
|
|
|
eval $var=\${$var:+\$$var\ }$flag
|
|
|
|
fi
|
|
|
|
esac
|
|
|
|
set +o noclobber
|
|
|
|
}
|
|
|
|
|
2006-12-19 00:17:11 +01:00
|
|
|
test ! -f /.buildenv || . /.buildenv
|
|
|
|
OPATH=$PATH
|
2013-11-29 13:00:04 +01:00
|
|
|
%ifarch s390x s390
|
2018-02-15 14:02:46 +01:00
|
|
|
FALLBK="unknown,dumb,xterm,ibm327x,vt100,vt102,vt220"
|
2014-01-20 14:51:11 +01:00
|
|
|
%else
|
2018-02-15 14:02:46 +01:00
|
|
|
FALLBK="unknown,dumb,xterm,linux,vt100,vt102,vt220"
|
2013-11-29 13:00:04 +01:00
|
|
|
%endif
|
2006-12-19 00:17:11 +01:00
|
|
|
CC=gcc
|
|
|
|
CXX=g++
|
2008-04-09 21:39:42 +02:00
|
|
|
CFLAGS="${RPM_OPT_FLAGS} -pipe -D_REENTRANT"
|
2006-12-19 00:17:11 +01:00
|
|
|
if [[ "$BUILD_BASENAME" = debug-* ]] ; then
|
2008-04-09 21:39:42 +02:00
|
|
|
CFLAGS="${CFLAGS} -g -DTRACE"
|
2006-12-19 00:17:11 +01:00
|
|
|
fi
|
2011-11-18 13:03:18 +01:00
|
|
|
cflags -Wl,-O2 LDFLAGS
|
|
|
|
cflags -Wl,-Bsymbolic-functions LDFLAGS
|
|
|
|
cflags -Wl,--hash-size=8599 LDFLAGS
|
|
|
|
cflags -Wl,--as-needed LDFLAGS
|
2006-12-19 00:17:11 +01:00
|
|
|
CXXFLAGS=$CFLAGS
|
|
|
|
test -n "$TERM" || TERM=linux
|
2017-02-03 09:04:49 +01:00
|
|
|
mkdir gzip
|
|
|
|
cat > gzip/gzip <<-'EOF'
|
|
|
|
#!/bin/sh
|
|
|
|
exec /usr/bin/gzip -9 ${1+"$@"}
|
|
|
|
EOF
|
|
|
|
chmod 0755 gzip/gzip
|
|
|
|
PATH=$PWD/gzip:$PATH
|
|
|
|
export CC CFLAGS CXX CXXFLAGS TERM LDFLAGS
|
2006-12-19 00:17:11 +01:00
|
|
|
#
|
2015-10-06 13:34:31 +02:00
|
|
|
# Detect 64bit architecures and be sure that we use an
|
|
|
|
# unsigned long for chtype to be backward compatible with
|
|
|
|
# already existing ncurses applications. Otherwise we
|
|
|
|
# might break existing applications on any update!
|
2006-12-19 00:17:11 +01:00
|
|
|
#
|
2015-10-06 13:34:31 +02:00
|
|
|
if test $(getconf LONG_BIT) -gt 32 ; then
|
2006-12-19 00:17:11 +01:00
|
|
|
WITHCHTYPE="--with-chtype=long"
|
|
|
|
else
|
|
|
|
WITHCHTYPE=""
|
2015-10-06 13:34:31 +02:00
|
|
|
CFLAGS="${CFLAGS} $(getconf LFS_CFLAGS)"
|
2006-12-19 00:17:11 +01:00
|
|
|
fi
|
|
|
|
#
|
2015-10-06 13:34:31 +02:00
|
|
|
# Let's care about people which build ncurses on their own
|
|
|
|
# system. That is take care that some configure tests might
|
|
|
|
# be exploitable below /tmp ... compare with aclocal.m4
|
2008-08-21 17:51:08 +02:00
|
|
|
#
|
|
|
|
TMPDIR=$(mktemp -d /tmp/ncurses.XXXXXXXX) || exit 1
|
|
|
|
trap 'rm -rf ${TMPDIR}' EXIT
|
|
|
|
export TMPDIR
|
|
|
|
#
|
2017-05-19 15:43:11 +02:00
|
|
|
# getttynam(3) as well as /etc/ttys are not used under Linux
|
|
|
|
#
|
|
|
|
sed -ri '/^getttynam\s*\\$/d' configure
|
|
|
|
#
|
2011-11-16 12:14:40 +01:00
|
|
|
# No --enable-term-driver as this had crashed last time
|
2010-01-15 15:52:25 +01:00
|
|
|
# in ncurses/tinfo/lib_setup.c due to the fact that
|
2015-05-04 13:36:26 +02:00
|
|
|
# _nc_globals.term_driver was a NULL function pointer as
|
|
|
|
# this is for the MinGW port!
|
2010-01-15 15:52:25 +01:00
|
|
|
#
|
2006-12-19 00:17:11 +01:00
|
|
|
# No --enable-tcap-names because we may have to recompile
|
|
|
|
# programs or foreign programs won't work
|
|
|
|
#
|
|
|
|
# No --enable-safe-sprintf because this seems to
|
|
|
|
# crash on some architectures
|
|
|
|
#
|
|
|
|
# No --enable-xmc-glitch because this seems to break yast2
|
|
|
|
# on console/konsole (no magic cookie support on those?)
|
|
|
|
#
|
2016-10-27 12:28:43 +02:00
|
|
|
# No --enable-hard-tabs for users which have disabled
|
|
|
|
# the use of tabs
|
|
|
|
#
|
2006-12-19 00:17:11 +01:00
|
|
|
touch --reference=README config.sub config.guess
|
2013-02-18 13:51:49 +01:00
|
|
|
> $SCREENLOG
|
2013-03-26 14:01:42 +01:00
|
|
|
tail -q -s 0.5 -f $SCREENLOG & pid=$!
|
2011-10-12 15:26:58 +02:00
|
|
|
%configure \
|
2010-10-12 13:58:09 +02:00
|
|
|
--without-ada \
|
2006-12-19 00:17:11 +01:00
|
|
|
--without-debug \
|
|
|
|
--without-profile \
|
2010-10-12 13:58:09 +02:00
|
|
|
--without-manpage-tbl \
|
2018-03-01 14:42:38 +01:00
|
|
|
--without-tests \
|
2006-12-19 00:17:11 +01:00
|
|
|
--with-shared \
|
|
|
|
--with-normal \
|
|
|
|
--with-manpage-format=gzip \
|
|
|
|
--with-manpage-renames=${PWD}/man/man_db.renames \
|
2010-01-14 15:17:59 +01:00
|
|
|
--with-manpage-aliases \
|
2006-12-19 00:17:11 +01:00
|
|
|
--with-ospeed=speed_t \
|
2014-03-27 14:57:50 +01:00
|
|
|
%if 0%{?suse_version} > 1310
|
2015-10-08 10:10:43 +02:00
|
|
|
--with-gpm=$(readlink %{_libdir}/libgpm.so) \
|
2014-03-27 14:57:50 +01:00
|
|
|
%else
|
2007-03-19 13:53:11 +01:00
|
|
|
--with-gpm \
|
2014-03-27 14:57:50 +01:00
|
|
|
%endif
|
2007-03-19 13:53:11 +01:00
|
|
|
--with-dlsym \
|
2018-02-15 14:02:46 +01:00
|
|
|
--with-default-terminfo-dir=%{_datadir}/terminfo \
|
2016-10-27 12:28:43 +02:00
|
|
|
--with-terminfo-dirs=%{_sysconfdir}/terminfo:%{_datadir}/terminfo \
|
2012-02-14 19:29:40 +01:00
|
|
|
--with-xterm-kbs=del \
|
2018-01-22 15:25:00 +01:00
|
|
|
--disable-stripping \
|
2006-12-19 00:17:11 +01:00
|
|
|
--disable-root-environ \
|
|
|
|
--disable-termcap \
|
|
|
|
--disable-overwrite \
|
|
|
|
--disable-rpath \
|
2012-10-08 15:10:10 +02:00
|
|
|
--disable-rpath-hack \
|
2017-12-22 12:45:11 +01:00
|
|
|
%if %{with memleakck}
|
2006-12-19 00:17:11 +01:00
|
|
|
--disable-leaks \
|
2017-12-22 12:45:11 +01:00
|
|
|
%endif
|
2006-12-19 00:17:11 +01:00
|
|
|
--disable-xmc-glitch \
|
|
|
|
--enable-symlinks \
|
|
|
|
--enable-big-core \
|
|
|
|
--enable-const \
|
|
|
|
--enable-hashmap \
|
|
|
|
--enable-no-padding \
|
|
|
|
--enable-sigwinch \
|
|
|
|
--enable-colorfgbg \
|
2010-01-14 15:17:59 +01:00
|
|
|
--enable-sp-funcs \
|
2015-05-04 13:36:26 +02:00
|
|
|
--enable-interop \
|
2008-08-15 22:20:03 +02:00
|
|
|
--with-pthread \
|
2010-01-14 15:17:59 +01:00
|
|
|
--enable-reentrant \
|
2018-03-08 11:07:53 +01:00
|
|
|
%if 0%{?suse_version} > 1500
|
2018-02-15 14:02:46 +01:00
|
|
|
--enable-opaque-curses \
|
|
|
|
--enable-opaque-form \
|
|
|
|
--enable-opaque-menu \
|
|
|
|
--enable-opaque-panel \
|
2018-03-08 11:07:53 +01:00
|
|
|
%endif
|
2008-04-09 21:39:42 +02:00
|
|
|
--enable-ext-mouse \
|
2018-01-22 15:25:00 +01:00
|
|
|
--enable-widec \
|
2018-03-02 11:18:56 +01:00
|
|
|
--with-termlib=%{soname_tinfo} \
|
2018-01-22 15:25:00 +01:00
|
|
|
--with-ticlib=ticw \
|
|
|
|
%if %{with symversion}
|
|
|
|
--with-versioned-syms=${PWD}/package/ncursestw.map \
|
|
|
|
%endif
|
2008-08-15 22:20:03 +02:00
|
|
|
--enable-ext-colors \
|
2010-01-14 15:17:59 +01:00
|
|
|
--enable-weak-symbols \
|
2008-04-09 21:39:42 +02:00
|
|
|
--enable-wgetch-events \
|
2010-10-12 13:58:09 +02:00
|
|
|
--enable-pthreads-eintr \
|
2012-03-05 13:04:16 +01:00
|
|
|
--enable-string-hacks \
|
2007-12-06 02:05:01 +01:00
|
|
|
--prefix=%{_prefix} \
|
|
|
|
--exec-prefix=%{_prefix}\
|
|
|
|
--libdir=%{_libdir} \
|
|
|
|
--datadir=%{_datadir} \
|
|
|
|
--mandir=%{_mandir} \
|
|
|
|
--includedir=%{_incdir} \
|
2006-12-19 00:17:11 +01:00
|
|
|
"${WITHCHTYPE}" \
|
2010-01-14 15:17:59 +01:00
|
|
|
--disable-tic-depends \
|
2013-03-26 14:01:42 +01:00
|
|
|
--with-cxx-shared \
|
2014-12-16 12:21:56 +01:00
|
|
|
--with-pc-suffix \
|
2014-08-25 16:06:26 +02:00
|
|
|
--enable-pc-files \
|
2015-10-07 14:06:40 +02:00
|
|
|
%if 0%{?_crossbuild}
|
|
|
|
--with-fallbacks="$FALLBK" \
|
|
|
|
%else
|
|
|
|
--with-fallbacks="" \
|
|
|
|
%endif
|
2015-01-12 16:12:55 +01:00
|
|
|
%if %{with hasheddb}
|
|
|
|
--with-hashed-db \
|
|
|
|
%endif
|
2014-08-25 16:06:26 +02:00
|
|
|
--with-pkg-config-libdir=%{_libdir}/pkgconfig
|
2015-01-21 16:59:35 +01:00
|
|
|
sleep 1
|
2013-03-26 14:01:42 +01:00
|
|
|
kill $pid
|
2006-12-19 00:17:11 +01:00
|
|
|
#
|
2015-10-06 13:34:31 +02:00
|
|
|
# The configure line used above. Note that we override
|
|
|
|
# several options later with other configurations.
|
|
|
|
# It has been verified several times that this works.
|
2010-10-12 13:58:09 +02:00
|
|
|
#
|
|
|
|
c=$(grep '^ *$ *\./configure' config.log)
|
2015-10-07 14:06:40 +02:00
|
|
|
make -C c++ etip.h
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
#
|
|
|
|
# Refresh second install path
|
|
|
|
#
|
|
|
|
rm -rf %{root}
|
|
|
|
mkdir %{root}
|
|
|
|
%if !0%{?_crossbuild}
|
2010-10-12 13:58:09 +02:00
|
|
|
#
|
2015-10-06 13:34:31 +02:00
|
|
|
# This is a hack to be able to boot strap libncurses with
|
|
|
|
# our preferred fallback.c. For this we need the appropiate
|
2015-10-07 14:06:40 +02:00
|
|
|
# tools list infocmp(1) and tic(1). The first step was with
|
|
|
|
# an empty fallback.c, now we include the latest terminfo
|
2015-10-06 13:34:31 +02:00
|
|
|
# of our preferred fallback terminfo list into the final
|
|
|
|
# fallback.c.
|
2006-12-19 00:17:11 +01:00
|
|
|
#
|
2018-01-22 15:25:00 +01:00
|
|
|
mkdir lib/.build
|
2015-10-06 13:34:31 +02:00
|
|
|
cp -p progs/tic progs/tic.build
|
|
|
|
cp -p progs/infocmp progs/infocmp.build
|
2018-01-22 15:25:00 +01:00
|
|
|
cp -p lib/*.so* lib/.build/
|
2006-12-19 00:17:11 +01:00
|
|
|
PATH=$PWD/progs:$OPATH
|
2018-01-22 15:25:00 +01:00
|
|
|
export PATH
|
|
|
|
(cat > ${PWD}/.build_tic)<<-EOF
|
|
|
|
export LD_LIBRARY_PATH=$PWD/lib/.build
|
|
|
|
export BUILD_TIC=$PWD/progs/tic.build
|
|
|
|
export BUILD_INFOCMP=$PWD/progs/infocmp.build
|
|
|
|
EOF
|
2008-08-15 22:20:03 +02:00
|
|
|
pushd ncurses/
|
2006-12-19 00:17:11 +01:00
|
|
|
TERMINFO=$PWD/tmp
|
|
|
|
export TERMINFO
|
|
|
|
mkdir -p $TERMINFO
|
2018-01-22 15:25:00 +01:00
|
|
|
. ${PWD}/../.build_tic
|
2011-10-12 15:26:58 +02:00
|
|
|
$BUILD_TIC -I -r -e $FALLBK ../misc/terminfo.src > terminfo.src
|
|
|
|
$BUILD_TIC -o $TERMINFO -s terminfo.src
|
2019-07-09 12:52:07 +02:00
|
|
|
sh -e ./tinfo/MKfallback.sh $TERMINFO ../misc/terminfo.src $BUILD_TIC $BUILD_INFOCMP ${FALLBK//,/ } > fallback.c
|
2006-12-19 00:17:11 +01:00
|
|
|
rm -rf $TERMINFO
|
|
|
|
unset TERMINFO
|
2013-03-26 14:01:42 +01:00
|
|
|
cp -p fallback.c ../fallback.c.build
|
2018-01-22 15:25:00 +01:00
|
|
|
unset LD_LIBRARY_PATH
|
2008-08-15 22:20:03 +02:00
|
|
|
popd
|
2006-12-19 00:17:11 +01:00
|
|
|
PATH=$OPATH
|
|
|
|
#
|
|
|
|
# Now rebuild libncurses and do the rest of this job
|
|
|
|
#
|
2017-02-09 13:31:49 +01:00
|
|
|
find -name fallback.o -print -delete
|
2013-03-26 14:01:42 +01:00
|
|
|
cp fallback.c.build ncurses/fallback.c
|
|
|
|
make -C c++ etip.h
|
2010-07-02 18:27:42 +02:00
|
|
|
make %{?_smp_mflags}
|
2015-10-07 14:06:40 +02:00
|
|
|
%else
|
|
|
|
(cat > ${PWD}/.build_tic)<<-EOF
|
|
|
|
export BUILD_TIC=/usr/bin/tic
|
|
|
|
export BUILD_INFOCMP=/usr/bin/infocmp
|
|
|
|
EOF
|
|
|
|
%endif
|
2010-01-14 15:17:59 +01:00
|
|
|
# must not use %jobs here (would lead to: ln: ncurses.h already exists)
|
2017-02-09 13:31:49 +01:00
|
|
|
find man/ -name '*.[1-8]x.*' -print -delete
|
2018-01-30 08:53:57 +01:00
|
|
|
make install DESTDIR=%{root} includedir=%{_incdir} includesubdir=/ncursesw libdir=%{_libdir}
|
2018-03-02 11:18:56 +01:00
|
|
|
%if %{with onlytinfo}
|
|
|
|
# This ensures that we get the libtinfo *with* _nc_read_entry2 symbol as well
|
|
|
|
gcc $CFLAGS $LDFLAGS -fPIC -shared -Wl,--auxiliary=libtinfo.so.6,-soname,libtinfow.so.6,-stats,-lc \
|
2020-04-06 11:02:00 +02:00
|
|
|
-Wl,--version-script,ncurses/resulting.map -o %{root}%{_libdir}/libtinfow.so.%{basevers}
|
2020-04-06 10:20:23 +02:00
|
|
|
cp -p %{root}%{_libdir}/libtinfo.so.%{basevers} libtinfo.so.%{basevers}.back
|
|
|
|
cp -p %{root}%{_libdir}/libtinfow.so.%{basevers} libtinfow.so.%{basevers}.back
|
2018-03-02 11:18:56 +01:00
|
|
|
%endif
|
2013-08-05 16:22:20 +02:00
|
|
|
ln -sf %{_incdir}/ncurses/{curses,ncurses,term,termcap}.h %{root}%{_incdir}
|
2014-08-25 16:06:26 +02:00
|
|
|
mkdir pc
|
2019-02-11 14:47:03 +01:00
|
|
|
PKG_CONFIG_PATH=$PWD/pc:$(pkg-config --variable pc_path pkg-config)
|
|
|
|
export PKG_CONFIG_PATH
|
2019-05-15 13:49:05 +02:00
|
|
|
rm -vf %{root}%{_libdir}/pkgconfig/tic.pc
|
|
|
|
rm -vf %{root}%{_libdir}/pkgconfig/tinfo.pc
|
|
|
|
mv -vf %{root}%{_libdir}/pkgconfig/*.pc pc/
|
2019-12-16 11:34:37 +01:00
|
|
|
sed -ri 's@^(Requires.private:).*@\1@' pc/*.pc
|
2019-02-11 14:47:03 +01:00
|
|
|
sh %{S:6} --cflags "$(pkg-config --cflags ncursesw)" --libs "$(pkg-config --libs ncursesw)" \
|
|
|
|
%{root}%{_bindir}/ncursesw6-config
|
2019-12-16 11:34:37 +01:00
|
|
|
|
2018-03-01 14:42:38 +01:00
|
|
|
#
|
|
|
|
# Some tests
|
|
|
|
#
|
|
|
|
%if 0%{?qemu_user_space_build:1}%{?_crossbuild}
|
|
|
|
echo "Skipping tests due to running under QEMU / cross-building"
|
|
|
|
%else
|
2008-08-15 22:20:03 +02:00
|
|
|
#
|
|
|
|
# Check for tack program on base of above ncurses
|
|
|
|
#
|
2011-11-16 12:14:40 +01:00
|
|
|
LD_LIBRARY_PATH=$PWD/lib
|
|
|
|
export LD_LIBRARY_PATH PATH
|
2010-01-14 15:17:59 +01:00
|
|
|
pushd tack/
|
2008-08-15 22:20:03 +02:00
|
|
|
ldd ./tack
|
|
|
|
popd
|
2011-11-16 12:14:40 +01:00
|
|
|
unset LD_LIBRARY_PATH
|
2018-03-08 11:07:53 +01:00
|
|
|
%if 0%{?suse_version} > 1500
|
2018-03-01 14:42:38 +01:00
|
|
|
#
|
|
|
|
# Make the test suite for ncursesw6
|
|
|
|
#
|
|
|
|
pushd test
|
2019-12-02 09:40:47 +01:00
|
|
|
CFLAGS="$CFLAGS -I%{root}%{_incdir}/ncursesw/ -I%{root}%{_incdir}/" \
|
|
|
|
LDFLAGS="$LDFLAGS -Wl,-rpath-link=%{root}%{_libdir} -L%{root}%{_libdir}" \
|
|
|
|
LIBS="$LDFLAGS" \
|
2018-03-01 14:42:38 +01:00
|
|
|
./configure --with-ncursesw --enable-widec --prefix=$PWD
|
|
|
|
LD_LIBRARY_PATH=%{root}%{_libdir} \
|
2019-12-02 09:40:47 +01:00
|
|
|
make %{?_smp_mflags} TEST_ARGS='-lformw -lmenuw -lpanelw -lncursesw -lticw -l%{soname_tinfo} -Wl,--as-needed' TEST_LIBS='-lutil -lpthread'
|
|
|
|
make install TEST_ARGS='-lformw -lmenuw -lpanelw -lncursesw -lticw -l%{soname_tinfo} -Wl,--as-needed' TEST_LIBS='-lutil -lpthread'
|
2018-03-01 14:42:38 +01:00
|
|
|
mv bin binw
|
|
|
|
make distclean
|
|
|
|
popd
|
2018-03-08 11:07:53 +01:00
|
|
|
%endif
|
2018-03-01 14:42:38 +01:00
|
|
|
%endif
|
2008-08-15 22:20:03 +02:00
|
|
|
test ! -L tack || rm -f tack
|
2013-03-26 14:01:42 +01:00
|
|
|
make clean
|
2015-07-07 14:12:30 +02:00
|
|
|
#
|
2017-04-10 11:41:13 +02:00
|
|
|
# Now use --without-pthread to disable pthread support (abi == 5).
|
2015-07-07 14:12:30 +02:00
|
|
|
#
|
2018-03-01 14:42:38 +01:00
|
|
|
> $SCREENLOG
|
|
|
|
tail -q -s 0.5 -f $SCREENLOG & pid=$!
|
|
|
|
|
2017-04-10 11:41:13 +02:00
|
|
|
eval screen -D -m ./${c#*./} --with-abi-version=5 \
|
2018-03-01 14:42:38 +01:00
|
|
|
--without-manpages \
|
|
|
|
--without-progs \
|
|
|
|
--without-tack \
|
2015-07-07 14:12:30 +02:00
|
|
|
--without-pthread \
|
|
|
|
--disable-reentrant \
|
2018-02-15 14:02:46 +01:00
|
|
|
--disable-opaque-curses \
|
|
|
|
--disable-opaque-form \
|
|
|
|
--disable-opaque-menu \
|
|
|
|
--disable-opaque-panel \
|
2015-07-07 14:12:30 +02:00
|
|
|
--disable-ext-mouse \
|
2015-01-21 16:59:35 +01:00
|
|
|
--disable-widec \
|
2018-01-22 15:25:00 +01:00
|
|
|
--with-termlib=tinfo \
|
|
|
|
--with-ticlib=tic \
|
2015-01-21 16:59:35 +01:00
|
|
|
%if %{with symversion}
|
2015-07-07 14:12:30 +02:00
|
|
|
--with-versioned-syms=${PWD}/package/ncurses.map \
|
2015-01-21 16:59:35 +01:00
|
|
|
%endif
|
2018-01-22 15:25:00 +01:00
|
|
|
--disable-ext-colors \
|
|
|
|
--disable-overwrite \
|
2015-01-21 16:59:35 +01:00
|
|
|
--without-progs
|
|
|
|
sleep 1
|
2013-03-26 14:01:42 +01:00
|
|
|
kill $pid
|
2015-10-07 14:06:40 +02:00
|
|
|
%if !0%{?_crossbuild}
|
2017-02-09 13:31:49 +01:00
|
|
|
find -name fallback.o -print -delete
|
2013-03-26 14:01:42 +01:00
|
|
|
cp fallback.c.build ncurses/fallback.c
|
2015-10-07 14:06:40 +02:00
|
|
|
%endif
|
2013-03-26 14:01:42 +01:00
|
|
|
make -C c++ etip.h
|
2010-07-02 18:27:42 +02:00
|
|
|
make %{?_smp_mflags}
|
2015-08-17 14:39:03 +02:00
|
|
|
sed -ri 's@^(LDFLAGS=)$@\1-L\\${libdir}@
|
|
|
|
s@^(libdir=).show_libdir@\1%{_libdir}/ncurses5@
|
|
|
|
s@^(includedir=).show_includedir@\1%{_incdir}/ncurses5@' misc/gen-pkgconfig
|
2010-01-14 15:17:59 +01:00
|
|
|
# must not use %jobs here (would lead to: ln: ncurses.h already exists)
|
2015-07-07 14:12:30 +02:00
|
|
|
make install.libs install.includes DESTDIR=%{root} includedir=%{_incdir}/ncurses5 includesubdir=/ncurses libdir=%{_libdir}/ncurses5
|
|
|
|
ln -sf %{_incdir}/ncurses5/ncurses/{curses,ncurses,term}.h %{root}%{_incdir}/ncurses5/
|
2010-10-12 13:58:09 +02:00
|
|
|
pushd man
|
2015-07-07 14:12:30 +02:00
|
|
|
sh ../edit_man.sh normal installing %{root}%{_mandir} . ncurses5-config.1
|
2010-10-12 13:58:09 +02:00
|
|
|
popd
|
2014-08-25 16:06:26 +02:00
|
|
|
for pc in %{root}%{_libdir}/pkgconfig/*.pc
|
|
|
|
do
|
|
|
|
test -e "$pc" || break
|
|
|
|
base=${pc%%.pc}
|
|
|
|
base=${base##*/}
|
2019-12-17 10:05:36 +01:00
|
|
|
sed -ri '\@includedir=@i\
|
|
|
|
includedir5=%{_incdir}/ncurses5' "$pc"
|
|
|
|
sed -ri 's@^(includedir=).*@\1${includedir5}/ncurses@' "$pc"
|
2019-02-11 14:47:03 +01:00
|
|
|
sed -ri 's@^(libdir=).*@\1%{_libdir}/ncurses5@' "$pc"
|
2019-10-01 10:16:41 +02:00
|
|
|
sed -ri 's@^(Libs: )(.*)@\1-L${libdir}\2@' "$pc"
|
2015-07-07 14:12:30 +02:00
|
|
|
mv -f $pc pc/${base}5.pc
|
2019-12-17 10:05:36 +01:00
|
|
|
sed -ri 's@^(Cflags:.*)(-I.*)@\1-I${includedir5} \2@' pc/${base}5.pc
|
2019-12-16 11:34:37 +01:00
|
|
|
sed -ri 's@^(Requires.private:).*@\1@' pc/${base}5.pc
|
2014-08-25 16:06:26 +02:00
|
|
|
done
|
2019-02-11 14:47:03 +01:00
|
|
|
sh %{S:6} --cflags "$(pkg-config --cflags ncurses5)" --libs "$(pkg-config --libs ncurses5)" \
|
|
|
|
%{root}%{_bindir}/ncurses5-config
|
2015-07-07 14:12:30 +02:00
|
|
|
|
2006-12-19 00:17:11 +01:00
|
|
|
#
|
2018-01-22 15:25:00 +01:00
|
|
|
# Now use --disable-widec for narrow character support.
|
2006-12-19 00:17:11 +01:00
|
|
|
# The libs with 16 bit wide characters are binary incompatible
|
|
|
|
# to the normal 8bit wide character libs.
|
|
|
|
#
|
2015-07-07 14:52:28 +02:00
|
|
|
make clean
|
2013-02-18 13:51:49 +01:00
|
|
|
> $SCREENLOG
|
2013-03-26 14:01:42 +01:00
|
|
|
tail -q -s 0.5 -f $SCREENLOG & pid=$!
|
2017-04-13 15:28:29 +02:00
|
|
|
eval screen -D -m ./${c#*./} --with-pthread \
|
2018-03-01 14:42:38 +01:00
|
|
|
--without-manpages \
|
|
|
|
--without-progs \
|
|
|
|
--without-tack \
|
2015-01-21 16:59:35 +01:00
|
|
|
--enable-reentrant \
|
2018-02-15 14:02:46 +01:00
|
|
|
--enable-opaque-curses \
|
|
|
|
--enable-opaque-form \
|
|
|
|
--enable-opaque-menu \
|
|
|
|
--enable-opaque-panel \
|
2015-01-21 16:59:35 +01:00
|
|
|
--enable-ext-mouse \
|
2018-01-22 15:25:00 +01:00
|
|
|
--disable-widec \
|
|
|
|
--with-termlib=tinfo \
|
|
|
|
--with-ticlib=tic \
|
2015-01-21 16:59:35 +01:00
|
|
|
%if %{with symversion}
|
2018-01-22 15:25:00 +01:00
|
|
|
--with-versioned-syms=${PWD}/package/ncursest.map \
|
2015-01-21 16:59:35 +01:00
|
|
|
%endif
|
2018-01-22 15:25:00 +01:00
|
|
|
--enable-ext-colors \
|
|
|
|
--disable-overwrite \
|
2015-01-21 16:59:35 +01:00
|
|
|
--without-progs
|
|
|
|
sleep 1
|
2013-03-26 14:01:42 +01:00
|
|
|
kill $pid
|
2015-10-07 14:06:40 +02:00
|
|
|
%if !0%{?_crossbuild}
|
2017-02-09 13:31:49 +01:00
|
|
|
find -name fallback.o -print -delete
|
2013-03-26 14:01:42 +01:00
|
|
|
cp fallback.c.build ncurses/fallback.c
|
2015-10-07 14:06:40 +02:00
|
|
|
%endif
|
2013-03-26 14:01:42 +01:00
|
|
|
make -C c++ etip.h
|
2010-07-02 18:27:42 +02:00
|
|
|
make %{?_smp_mflags}
|
2010-01-14 15:17:59 +01:00
|
|
|
# must not use %jobs here (would lead to: ln: ncurses.h already exists)
|
2018-01-30 08:53:57 +01:00
|
|
|
make install.libs install.includes DESTDIR=%{root} includedir=%{_incdir} includesubdir=/ncurses libdir=%{_libdir}
|
2018-03-02 11:18:56 +01:00
|
|
|
%if %{with onlytinfo}
|
|
|
|
# This ensures that we get the libtinfo *with* _nc_read_entry2 symbol as well
|
2020-04-06 10:20:23 +02:00
|
|
|
cp -p libtinfo.so.%{basevers}.back %{root}%{_libdir}/libtinfo.so.%{basevers}
|
|
|
|
cp -p libtinfow.so.%{basevers}.back %{root}%{_libdir}/libtinfow.so.%{basevers}
|
2018-03-02 11:18:56 +01:00
|
|
|
%endif
|
2014-08-25 16:06:26 +02:00
|
|
|
pushd man
|
2018-01-22 15:25:00 +01:00
|
|
|
sh ../edit_man.sh normal installing %{root}%{_mandir} . ncurses6-config.1
|
2014-08-25 16:06:26 +02:00
|
|
|
popd
|
|
|
|
mv -f %{root}%{_libdir}/pkgconfig/*.pc pc/
|
2019-12-16 11:34:37 +01:00
|
|
|
sed -ri 's@^(Requires.private:).*@\1@' pc/*.pc
|
2019-02-11 14:47:03 +01:00
|
|
|
sh %{S:6} --cflags "$(pkg-config --cflags ncurses)" --libs "$(pkg-config --libs ncurses)" \
|
|
|
|
%{root}%{_bindir}/ncurses6-config
|
2008-08-15 22:20:03 +02:00
|
|
|
#
|
2018-03-01 14:42:38 +01:00
|
|
|
# Some tests
|
|
|
|
#
|
2018-03-08 11:07:53 +01:00
|
|
|
%if 0%{?qemu_user_space_build:1}%{?_crossbuild} || 0%{?suse_version} <= 1500
|
2018-03-01 14:42:38 +01:00
|
|
|
echo "Skipping tests due to running under QEMU / cross-building"
|
|
|
|
%else
|
|
|
|
#
|
|
|
|
# Make the test suite for ncurses6
|
2008-08-15 22:20:03 +02:00
|
|
|
#
|
2018-03-01 14:42:38 +01:00
|
|
|
pushd test
|
2019-12-02 09:40:47 +01:00
|
|
|
CFLAGS="$CFLAGS -I%{root}%{_incdir}ncurses/ -I%{root}%{_incdir}/" \
|
|
|
|
LDFLAGS="$LDFLAGS -Wl,-rpath-link=%{root}%{_libdir} -L%{root}%{_libdir}" \
|
|
|
|
LIBS="$LDFLAGS" \
|
2018-03-01 14:42:38 +01:00
|
|
|
./configure --with-ncurses --disable-widec --prefix=$PWD
|
|
|
|
LD_LIBRARY_PATH=%{root}%{_libdir} \
|
2019-12-02 09:40:47 +01:00
|
|
|
make %{?_smp_mflags} TEST_ARGS='-lform -lmenu -lpanel -lncurses -ltic -ltinfo -Wl,--as-needed' TEST_LIBS='-lutil -lpthread'
|
|
|
|
make install TEST_ARGS='-lform -lmenu -lpanel -lncurses -ltic -ltinfo -Wl,--as-needed' TEST_LIBS='-lutil -lpthread'
|
2018-03-01 14:42:38 +01:00
|
|
|
make distclean
|
|
|
|
popd
|
|
|
|
%endif
|
|
|
|
test ! -L tack || rm -f tack
|
2015-07-07 14:12:30 +02:00
|
|
|
make clean
|
2018-03-01 14:42:38 +01:00
|
|
|
#
|
|
|
|
# ABI == 5
|
|
|
|
#
|
2013-02-18 13:51:49 +01:00
|
|
|
> $SCREENLOG
|
2013-03-26 14:01:42 +01:00
|
|
|
tail -q -s 0.5 -f $SCREENLOG & pid=$!
|
2017-04-10 11:41:13 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# Now use --without-pthread to disable pthread support (abi == 5).
|
|
|
|
#
|
|
|
|
eval screen -D -m ./${c#*./} --with-abi-version=5 \
|
2018-03-01 14:42:38 +01:00
|
|
|
--without-manpages \
|
|
|
|
--without-progs \
|
|
|
|
--without-tack \
|
2015-07-07 16:10:25 +02:00
|
|
|
--without-pthread \
|
2015-07-07 14:12:30 +02:00
|
|
|
--disable-reentrant \
|
2018-02-15 14:02:46 +01:00
|
|
|
--disable-opaque-curses \
|
|
|
|
--disable-opaque-form \
|
|
|
|
--disable-opaque-menu \
|
|
|
|
--disable-opaque-panel \
|
2015-07-07 14:12:30 +02:00
|
|
|
--disable-ext-mouse \
|
2015-01-21 16:59:35 +01:00
|
|
|
--enable-widec \
|
2018-03-02 11:18:56 +01:00
|
|
|
--with-termlib=%{soname_tinfo} \
|
2017-04-24 10:26:33 +02:00
|
|
|
--with-ticlib=ticw \
|
2015-01-21 16:59:35 +01:00
|
|
|
%if %{with symversion}
|
2015-07-07 14:12:30 +02:00
|
|
|
--with-versioned-syms=${PWD}/package/ncursesw.map \
|
2015-01-21 16:59:35 +01:00
|
|
|
%endif
|
2018-01-22 15:25:00 +01:00
|
|
|
--disable-ext-colors \
|
|
|
|
--disable-overwrite \
|
2015-01-21 16:59:35 +01:00
|
|
|
--without-progs
|
|
|
|
sleep 1
|
2013-03-26 14:01:42 +01:00
|
|
|
kill $pid
|
2015-10-07 14:06:40 +02:00
|
|
|
%if !0%{?_crossbuild}
|
2017-02-09 13:31:49 +01:00
|
|
|
find -name fallback.o -print -delete
|
2013-03-26 14:01:42 +01:00
|
|
|
cp fallback.c.build ncurses/fallback.c
|
2015-10-07 14:06:40 +02:00
|
|
|
%endif
|
2013-03-26 14:01:42 +01:00
|
|
|
make -C c++ etip.h
|
2010-07-02 18:27:42 +02:00
|
|
|
make %{?_smp_mflags}
|
2015-08-17 14:39:03 +02:00
|
|
|
sed -ri 's@^(LDFLAGS=)$@\1-L\\${libdir}@
|
|
|
|
s@^(libdir=).show_libdir@\1%{_libdir}/ncurses5@
|
|
|
|
s@^(includedir=).show_includedir@\1%{_incdir}/ncurses5/ncursesw@' misc/gen-pkgconfig
|
2010-01-14 15:17:59 +01:00
|
|
|
# must not use %jobs here (would lead to: ln: ncurses.h already exists)
|
2015-07-07 14:12:30 +02:00
|
|
|
make install.libs install.includes DESTDIR=%{root} includedir=%{_incdir}/ncurses5 includesubdir=/ncursesw libdir=%{_libdir}/ncurses5
|
2018-03-02 11:18:56 +01:00
|
|
|
%if %{with onlytinfo}
|
|
|
|
gcc $CFLAGS $LDFLAGS -fPIC -shared -Wl,--auxiliary=libtinfo.so.5,-soname,libtinfow.so.5,-stats,-lc \
|
|
|
|
-Wl,--version-script,package/ncursesw.map -o %{root}%{_libdir}/libtinfow.so.5.9
|
|
|
|
%endif
|
2010-10-12 13:58:09 +02:00
|
|
|
pushd man
|
2015-07-07 14:12:30 +02:00
|
|
|
sh ../edit_man.sh normal installing %{root}%{_mandir} . ncursesw5-config.1
|
2010-10-12 13:58:09 +02:00
|
|
|
popd
|
2019-05-15 13:49:05 +02:00
|
|
|
rm -vf %{root}%{_libdir}/pkgconfig/tic.pc
|
|
|
|
rm -vf %{root}%{_libdir}/pkgconfig/tinfo.pc
|
2014-08-25 16:06:26 +02:00
|
|
|
for pc in %{root}%{_libdir}/pkgconfig/*.pc
|
|
|
|
do
|
|
|
|
test -e "$pc" || break
|
|
|
|
base=${pc%%.pc}
|
|
|
|
base=${base##*/}
|
2019-12-17 10:05:36 +01:00
|
|
|
sed -ri '\@includedir=@i\
|
|
|
|
includedir5=%{_incdir}/ncurses5' "$pc"
|
2020-01-07 10:48:33 +01:00
|
|
|
sed -ri 's@^(includedir=).*@\1${includedir5}/ncursesw@' "$pc"
|
2019-02-11 14:47:03 +01:00
|
|
|
sed -ri 's@^(libdir=).*@\1%{_libdir}/ncurses5@' "$pc"
|
|
|
|
sed -ri 's@^(Libs: )(.*)@\1-L${libdir}\2@' "$pc"
|
2015-07-07 14:12:30 +02:00
|
|
|
mv -f $pc pc/${base}5.pc
|
2019-12-17 10:05:36 +01:00
|
|
|
sed -ri 's@^(Cflags:.*)(-I.*)@\1-I${includedir5} \2@' pc/${base}5.pc
|
2019-12-16 11:34:37 +01:00
|
|
|
sed -ri 's@^(Requires.private:).*@\1@' pc/${base}5.pc
|
2014-08-25 16:06:26 +02:00
|
|
|
done
|
2019-02-11 14:47:03 +01:00
|
|
|
sh %{S:6} --cflags "$(pkg-config --cflags ncursesw5)" --libs "$(pkg-config --libs ncursesw5)" \
|
|
|
|
%{root}%{_bindir}/ncursesw5-config
|
2006-12-19 00:17:11 +01:00
|
|
|
|
|
|
|
%install
|
2017-02-03 09:04:49 +01:00
|
|
|
PATH=$PWD/gzip:$PATH
|
2013-10-29 14:09:28 +01:00
|
|
|
(cd %{root}/; tar -cpSf - *)|tar -xpsSf - -C %{buildroot}/
|
2008-04-09 21:39:42 +02:00
|
|
|
rm -rf %{root}
|
|
|
|
mkdir %{buildroot}/%{_lib}
|
2017-04-24 10:26:33 +02:00
|
|
|
for model in libncurses libncursest libncursesw libncursestw libtinfo libtinfow libtic libticw
|
2007-09-13 18:38:12 +02:00
|
|
|
do
|
2011-11-16 12:14:40 +01:00
|
|
|
for lib in %{buildroot}%{_libdir}/${model}.so.* ; do
|
2008-08-15 22:20:03 +02:00
|
|
|
test -e "${lib}" || continue
|
2011-11-16 12:14:40 +01:00
|
|
|
mv "${lib}" %{buildroot}/%{_lib}/ || continue
|
|
|
|
done
|
2015-07-07 14:12:30 +02:00
|
|
|
for lib in %{buildroot}/%{_lib}/${model}.so.6 ; do
|
2011-11-16 12:14:40 +01:00
|
|
|
test -e "${lib}" || continue
|
|
|
|
test -L "${lib}" || continue
|
2008-08-15 22:20:03 +02:00
|
|
|
lib=${lib#%{buildroot}}
|
2011-11-24 14:17:56 +01:00
|
|
|
lnk=%{buildroot}%{_libdir}/${model}.so
|
|
|
|
case "${lib##*/}" in
|
2017-04-13 15:28:29 +02:00
|
|
|
libncursesw*)
|
|
|
|
rm -f ${lnk}
|
|
|
|
echo '/* GNU ld script */' > ${lnk}
|
2018-03-02 11:18:56 +01:00
|
|
|
echo "INPUT(${lib} AS_NEEDED(-l%{soname_tinfo} -ldl))" >> ${lnk}
|
2017-04-13 15:28:29 +02:00
|
|
|
;;
|
2011-11-24 14:17:56 +01:00
|
|
|
libncurses*)
|
|
|
|
rm -f ${lnk}
|
2015-08-17 14:39:03 +02:00
|
|
|
echo '/* GNU ld script */' > ${lnk}
|
|
|
|
echo "INPUT(${lib} AS_NEEDED(-ltinfo -ldl))" >> ${lnk}
|
2011-11-24 14:17:56 +01:00
|
|
|
;;
|
|
|
|
*) ln -sf ${lib} %{buildroot}%{_libdir}/${model}.so
|
|
|
|
esac
|
2008-08-15 22:20:03 +02:00
|
|
|
done
|
2007-09-13 18:38:12 +02:00
|
|
|
done
|
2020-06-22 19:00:15 +02:00
|
|
|
/sbin/ldconfig -r %{buildroot}/ -n -v /%{_lib}
|
2011-11-24 15:31:52 +01:00
|
|
|
%if 0
|
2011-11-24 14:17:56 +01:00
|
|
|
lnk=%{buildroot}%{_libdir}/libtermcap.so
|
|
|
|
echo '/* GNU ld script */' > ${lnk}
|
|
|
|
echo "INPUT(AS_NEEDED(-ltinfo))" >> ${lnk}
|
2011-11-24 15:31:52 +01:00
|
|
|
%endif
|
2007-12-06 02:05:01 +01:00
|
|
|
chmod 0755 %{buildroot}/%{_lib}/lib*.so.*
|
|
|
|
chmod 0755 %{buildroot}/%{_libdir}/lib*.so.*
|
2008-08-21 17:51:08 +02:00
|
|
|
chmod a-x %{buildroot}/%{_libdir}/lib*.a
|
2015-07-07 14:12:30 +02:00
|
|
|
if test -d %{buildroot}%{_libdir}/ncurses5 ; then
|
|
|
|
mv %{buildroot}%{_libdir}/ncurses5/*.so.5* %{buildroot}%{_libdir}/
|
|
|
|
for lib in %{buildroot}%{_libdir}/ncurses5/*.so
|
2008-08-15 22:20:03 +02:00
|
|
|
do
|
2011-11-24 14:17:56 +01:00
|
|
|
lnk=$lib
|
2015-07-07 14:12:30 +02:00
|
|
|
lib=/%{_lib}/${lib##*/}.5
|
2008-08-15 22:20:03 +02:00
|
|
|
case "${lib##*/}" in
|
2017-04-13 15:28:29 +02:00
|
|
|
libncursesw*)
|
|
|
|
rm -f "${lnk}"
|
|
|
|
echo '/* GNU ld script */' > ${lnk}
|
2018-03-02 11:18:56 +01:00
|
|
|
echo "INPUT(${lib} AS_NEEDED(-l%{soname_tinfo}))">> ${lnk}
|
2017-04-13 15:28:29 +02:00
|
|
|
;;
|
2011-11-24 14:17:56 +01:00
|
|
|
libncurses*)
|
|
|
|
rm -f "${lnk}"
|
|
|
|
echo '/* GNU ld script */' > ${lnk}
|
|
|
|
echo "INPUT(${lib} AS_NEEDED(-ltinfo))" >> ${lnk}
|
|
|
|
;;
|
|
|
|
libtinfo*)
|
|
|
|
test -L "${lnk}" || continue
|
|
|
|
ln -sf ${lib} ${lnk}
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
test -L "${lnk}" || continue
|
|
|
|
ln -sf ../${lib##*/} ${lnk}
|
2008-08-15 22:20:03 +02:00
|
|
|
esac
|
|
|
|
done
|
2017-04-24 10:26:33 +02:00
|
|
|
for model in libncurses libncursest libncursesw libncursestw libtinfo libtinfow libtic libticw
|
2008-08-15 22:20:03 +02:00
|
|
|
do
|
2011-11-16 12:14:40 +01:00
|
|
|
for lib in %{buildroot}%{_libdir}/${model}.so.* ; do
|
|
|
|
test -e "${lib}" || continue
|
|
|
|
mv "${lib}" %{buildroot}/%{_lib}/ || continue
|
|
|
|
done
|
2015-07-07 14:12:30 +02:00
|
|
|
for lib in %{buildroot}/%{_lib}/${model}.so.5 ; do
|
2011-11-16 12:14:40 +01:00
|
|
|
test -e "${lib}" || continue
|
|
|
|
test -L "${lib}" || continue
|
|
|
|
lib=${lib#%{buildroot}}
|
2015-07-07 14:12:30 +02:00
|
|
|
lnk=%{buildroot}%{_libdir}/ncurses5/${model}.so
|
2011-11-24 14:17:56 +01:00
|
|
|
case "${lib##*/}" in
|
2017-04-13 15:28:29 +02:00
|
|
|
libncursesw*)
|
|
|
|
rm -f ${lnk}
|
|
|
|
echo '/* GNU ld script */' > ${lnk}
|
|
|
|
echo 'SEARCH_DIR(%{_libdir}/ncurses5)' >> ${lnk}
|
2018-03-02 11:18:56 +01:00
|
|
|
echo "INPUT(${lib} AS_NEEDED(-l%{soname_tinfo}))">> ${lnk}
|
2017-04-13 15:28:29 +02:00
|
|
|
;;
|
2011-11-24 14:17:56 +01:00
|
|
|
libncurses*)
|
|
|
|
rm -f ${lnk}
|
|
|
|
echo '/* GNU ld script */' > ${lnk}
|
2015-07-07 14:12:30 +02:00
|
|
|
echo 'SEARCH_DIR(%{_libdir}/ncurses5)' >> ${lnk}
|
2011-11-24 14:17:56 +01:00
|
|
|
echo "INPUT(${lib} AS_NEEDED(-ltinfo))" >> ${lnk}
|
|
|
|
;;
|
2015-07-07 14:12:30 +02:00
|
|
|
*) ln -sf ${lib} %{buildroot}%{_libdir}/ncurses5/${model}.so
|
2011-11-24 14:17:56 +01:00
|
|
|
esac
|
2011-11-16 12:14:40 +01:00
|
|
|
done
|
2008-08-15 22:20:03 +02:00
|
|
|
done
|
2015-07-07 14:12:30 +02:00
|
|
|
chmod 0755 %{buildroot}/%{_lib}/lib*.so.5*
|
|
|
|
chmod 0755 %{buildroot}/%{_libdir}/lib*.so.5*
|
|
|
|
chmod a-x %{buildroot}/%{_libdir}/ncurses5/lib*.a
|
2008-08-15 22:20:03 +02:00
|
|
|
fi
|
2007-12-06 02:05:01 +01:00
|
|
|
test -n "%{buildroot}" || ldconfig -N
|
|
|
|
mkdir -p %{buildroot}%{_defaultdocdir}/ncurses
|
2007-05-17 00:31:03 +02:00
|
|
|
bzip2 -c misc/terminfo.src > misc/terminfo.src.bz2
|
2007-12-06 02:05:01 +01:00
|
|
|
install -m 644 misc/terminfo.src.bz2 %{buildroot}%{_defaultdocdir}/ncurses/
|
|
|
|
install -m 644 doc/html/*.html %{buildroot}%{_defaultdocdir}/ncurses/
|
2007-05-17 00:31:03 +02:00
|
|
|
bzip2 doc/ncurses-intro.doc -c > doc/ncurses-intro.txt.bz2
|
2007-12-06 02:05:01 +01:00
|
|
|
install -m 644 doc/ncurses-intro.txt.bz2 %{buildroot}%{_defaultdocdir}/ncurses/
|
2007-05-17 00:31:03 +02:00
|
|
|
bzip2 doc/hackguide.doc -c > doc/hackguide.txt.bz2
|
2007-12-06 02:05:01 +01:00
|
|
|
install -m 644 doc/hackguide.txt.bz2 %{buildroot}%{_defaultdocdir}/ncurses/
|
2008-04-09 21:39:42 +02:00
|
|
|
install -m 644 %{S:3} %{buildroot}%{_defaultdocdir}/ncurses/
|
2012-07-31 12:00:00 +02:00
|
|
|
install -m 644 README %{buildroot}%{_defaultdocdir}/ncurses/
|
|
|
|
install -m 644 NEWS %{buildroot}%{_defaultdocdir}/ncurses/
|
2016-10-27 12:28:43 +02:00
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/terminfo
|
2007-12-06 02:05:01 +01:00
|
|
|
mkdir -p %{buildroot}%{_miscdir}
|
2011-11-16 12:14:40 +01:00
|
|
|
pushd ncurses/
|
2018-01-22 15:25:00 +01:00
|
|
|
. ${PWD}/../.build_tic
|
2010-01-14 15:17:59 +01:00
|
|
|
{ echo "# See annotated version in %{_defaultdocdir}/ncurses/terminfo.src.bz2"
|
2011-10-12 15:26:58 +02:00
|
|
|
$BUILD_TIC -C -r ../misc/terminfo.src | grep -E -v '^#'; } > termcap
|
2006-12-19 00:17:11 +01:00
|
|
|
# Gererate new termcap entries for various linux consoles
|
|
|
|
TERMCAP=termcap \
|
2007-12-06 02:05:01 +01:00
|
|
|
TERMINFO=%{buildroot}%{_datadir}/terminfo \
|
2006-12-19 00:17:11 +01:00
|
|
|
bash %{SOURCE2}
|
2007-12-06 02:05:01 +01:00
|
|
|
install -m 0644 termcap.new %{buildroot}%{_miscdir}/termcap
|
2018-01-22 15:25:00 +01:00
|
|
|
unset LD_LIBRARY_PATH
|
2011-11-16 12:14:40 +01:00
|
|
|
popd
|
2007-12-06 02:05:01 +01:00
|
|
|
if test `%{_bindir}/id -u` = '0' ; then
|
|
|
|
chown root:root %{buildroot}%{_miscdir}/termcap
|
|
|
|
chmod 0644 %{buildroot}%{_miscdir}/termcap
|
2006-12-19 00:17:11 +01:00
|
|
|
fi
|
2007-12-06 02:05:01 +01:00
|
|
|
ln -sf %{_miscdir}/termcap %{buildroot}%{_sysconfdir}/termcap
|
2006-12-19 00:17:11 +01:00
|
|
|
(cat > default.list) <<-EOF
|
|
|
|
%{tabset std}
|
|
|
|
%{tabset stdcrt}
|
|
|
|
%{tabset vt100}
|
|
|
|
%{tabset vt300}
|
|
|
|
%{terminfo a/ansi}
|
|
|
|
%{terminfo a/arpanet}
|
|
|
|
%{terminfo d/dumb}
|
|
|
|
%{terminfo d/dialup}
|
|
|
|
%{terminfo g/gnome}
|
|
|
|
%{terminfo g/gnome-rh72}
|
2013-06-21 15:53:59 +02:00
|
|
|
%{terminfo g/gnome-rh80}
|
|
|
|
%{terminfo g/gnome-rh90}
|
|
|
|
%{terminfo g/gnome-fc5}
|
|
|
|
%{terminfo i/ibm327x}
|
2006-12-19 00:17:11 +01:00
|
|
|
%{terminfo k/klone+color}
|
2013-06-21 15:53:59 +02:00
|
|
|
%{terminfo k/konsole}
|
|
|
|
%{terminfo k/konsole-256color}
|
2006-12-19 00:17:11 +01:00
|
|
|
%{terminfo k/kvt}
|
|
|
|
%{terminfo k/kvt-rh}
|
|
|
|
%{terminfo l/linux}
|
|
|
|
%{terminfo l/linux-m}
|
|
|
|
%{terminfo l/linux-nic}
|
|
|
|
%{terminfo m/mlterm}
|
|
|
|
%{terminfo n/net}
|
|
|
|
%{terminfo n/network}
|
|
|
|
%{terminfo n/nxterm}
|
|
|
|
%{terminfo p/patch}
|
|
|
|
%{terminfo r/rxvt}
|
2013-06-21 15:53:59 +02:00
|
|
|
%{terminfo r/rxvt-basic}
|
|
|
|
%{terminfo r/rxvt-color}
|
|
|
|
%{terminfo r/rxvt-256color}
|
|
|
|
%{terminfo r/rxvt-unicode}
|
|
|
|
%{terminfo r/rxvt-unicode-256color}
|
2017-05-19 15:43:11 +02:00
|
|
|
%{terminfo s/screen+fkeys}
|
2006-12-19 00:17:11 +01:00
|
|
|
%{terminfo s/screen}
|
2017-05-19 15:43:11 +02:00
|
|
|
%{terminfo s/screen-16color}
|
2006-12-19 00:17:11 +01:00
|
|
|
%{terminfo s/screen-256color}
|
2017-05-19 15:43:11 +02:00
|
|
|
%{terminfo s/screen-bce}
|
|
|
|
%{terminfo s/screen-w}
|
2006-12-19 00:17:11 +01:00
|
|
|
%{terminfo s/sun}
|
|
|
|
%{terminfo s/switch}
|
|
|
|
%{terminfo u/unknown}
|
|
|
|
%{terminfo v/vt100}
|
|
|
|
%{terminfo v/vt102}
|
|
|
|
%{terminfo v/vt220}
|
|
|
|
%{terminfo v/vt220-8}
|
|
|
|
%{terminfo v/vt220-8bit}
|
|
|
|
%{terminfo v/vt320}
|
|
|
|
%{terminfo v/vt52}
|
2013-06-21 15:53:59 +02:00
|
|
|
%{terminfo v/vte}
|
2006-12-19 00:17:11 +01:00
|
|
|
%{terminfo x/xterm}
|
|
|
|
%{terminfo x/xterm-color}
|
|
|
|
%{terminfo x/xterm-256color}
|
|
|
|
%{terminfo x/xterm-basic}
|
|
|
|
%{terminfo x/xterm-nic}
|
|
|
|
%{terminfo x/xterm-r6}
|
|
|
|
EOF
|
2017-05-19 15:43:11 +02:00
|
|
|
# Better screen support and workaround about missing terminfo entries
|
|
|
|
# might be help on boo#812067 as well as on boo#935736 but may cause
|
|
|
|
# boo#940459 (which should be fixed by screen its self!)
|
2018-11-21 12:38:39 +01:00
|
|
|
rm -vf %{buildroot}%{terminfo s/screen.xterm}
|
2017-05-19 15:43:11 +02:00
|
|
|
(cat > screen.list) <<-EOF
|
|
|
|
%{terminfo s/screen.gnome}
|
|
|
|
%{terminfo s/screen.konsole}
|
|
|
|
%{terminfo s/screen.linux}
|
|
|
|
EOF
|
2017-09-11 12:53:18 +02:00
|
|
|
(cat > iterm.list) <<-EOF
|
|
|
|
%{terminfo i/iTerm.app}
|
|
|
|
%{terminfo i/iTerm2.app}
|
|
|
|
%{terminfo i/iterm}
|
|
|
|
%{terminfo i/iterm2}
|
|
|
|
EOF
|
2007-12-06 02:05:01 +01:00
|
|
|
find %{buildroot}%{tabset ""} %{buildroot}%{terminfo ""} \
|
2006-12-19 00:17:11 +01:00
|
|
|
\( -type f -or -type l \) | \
|
2007-12-06 02:05:01 +01:00
|
|
|
sed "s@^%{buildroot}@@g" | \
|
2017-09-11 12:53:18 +02:00
|
|
|
grep -v -F -x -f default.list -f screen.list -f iterm.list \
|
2006-12-19 00:17:11 +01:00
|
|
|
> extension.list
|
2020-02-17 10:52:30 +01:00
|
|
|
#
|
|
|
|
# Remove backward compatibilty link if any
|
|
|
|
#
|
2007-12-06 02:05:01 +01:00
|
|
|
rm -f %{buildroot}%{_prefix}/lib/terminfo
|
2020-02-17 10:52:30 +01:00
|
|
|
#
|
|
|
|
# Store pkg-config files
|
|
|
|
#
|
2019-02-11 14:47:03 +01:00
|
|
|
cp -p pc/*.pc %{buildroot}%{_libdir}/pkgconfig/
|
2006-12-19 00:17:11 +01:00
|
|
|
|
2018-03-01 14:42:38 +01:00
|
|
|
%if 0%{?qemu_user_space_build:1}%{?_crossbuild}
|
|
|
|
# No test here
|
|
|
|
%else
|
|
|
|
%check
|
|
|
|
LD_LIBRARY_PATH=%{buildroot}/%{_lib}:%{buildroot}%{_libdir}
|
|
|
|
export LD_LIBRARY_PATH
|
2020-04-07 11:25:57 +02:00
|
|
|
nm -D %{buildroot}/%{_lib}/libncursesw.so.%{basevers} | grep -q in_wch
|
2018-03-02 11:18:56 +01:00
|
|
|
%if %{with onlytinfo}
|
2020-04-06 10:20:23 +02:00
|
|
|
nm -D %{buildroot}/%{_lib}/libtinfo.so.%{basevers} | grep -q _nc_read_entry2
|
2018-03-02 11:18:56 +01:00
|
|
|
%endif
|
2018-03-08 11:07:53 +01:00
|
|
|
%if 0%{?suse_version} > 1500
|
2018-03-01 14:42:38 +01:00
|
|
|
pushd test
|
|
|
|
expect -d <<-'EOF'
|
|
|
|
set env(TERM) xterm
|
2018-03-05 09:05:04 +01:00
|
|
|
set timeout 20
|
2018-03-01 14:42:38 +01:00
|
|
|
spawn -noecho "binw/newdemo"
|
|
|
|
send -- "x"
|
|
|
|
sleep 5
|
|
|
|
send -- "x"
|
|
|
|
sleep 5
|
|
|
|
send -- "x"
|
|
|
|
sleep 5
|
|
|
|
send -- "q"
|
2018-03-05 09:05:04 +01:00
|
|
|
wait -nowait
|
2018-03-01 14:42:38 +01:00
|
|
|
EOF
|
|
|
|
expect -d <<-'EOF'
|
|
|
|
set env(TERM) xterm
|
2018-03-05 09:05:04 +01:00
|
|
|
set timeout 20
|
2018-03-01 14:42:38 +01:00
|
|
|
spawn -noecho "bin/newdemo"
|
|
|
|
send -- "x"
|
|
|
|
sleep 5
|
|
|
|
send -- "x"
|
|
|
|
sleep 5
|
|
|
|
send -- "x"
|
|
|
|
sleep 5
|
|
|
|
send -- "q"
|
2018-03-05 09:05:04 +01:00
|
|
|
wait -nowait
|
2018-03-01 14:42:38 +01:00
|
|
|
EOF
|
|
|
|
popd
|
|
|
|
%endif
|
2018-03-08 11:07:53 +01:00
|
|
|
%endif
|
2018-03-01 14:42:38 +01:00
|
|
|
|
2008-04-09 21:39:42 +02:00
|
|
|
%post -n libncurses5 -p /sbin/ldconfig
|
2007-05-25 23:57:21 +02:00
|
|
|
|
2008-04-09 21:39:42 +02:00
|
|
|
%postun -n libncurses5 -p /sbin/ldconfig
|
2008-08-15 22:20:03 +02:00
|
|
|
|
|
|
|
%post -n libncurses6 -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n libncurses6 -p /sbin/ldconfig
|
2007-05-25 23:57:21 +02:00
|
|
|
|
2008-04-25 15:24:46 +02:00
|
|
|
%files -n terminfo-base -f default.list
|
2006-12-19 00:17:11 +01:00
|
|
|
%defattr(-,root,root)
|
2008-04-09 21:39:42 +02:00
|
|
|
%{_sysconfdir}/termcap
|
|
|
|
%config %{_miscdir}/termcap
|
2016-10-27 12:28:43 +02:00
|
|
|
%dir %{_sysconfdir}/terminfo
|
2007-12-06 02:05:01 +01:00
|
|
|
%dir %{_datadir}/tabset/
|
|
|
|
%dir %{_datadir}/terminfo/
|
|
|
|
%dir %{_datadir}/terminfo/*/
|
2008-04-25 15:24:46 +02:00
|
|
|
|
2017-05-19 15:43:11 +02:00
|
|
|
%files -n terminfo-screen -f screen.list
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{_datadir}/terminfo/
|
|
|
|
|
2017-09-11 12:53:18 +02:00
|
|
|
%files -n terminfo-iterm -f iterm.list
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{_datadir}/terminfo/
|
|
|
|
|
2008-04-25 15:24:46 +02:00
|
|
|
%files -n ncurses-utils
|
|
|
|
%defattr(-,root,root)
|
2007-12-06 02:05:01 +01:00
|
|
|
%{_bindir}/clear
|
2015-08-17 14:39:03 +02:00
|
|
|
%{_bindir}/infocmp
|
2007-12-06 02:05:01 +01:00
|
|
|
%{_bindir}/reset
|
2010-01-14 15:17:59 +01:00
|
|
|
%{_bindir}/tabs
|
2007-12-06 02:05:01 +01:00
|
|
|
%{_bindir}/toe
|
|
|
|
%{_bindir}/tput
|
|
|
|
%{_bindir}/tset
|
2006-12-19 00:17:11 +01:00
|
|
|
%doc %{_mandir}/man1/clear.1.gz
|
2017-04-24 10:34:03 +02:00
|
|
|
%doc %{_mandir}/man1/infocmp.1.gz
|
2006-12-19 00:17:11 +01:00
|
|
|
%doc %{_mandir}/man1/reset.1.gz
|
2010-01-14 15:17:59 +01:00
|
|
|
%doc %{_mandir}/man1/tabs.1.gz
|
2006-12-19 00:17:11 +01:00
|
|
|
%doc %{_mandir}/man1/toe.1.gz
|
|
|
|
%doc %{_mandir}/man1/tput.1.gz
|
|
|
|
%doc %{_mandir}/man1/tset.1.gz
|
|
|
|
%doc %{_mandir}/man5/*.gz
|
2017-02-09 13:31:49 +01:00
|
|
|
%doc AUTHORS
|
2006-12-19 00:17:11 +01:00
|
|
|
|
2008-04-09 21:39:42 +02:00
|
|
|
%files -n libncurses5
|
|
|
|
%defattr(-,root,root)
|
2008-08-15 22:20:03 +02:00
|
|
|
/%{_lib}/lib*.so.5*
|
|
|
|
%{_libdir}/lib*.so.5*
|
|
|
|
|
|
|
|
%files -n libncurses6
|
|
|
|
%defattr(-,root,root)
|
|
|
|
/%{_lib}/lib*.so.6*
|
|
|
|
%{_libdir}/lib*.so.6*
|
2008-04-09 21:39:42 +02:00
|
|
|
|
2006-12-19 00:17:11 +01:00
|
|
|
%files -n ncurses-devel
|
|
|
|
%defattr(-,root,root)
|
2007-05-17 00:31:03 +02:00
|
|
|
%dir %{_defaultdocdir}/ncurses/
|
|
|
|
%doc %{_defaultdocdir}/ncurses/*
|
2017-02-03 09:04:49 +01:00
|
|
|
%{_bindir}/ncurses*6-config
|
2007-12-06 02:05:01 +01:00
|
|
|
%{_bindir}/captoinfo
|
|
|
|
%{_bindir}/infotocap
|
|
|
|
%{_bindir}/tic
|
|
|
|
%dir %{_incdir}/ncurses/
|
|
|
|
%dir %{_incdir}/ncursesw/
|
|
|
|
%{_incdir}/*.h
|
2017-02-03 09:04:49 +01:00
|
|
|
%{_incdir}/ncurses/*.h
|
|
|
|
%{_incdir}/ncursesw/*.h
|
2007-12-06 02:05:01 +01:00
|
|
|
%{_libdir}/lib*.so
|
2017-02-03 09:04:49 +01:00
|
|
|
%{_libdir}/pkgconfig/*[clmosuw\+].pc
|
2017-04-24 10:34:03 +02:00
|
|
|
%doc %{_mandir}/man1/ncurses*6-config.1.gz
|
2006-12-19 00:17:11 +01:00
|
|
|
%doc %{_mandir}/man1/captoinfo.1.gz
|
|
|
|
%doc %{_mandir}/man1/infotocap.1.gz
|
|
|
|
%doc %{_mandir}/man1/tic.1.gz
|
|
|
|
%doc %{_mandir}/man3/*.gz
|
|
|
|
%doc %{_mandir}/man7/*.gz
|
|
|
|
|
2019-02-18 09:55:24 +01:00
|
|
|
%files -n ncurses-devel-static
|
|
|
|
%{_libdir}/lib*.a
|
|
|
|
|
2017-02-03 09:04:49 +01:00
|
|
|
%files -n ncurses5-devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_bindir}/ncurses*5-config
|
|
|
|
%dir %{_incdir}/ncurses5/
|
|
|
|
%dir %{_incdir}/ncurses5/ncurses/
|
|
|
|
%dir %{_incdir}/ncurses5/ncursesw/
|
|
|
|
%{_incdir}/ncurses5/*.h
|
|
|
|
%{_incdir}/ncurses5/ncurses/*.h
|
|
|
|
%{_incdir}/ncurses5/ncursesw/*.h
|
|
|
|
%dir %{_libdir}/ncurses5/
|
|
|
|
%{_libdir}/ncurses5/lib*.so
|
|
|
|
%{_libdir}/pkgconfig/*5.pc
|
2017-04-24 10:34:03 +02:00
|
|
|
%doc %{_mandir}/man1/ncurses*5-config.1.gz
|
2017-02-03 09:04:49 +01:00
|
|
|
|
2019-02-18 09:55:24 +01:00
|
|
|
%files -n ncurses5-devel-static
|
|
|
|
%{_libdir}/ncurses5/lib*.a
|
|
|
|
|
2007-02-02 01:32:54 +01:00
|
|
|
%files -n tack
|
|
|
|
%defattr(-,root,root)
|
2007-12-06 02:05:01 +01:00
|
|
|
%{_bindir}/tack
|
2007-02-02 01:32:54 +01:00
|
|
|
%doc %{_mandir}/man1/tack.1.gz
|
|
|
|
|
2006-12-19 00:17:11 +01:00
|
|
|
%files -f extension.list -n terminfo
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
2007-03-19 13:53:11 +01:00
|
|
|
%changelog
|