forked from pool/ncurses
This commit is contained in:
parent
3d4c11d216
commit
691fd33fbb
39
README.devel
39
README.devel
@ -5,63 +5,68 @@ There are several Ncurses Libraries which can be used for building
|
|||||||
with an terminal based application. The standard Ncurses Libraries
|
with an terminal based application. The standard Ncurses Libraries
|
||||||
is given with ABI 5.6
|
is given with ABI 5.6
|
||||||
|
|
||||||
|
/usr/include/ncurses/*.h
|
||||||
/usr/lib/libncurses.so or /usr/lib64/libncurses.so
|
/usr/lib/libncurses.so or /usr/lib64/libncurses.so
|
||||||
/usr/lib/libform.so or /usr/lib64/libform.so
|
/usr/lib/libform.so or /usr/lib64/libform.so
|
||||||
/usr/lib/libmenu.so or /usr/lib64/libmenu.so
|
/usr/lib/libmenu.so or /usr/lib64/libmenu.so
|
||||||
/usr/lib/libpanel.so or /usr/lib64/libpanel.so
|
/usr/lib/libpanel.so or /usr/lib64/libpanel.so
|
||||||
|
|
||||||
and its header are installed in /usr/include/ e.g. (n)curses.h.
|
and its header are installed in /usr/include/ncurses/ e.g.
|
||||||
Nothing has to be added in the CFLAGS nor in the LDFLAGS.
|
ncurses.h. For backward compatibility with simply older
|
||||||
Use the outout of
|
programs the headers curses.h, ncurses.h, and term.h
|
||||||
|
will be also found in /usr/include/. Use the output of
|
||||||
|
|
||||||
ncurses5-config --cflags for CFLAGS
|
ncurses5-config --cflags for CFLAGS
|
||||||
ncurses5-config --libs for LDFLAGS
|
ncurses5-config --libs for LDFLAGS
|
||||||
|
|
||||||
|
to extend the CFLAGS and the LDFLAGS.
|
||||||
For a version with wide character support please use the
|
For a version with wide character support please use the
|
||||||
libraries with old ABI 5.6
|
libraries with old ABI 5.6
|
||||||
|
|
||||||
|
/usr/include/ncursesw/*.h
|
||||||
/usr/lib/libncursesw.so or /usr/lib64/libncursesw.so
|
/usr/lib/libncursesw.so or /usr/lib64/libncursesw.so
|
||||||
/usr/lib/libformw.so or /usr/lib64/libformw.so
|
/usr/lib/libformw.so or /usr/lib64/libformw.so
|
||||||
/usr/lib/libmenuw.so or /usr/lib64/libmenuw.so
|
/usr/lib/libmenuw.so or /usr/lib64/libmenuw.so
|
||||||
/usr/lib/libpanelw.so or /usr/lib64/libpanelw.so
|
/usr/lib/libpanelw.so or /usr/lib64/libpanelw.so
|
||||||
|
|
||||||
together with the header files found at /usr/include/ncursesw/.
|
Use the output of
|
||||||
This can be done with `-I/usr/include/ncursesw' within the
|
|
||||||
CFLAGS and e.g. `-lncursesw' in the LDFLAGS.
|
|
||||||
Use the outout of
|
|
||||||
|
|
||||||
ncursesw5-config --cflags for CFLAGS
|
ncursesw5-config --cflags for CFLAGS
|
||||||
ncursesw5-config --libs for LDFLAGS
|
ncursesw5-config --libs for LDFLAGS
|
||||||
|
|
||||||
For a thread safe version (also known as `reentrant' please
|
to extend the CFLAGS and the LDFLAGS.
|
||||||
|
For a thread safe version (also known as `reentrant') please
|
||||||
use the libraries with ABI 6.0
|
use the libraries with ABI 6.0
|
||||||
|
|
||||||
|
/usr/include/ncurses6/ncurses/*.h
|
||||||
/usr/lib/ncurses6/libncurses.so or /usr/lib64/ncurses6/libncurses.so
|
/usr/lib/ncurses6/libncurses.so or /usr/lib64/ncurses6/libncurses.so
|
||||||
/usr/lib/ncurses6/libform.so or /usr/lib64/ncurses6/libform.so
|
/usr/lib/ncurses6/libform.so or /usr/lib64/ncurses6/libform.so
|
||||||
/usr/lib/ncurses6/libmenu.so or /usr/lib64/ncurses6/libmenu.so
|
/usr/lib/ncurses6/libmenu.so or /usr/lib64/ncurses6/libmenu.so
|
||||||
/usr/lib/ncurses6/libpanel.so or /usr/lib64/ncurses6/libpanel.so
|
/usr/lib/ncurses6/libpanel.so or /usr/lib64/ncurses6/libpanel.so
|
||||||
|
|
||||||
together with the header files found at /usr/include/ncursest/.
|
together with the header files found at /usr/include/ncurses6/ncurses/
|
||||||
This can be done with `-I/usr/include/ncursest' within the
|
e.g. ncurses.h. For backward compatibility with simply older programs
|
||||||
CFLAGS and e.g. `-lncursest' in the LDFLAGS.
|
the headers curses.h, ncurses.h, and term.h will be also found in
|
||||||
Use the outout of
|
/usr/include/ncurses6/. Use the output of
|
||||||
|
|
||||||
ncurses6-config --cflags for CFLAGS
|
ncurses6-config --cflags for CFLAGS
|
||||||
ncurses6-config --libs for LDFLAGS
|
ncurses6-config --libs for LDFLAGS
|
||||||
|
|
||||||
|
to extend the CFLAGS and the LDFLAGS.
|
||||||
For a version with both wide character support and thread safe
|
For a version with both wide character support and thread safe
|
||||||
please use the libraries with ABI 6.0
|
please use the libraries with ABI 6.0
|
||||||
|
|
||||||
|
/usr/include/ncurses6/ncursesw/*.h
|
||||||
/usr/lib/ncurses6/libncursesw.so or /usr/lib64/ncurses6/libncursesw.so
|
/usr/lib/ncurses6/libncursesw.so or /usr/lib64/ncurses6/libncursesw.so
|
||||||
/usr/lib/ncurses6/libformw.so or /usr/lib64/ncurses6/libformw.so
|
/usr/lib/ncurses6/libformw.so or /usr/lib64/ncurses6/libformw.so
|
||||||
/usr/lib/ncurses6/libmenuw.so or /usr/lib64/ncurses6/libmenuw.so
|
/usr/lib/ncurses6/libmenuw.so or /usr/lib64/ncurses6/libmenuw.so
|
||||||
/usr/lib/ncurses6/libpanetw.so or /usr/lib64/ncurses6/libpanelw.so
|
/usr/lib/ncurses6/libpanelw.so or /usr/lib64/ncurses6/libpanelw.so
|
||||||
|
|
||||||
together with the header files found at /usr/include/ncursestw/.
|
Use the output of
|
||||||
This can be done with `-I/usr/include/ncursestw' within the
|
|
||||||
CFLAGS and e.g. `-lncursestw' in the LDFLAGS.
|
|
||||||
Use the outout of
|
|
||||||
|
|
||||||
ncursesw6-config --cflags for CFLAGS
|
ncursesw6-config --cflags for CFLAGS
|
||||||
ncursesw6-config --libs for LDFLAGS
|
ncursesw6-config --libs for LDFLAGS
|
||||||
|
|
||||||
|
to extend the CFLAGS and the LDFLAGS. It should be noted that the ABI 6.0
|
||||||
|
is not only thread safe but also includes extended mouse support and in
|
||||||
|
case of the wide character version also extended color support.
|
||||||
|
@ -4,7 +4,7 @@ libncurses5
|
|||||||
obsoletes "ncurses-<targettype> <= <version>"
|
obsoletes "ncurses-<targettype> <= <version>"
|
||||||
libncurses6
|
libncurses6
|
||||||
targettype x86 provides "baselibs-x86:<prefix>/lib/libncurses.so.6"
|
targettype x86 provides "baselibs-x86:<prefix>/lib/libncurses.so.6"
|
||||||
provides "ncurses-<targettype> = 6.0"
|
provides "libncurses6-<targettype> = 6.0"
|
||||||
ncurses-devel
|
ncurses-devel
|
||||||
requires -ncurses-<targettype>
|
requires -ncurses-<targettype>
|
||||||
requires "libncurses5-<targettype> = <version>"
|
requires "libncurses5-<targettype> = <version>"
|
||||||
|
38
edit.sed
Normal file
38
edit.sed
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
while test "${1::2}" = "--" ; do
|
||||||
|
case "$1" in
|
||||||
|
--cflags=*)
|
||||||
|
cflags="${1#*=}"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--cflags)
|
||||||
|
cflags="$2"
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
--libs=*)
|
||||||
|
libs="${1#*=}"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--libs)
|
||||||
|
libs="$2"
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
sed -ri -e "
|
||||||
|
/^[[:blank:]]*--cflags\)/,/;;/ {
|
||||||
|
/;;/ a\\
|
||||||
|
--cflags)\\
|
||||||
|
echo $cflags\\
|
||||||
|
;;
|
||||||
|
d
|
||||||
|
}
|
||||||
|
/^[[:blank:]]*--libs\)/,/;;/ {
|
||||||
|
/;;/ a\\
|
||||||
|
--libs)\\
|
||||||
|
echo $libs\\
|
||||||
|
;;
|
||||||
|
d
|
||||||
|
}" ${1+"$@"}
|
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Aug 18 16:17:24 CEST 2008 - werner@suse.de
|
||||||
|
|
||||||
|
- Use include directories more restrictive that is
|
||||||
|
* /usr/include/ncurses/*.h for standard version
|
||||||
|
* /usr/include/ncursesw/*.h for wide version
|
||||||
|
* /usr/include/ncurses6/ncurses/*.h for ABI 6.0 standard version
|
||||||
|
* /usr/include/ncurses6/ncursesw/*.h for ABI 6.0 wide version
|
||||||
|
- Make thread support using weak symbols that is be thread safe
|
||||||
|
only for applications using the libpthread.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Aug 14 17:26:53 CEST 2008 - werner@suse.de
|
Thu Aug 14 17:26:53 CEST 2008 - werner@suse.de
|
||||||
|
|
||||||
|
89
ncurses.spec
89
ncurses.spec
@ -27,7 +27,7 @@ License: X11/MIT
|
|||||||
Group: System/Base
|
Group: System/Base
|
||||||
AutoReqProv: on
|
AutoReqProv: on
|
||||||
Version: 5.6
|
Version: 5.6
|
||||||
Release: 85
|
Release: 86
|
||||||
Summary: New curses Libraries
|
Summary: New curses Libraries
|
||||||
Url: http://invisible-island.net/ncurses/ncurses.html
|
Url: http://invisible-island.net/ncurses/ncurses.html
|
||||||
Source0: ncurses-5.6.tar.bz2
|
Source0: ncurses-5.6.tar.bz2
|
||||||
@ -36,6 +36,7 @@ Source2: handle.linux
|
|||||||
Source3: README.devel
|
Source3: README.devel
|
||||||
Source4: ncurses-rpmlintrc
|
Source4: ncurses-rpmlintrc
|
||||||
Source5: tack-1.06.tar.bz2
|
Source5: tack-1.06.tar.bz2
|
||||||
|
Source6: edit.sed
|
||||||
Patch0: ncurses-%{version}.dif
|
Patch0: ncurses-%{version}.dif
|
||||||
Patch1: ncurses-5.3-printw.dif
|
Patch1: ncurses-5.3-printw.dif
|
||||||
Patch2: ncurses-5.6-pthread.dif
|
Patch2: ncurses-5.6-pthread.dif
|
||||||
@ -280,6 +281,12 @@ ln -sf tack-* tack
|
|||||||
fi
|
fi
|
||||||
rm -f ./test64
|
rm -f ./test64
|
||||||
#
|
#
|
||||||
|
# For security of some configure and install scripts
|
||||||
|
#
|
||||||
|
TMPDIR=$(mktemp -d /tmp/ncurses.XXXXXXXX) || exit 1
|
||||||
|
trap 'rm -rf ${TMPDIR}' EXIT
|
||||||
|
export TMPDIR
|
||||||
|
#
|
||||||
# No --enable-tcap-names because we may have to recompile
|
# No --enable-tcap-names because we may have to recompile
|
||||||
# programs or foreign programs won't work
|
# programs or foreign programs won't work
|
||||||
#
|
#
|
||||||
@ -370,7 +377,11 @@ ln -sf tack-* tack
|
|||||||
# Now rebuild libncurses and do the rest of this job
|
# Now rebuild libncurses and do the rest of this job
|
||||||
#
|
#
|
||||||
make
|
make
|
||||||
make install DESTDIR=%{root} includedir=%{_incdir}
|
lib=%{_libdir}
|
||||||
|
inc=%{_incdir}/ncurses
|
||||||
|
make install DESTDIR=%{root} includedir=${inc} libdir=${lib}
|
||||||
|
ln -sf ${inc##*/}/{curses,ncurses,term}.h %{root}${inc%%/*}/
|
||||||
|
sh %{S:6} --cflags "-I${inc}" --libs "-lncurses" %{root}%{_bindir}/ncurses5-config
|
||||||
#
|
#
|
||||||
# Check for tack program on base of above ncurses
|
# Check for tack program on base of above ncurses
|
||||||
#
|
#
|
||||||
@ -387,18 +398,12 @@ ln -sf tack-* tack
|
|||||||
# Now use --with-pthread for reentrant pthread support (abi > 5).
|
# Now use --with-pthread for reentrant pthread support (abi > 5).
|
||||||
#
|
#
|
||||||
eval ./${c#*./} --with-pthread --enable-ext-mouse --disable-widec --disable-ext-colors --without-progs
|
eval ./${c#*./} --with-pthread --enable-ext-mouse --disable-widec --disable-ext-colors --without-progs
|
||||||
inc=%{_incdir}/ncurses6
|
make
|
||||||
lib=%{_libdir}/ncurses6
|
lib=%{_libdir}/ncurses6
|
||||||
make && make install.libs install.includes DESTDIR=%{root} includedir=${inc} libdir=${lib}
|
inc=%{_incdir}/ncurses6/ncurses
|
||||||
for h in %{root}${inc}/*.h ; do
|
make install.libs install.includes DESTDIR=%{root} includedir=${inc} libdir=${lib}
|
||||||
test -e "$h" || continue
|
ln -sf ${inc##*/}/{curses,ncurses,term}.h %{root}${inc%%/*}/
|
||||||
h=${h##*/}
|
sh %{S:6} --cflags "-I${inc%%/*} -I${inc}" --libs "-L${lib} -lncurses" %{root}%{_bindir}/ncurses6-config
|
||||||
for t in %{root}${inc}/*.h ; do
|
|
||||||
test -e "$t" || continue
|
|
||||||
test ! -L $t || continue
|
|
||||||
sed -ri "s;(#include[[:blank:]]+<)(${h}>);\1${inc##*/}/\2;" $t
|
|
||||||
done
|
|
||||||
done
|
|
||||||
%endif
|
%endif
|
||||||
#
|
#
|
||||||
# Now use --enable-widec for UTF8/wide character support.
|
# Now use --enable-widec for UTF8/wide character support.
|
||||||
@ -410,33 +415,21 @@ ln -sf tack-* tack
|
|||||||
%else
|
%else
|
||||||
eval ./${c#*./} --disable-ext-mouse --enable-widec --disable-ext-colors --without-progs
|
eval ./${c#*./} --disable-ext-mouse --enable-widec --disable-ext-colors --without-progs
|
||||||
%endif
|
%endif
|
||||||
make && make install.libs install.includes DESTDIR=%{root} includedir=%{_incdir}/ncursesw
|
make
|
||||||
for h in %{root}%{_incdir}/ncursesw/*.h ; do
|
lib=%{_libdir}
|
||||||
test -e "$h" || continue
|
inc=%{_incdir}/ncursesw
|
||||||
h=${h##*/}
|
make install.libs install.includes DESTDIR=%{root} includedir=${inc} libdir=${lib}
|
||||||
for t in %{root}%{_incdir}/ncursesw/*.h ; do
|
sh %{S:6} --cflags "-I${inc}" --libs "-lncursesw" %{root}%{_bindir}/ncursesw5-config
|
||||||
test -e "$t" || continue
|
|
||||||
test ! -L $t || continue
|
|
||||||
sed -ri "s;(#include[[:blank:]]+<)(${h}>);\1ncursesw/\2;" $t
|
|
||||||
done
|
|
||||||
done
|
|
||||||
%if %abi < 6
|
%if %abi < 6
|
||||||
#
|
#
|
||||||
# Do both --enable-widec and --with-pthread (abi > 5).
|
# Do both --enable-widec and --with-pthread (abi > 5).
|
||||||
#
|
#
|
||||||
eval ./${c#*./} --with-pthread --enable-ext-mouse --enable-widec --enable-ext-colors --without-progs
|
eval ./${c#*./} --with-pthread --enable-ext-mouse --enable-widec --enable-ext-colors --without-progs
|
||||||
inc=%{_incdir}/ncursesw6
|
make
|
||||||
lib=%{_libdir}/ncurses6
|
lib=%{_libdir}/ncurses6
|
||||||
make && make install.libs install.includes DESTDIR=%{root} includedir=${inc} libdir=${lib}
|
inc=%{_incdir}/ncurses6/ncursesw
|
||||||
for h in %{root}${inc}/*.h ; do
|
make install.libs install.includes DESTDIR=%{root} includedir=${inc} libdir=${lib}
|
||||||
test -e "$h" || continue
|
sh %{S:6} --cflags "-I${inc%%/*} -I${inc}" --libs "-L${lib} -lncursesw" %{root}%{_bindir}/ncursesw6-config
|
||||||
h=${h##*/}
|
|
||||||
for t in %{root}${inc}/*.h ; do
|
|
||||||
test -e "$t" || continue
|
|
||||||
test ! -L $t || continue
|
|
||||||
sed -ri "s;(#include[[:blank:]]+<)(${h}>);\1${inc##*/}/\2;" $t
|
|
||||||
done
|
|
||||||
done
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -457,7 +450,7 @@ ln -sf tack-* tack
|
|||||||
done
|
done
|
||||||
chmod 0755 %{buildroot}/%{_lib}/lib*.so.*
|
chmod 0755 %{buildroot}/%{_lib}/lib*.so.*
|
||||||
chmod 0755 %{buildroot}/%{_libdir}/lib*.so.*
|
chmod 0755 %{buildroot}/%{_libdir}/lib*.so.*
|
||||||
chmod a-x %{buildroot}/%{_libdir}/lib*.a
|
chmod a-x %{buildroot}/%{_libdir}/lib*.a
|
||||||
if test -d %{buildroot}%{_libdir}/ncurses6 ; then
|
if test -d %{buildroot}%{_libdir}/ncurses6 ; then
|
||||||
mv %{buildroot}%{_libdir}/ncurses6/*.so.6* %{buildroot}/%{_libdir}/
|
mv %{buildroot}%{_libdir}/ncurses6/*.so.6* %{buildroot}/%{_libdir}/
|
||||||
for lib in %{buildroot}%{_libdir}/ncurses6/*.so
|
for lib in %{buildroot}%{_libdir}/ncurses6/*.so
|
||||||
@ -480,13 +473,7 @@ ln -sf tack-* tack
|
|||||||
done
|
done
|
||||||
chmod 0755 %{buildroot}/%{_lib}/lib*.so.6*
|
chmod 0755 %{buildroot}/%{_lib}/lib*.so.6*
|
||||||
chmod 0755 %{buildroot}/%{_libdir}/lib*.so.6*
|
chmod 0755 %{buildroot}/%{_libdir}/lib*.so.6*
|
||||||
chmod a-x %{buildroot}/%{_libdir}/ncurses6/lib*.a
|
chmod a-x %{buildroot}/%{_libdir}/ncurses6/lib*.a
|
||||||
sed -ri -e 's|(THIS=).*|\1"ncurses6"|' \
|
|
||||||
-e 's|(-L.*/lib)|\1/ncurses6|' \
|
|
||||||
-e 's|-l\$\{THIS\}|-l\$\{THIS%%6\}|' %{buildroot}%{_bindir}/ncurses6-config
|
|
||||||
sed -ri -e 's|(THIS=).*|\1"ncursesw6"|' \
|
|
||||||
-e 's|(-L.*/lib)|\1/ncurses6|' \
|
|
||||||
-e 's|-l\$\{THIS\}|-l\$\{THIS%%6\}|' %{buildroot}%{_bindir}/ncursesw6-config
|
|
||||||
fi
|
fi
|
||||||
test -n "%{buildroot}" || ldconfig -N
|
test -n "%{buildroot}" || ldconfig -N
|
||||||
mkdir -p %{buildroot}%{_defaultdocdir}/ncurses
|
mkdir -p %{buildroot}%{_defaultdocdir}/ncurses
|
||||||
@ -562,9 +549,7 @@ ln -sf tack-* tack
|
|||||||
grep -v -F -x -f default.list \
|
grep -v -F -x -f default.list \
|
||||||
> extension.list
|
> extension.list
|
||||||
rm -f %{buildroot}%{_prefix}/lib/terminfo
|
rm -f %{buildroot}%{_prefix}/lib/terminfo
|
||||||
mkdir -p %{buildroot}%{_incdir}/ncurses
|
%if %abi < 6
|
||||||
ln -sf ../ncurses.h %{buildroot}%{_incdir}/ncurses/
|
|
||||||
%if %abi == 5
|
|
||||||
|
|
||||||
%post -n libncurses5 -p /sbin/ldconfig
|
%post -n libncurses5 -p /sbin/ldconfig
|
||||||
|
|
||||||
@ -621,10 +606,12 @@ ln -sf tack-* tack
|
|||||||
%dir %{_incdir}/ncurses/
|
%dir %{_incdir}/ncurses/
|
||||||
%dir %{_incdir}/ncursesw/
|
%dir %{_incdir}/ncursesw/
|
||||||
%dir %{_incdir}/ncurses6/
|
%dir %{_incdir}/ncurses6/
|
||||||
%dir %{_incdir}/ncursesw6/
|
%dir %{_incdir}/ncurses6/ncurses/
|
||||||
%dir %{_libdir}/ncurses6/
|
%dir %{_incdir}/ncurses6/ncursesw/
|
||||||
%{_incdir}/*.h
|
%{_incdir}/*.h
|
||||||
%{_incdir}/ncurses*/*.h
|
%{_incdir}/ncurses*/*.h
|
||||||
|
%{_incdir}/ncurses*/*/*.h
|
||||||
|
%dir %{_libdir}/ncurses6/
|
||||||
%{_libdir}/lib*.a
|
%{_libdir}/lib*.a
|
||||||
%{_libdir}/lib*.so
|
%{_libdir}/lib*.so
|
||||||
%{_libdir}/ncurses6/lib*.a
|
%{_libdir}/ncurses6/lib*.a
|
||||||
@ -645,6 +632,14 @@ ln -sf tack-* tack
|
|||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Aug 18 2008 werner@suse.de
|
||||||
|
- Use include directories more restrictive that is
|
||||||
|
* /usr/include/ncurses/*.h for standard version
|
||||||
|
* /usr/include/ncursesw/*.h for wide version
|
||||||
|
* /usr/include/ncurses6/ncurses/*.h for ABI 6.0 standard version
|
||||||
|
* /usr/include/ncurses6/ncursesw/*.h for ABI 6.0 wide version
|
||||||
|
- Make thread support using weak symbols that is be thread safe
|
||||||
|
only for applications using the libpthread.
|
||||||
* Thu Aug 14 2008 werner@suse.de
|
* Thu Aug 14 2008 werner@suse.de
|
||||||
- Update to test version 5.6.20080804
|
- Update to test version 5.6.20080804
|
||||||
* fix memory leaks in test/demo_menus
|
* fix memory leaks in test/demo_menus
|
||||||
|
Loading…
Reference in New Issue
Block a user