rebuilt with --with-versioned-syms and .so files modified so that widec library is always linked [release 6.3-2mamba;Sat Feb 12 2022]

This commit is contained in:
Silvan Calarco 2024-01-06 07:33:59 +01:00
parent f0c75494bc
commit 7109c50eb9
3 changed files with 131 additions and 31 deletions

58
ncurses-6.3-libs.patch Normal file
View File

@ -0,0 +1,58 @@
diff -ruN a/c++/Makefile.in b/c++/Makefile.in
--- a/c++/Makefile.in 2021-07-03 20:53:57.000000000 +0200
+++ b/c++/Makefile.in 2021-11-03 10:58:04.147647447 +0100
@@ -118,7 +118,7 @@
-l@FORM_NAME@@USE_LIB_SUFFIX@ \
-l@MENU_NAME@@USE_LIB_SUFFIX@ \
-l@PANEL_NAME@@USE_LIB_SUFFIX@ \
- -lncurses@USE_LIB_SUFFIX@ @SHLIB_LIST@
+ -lncurses@USE_LIB_SUFFIX@
LIBROOT = ncurses++
@@ -157,8 +157,7 @@
LDFLAGS_DEFAULT = $(LINK_@DFT_UPR_MODEL@) $(LDFLAGS_@DFT_UPR_MODEL@)
# flags for library built by this makefile
-LDFLAGS = $(TEST_ARGS) @LDFLAGS@ \
- @LD_MODEL@ $(TEST_LIBS) @LIBS@ $(CXXLIBS)
+LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@ $(CXXLIBS)
AUTO_SRC = \
etip.h
diff -ruN a/form/Makefile.in b/form/Makefile.in
--- a/form/Makefile.in 2021-07-03 17:45:33.000000000 +0200
+++ b/form/Makefile.in 2021-11-03 10:58:45.301114373 +0100
@@ -110,7 +110,7 @@
LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@
SHLIB_DIRS = -L../lib
-SHLIB_LIST = $(SHLIB_DIRS) -lncurses@USE_LIB_SUFFIX@ @SHLIB_LIST@
+SHLIB_LIST = $(SHLIB_DIRS) -lncurses@USE_LIB_SUFFIX@
RPATH_LIST = @RPATH_LIST@
RESULTING_SYMS = @RESULTING_SYMS@
diff -ruN a/menu/Makefile.in b/menu/Makefile.in
--- a/menu/Makefile.in 2021-07-03 17:45:33.000000000 +0200
+++ b/menu/Makefile.in 2021-11-03 10:58:59.461160284 +0100
@@ -110,7 +110,7 @@
LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@
SHLIB_DIRS = -L../lib
-SHLIB_LIST = $(SHLIB_DIRS) -lncurses@USE_LIB_SUFFIX@ @SHLIB_LIST@
+SHLIB_LIST = $(SHLIB_DIRS) -lncurses@USE_LIB_SUFFIX@
RPATH_LIST = @RPATH_LIST@
RESULTING_SYMS = @RESULTING_SYMS@
diff -ruN a/panel/Makefile.in b/panel/Makefile.in
--- a/panel/Makefile.in 2021-07-03 17:45:33.000000000 +0200
+++ b/panel/Makefile.in 2021-11-03 10:59:33.957938691 +0100
@@ -112,7 +112,7 @@
LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@
SHLIB_DIRS = -L../lib
-SHLIB_LIST = $(SHLIB_DIRS) -lncurses@USE_LIB_SUFFIX@ @SHLIB_LIST@
+SHLIB_LIST = $(SHLIB_DIRS) -lncurses@USE_LIB_SUFFIX@
RPATH_LIST = @RPATH_LIST@
RESULTING_SYMS = @RESULTING_SYMS@

View File

@ -0,0 +1,24 @@
diff -ruN a/misc/gen-pkgconfig.in b/misc/gen-pkgconfig.in
--- a/misc/gen-pkgconfig.in 2021-08-07 23:36:33.000000000 +0200
+++ b/misc/gen-pkgconfig.in 2021-11-03 11:12:51.127160950 +0100
@@ -83,7 +83,7 @@
fi
lib_flags=
-for opt in -L$libdir @EXTRA_PKG_LDFLAGS@ @LIBS@
+for opt in -L$libdir @LIBS@
do
case $opt in
-l*) # LIBS is handled specially below
diff -ruN a/misc/ncurses-config.in b/misc/ncurses-config.in
--- a/misc/ncurses-config.in 2021-08-07 23:36:14.000000000 +0200
+++ b/misc/ncurses-config.in 2021-11-03 11:26:12.393533954 +0100
@@ -101,7 +101,7 @@
# There is no portable way to find the list of standard library directories.
# Require a POSIX shell anyway, to keep this simple.
lib_flags=
-for opt in -L$libdir @EXTRA_PKG_LDFLAGS@ $LIBS
+for opt in -L$libdir $LIBS
do
case $opt in
-specs*) # ignore linker specs-files which were used to build library

View File

@ -1,21 +1,16 @@
%define major %(echo %version | cut -d. -f 1)
%define majver %(echo %version | cut -d. -f 1-2)
%define patchver %(echo %version | cut -d. -f 3)
%define tack_ver 1.07
%define majver %(echo %version | cut -d. -f 1)
Name: ncurses
Version: 6.3
Release: 1mamba
Release: 2mamba
Summary: A CRT screen handling and optimization package
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://directory.fsf.org/wiki/GNU/ncurses
Source0: https://invisible-mirror.net/archives/ncurses/ncurses-%{majver}.tar.gz
#Source0: http://ftp.gnu.org/pub/gnu/ncurses/ncurses-%{majver}.tar.gz
%if "%{?patchver}" != ""
#Source99: ftp://dickey.his.com/ncurses/%{majver}/ncurses-%{majver}-%{patchver}.patch.gz
%endif
URL: https://invisible-island.net/ncurses/ncurses.html
Source0: https://invisible-mirror.net/archives/ncurses/ncurses-%{version}.tar.gz
Patch0: ncurses-6.3-libs.patch
Patch1: ncurses-6.3-pkgconfig.patch
License: MIT
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
@ -25,7 +20,7 @@ BuildRequires: emacs >= 21.3
BuildRequires: libgpm-devel >= 1.20.1
BuildRequires: sharutils >= 4.2.1
%endif
Requires: libncurses = %{version}-%{release}
Requires: libncurses = %{?epoch:%epoch:}%{version}-%{release}
%description
The curses library routines are a terminal-independent method of updating character screens with reasonalble optimization. The ncurses (new curses) library is a freely distributable replacement for the discontinued 4.4BSD classic curses library.
@ -33,7 +28,7 @@ The curses library routines are a terminal-independent method of updating charac
%package terminfo
Summary: Extra terminal information files
Group: System/Libraries
Requires: libncurses = %{version}-%{release}
Requires: libncurses = %{?epoch:%epoch:}%{version}-%{release}
Provides: ncurses-terminfo-extras
Obsoletes: ncurses-terminfo-extras < 6.3
@ -44,10 +39,12 @@ Extra terminal information files.
Summary: The development files for applications which use ncurses
Group: System/Libraries
Requires: ncurses-terminfo
%ifarch x86_64
%ifarch x86_64 aarch64
Provides: libtinfo.so.6()(64bit)
Provides: libtinfo.so.6(NCURSES6_TINFO_5.0.19991023)(64bit)
%else
Provides: libtinfo.so.6
Provides: libtinfo.so.6(NCURSES6_TINFO_5.0.19991023)
%endif
%description -n libncurses
@ -55,7 +52,7 @@ The curses library routines are a terminal-independent method of updating charac
%package -n libncurses-devel
Summary: The development files for applications which use ncurses
Group: Development/Libraries
Group: Demore cvelopment/Libraries
Requires: libncurses = %{version}-%{release}
%description -n libncurses-devel
@ -64,16 +61,14 @@ The header files and libraries for developing applications that use the ncurses
%debug_package
%prep
%setup -q -n %{name}-%{majver}
#-D -T
#:<< _EOF
%setup -q
%if "%{?patchver}" != ""
#gunzip -c %{SOURCE99} | patch -p1
%endif
# Do not link against test libraries
%patch0 -p1 -b .libs
# Do not leak build-time LDFLAGS into the pkgconfig files
%patch1 -p1 -b .pkgconfig
%build
#:<< _EOF
mkdir narrowc widec
cd narrowc
ln -s ../configure .
@ -90,6 +85,7 @@ ln -s ../configure .
--enable-getcap \
--enable-pc-files \
--with-ticlib \
--with-versioned-syms \
%if "%{stage1}" == "1"
CPPFLAGS="-ldl"
%endif
@ -100,12 +96,12 @@ ln -s ../configure .
cd ../widec
ln -s ../configure .
%configure \
--enable-widec \
--with-pkg-config-libdir=%{_libdir}/pkgconfig \
--with-install-prefix=%{buildroot} \
--with-normal \
--with-shared \
--with-gpm \
--enable-widec \
--with-build-cc="%{_build}-gcc -D_GNU_SOURCE" \
--without-debug \
--without-profile \
@ -113,6 +109,7 @@ ln -s ../configure .
--enable-getcap \
--enable-pc-files \
--with-ticlib \
--with-versioned-syms \
%if "%{stage1}" == "1"
CPPFLAGS="-ldl"
%endif
@ -152,14 +149,32 @@ ln -sf ../l/linux %{buildroot}%{_datadir}/terminfo/c/console
#ln -sf /%{_lib}/libncursesw.so.5 %{buildroot}%{_libdir}/libncursesw.so
#ln -sf /%{_lib}/libncursesw.so.5 %{buildroot}%{_libdir}/libcursesw.so
ln -sf libncurses.a %{buildroot}%{_libdir}/libcurses.a
ln -sf libncursesw.a %{buildroot}%{_libdir}/libcurses.a
ln -sf libncursesw.a %{buildroot}%{_libdir}/libcursesw.a
ln -sf libncurses.so.6 %{buildroot}%{_libdir}/libtinfo.so.6
ln -sf libncurses.so.6 %{buildroot}%{_libdir}/libtinfo.so
# From Arch Linux:
# fool packages looking to link to non-wide-character ncurses libraries
for lib in ncurses ncurses++ form panel menu; do
rm -f %{buildroot}%{_libdir}/lib${lib}.so
printf "INPUT(-l%sw)\n" "${lib}" > %{buildroot}%{_libdir}/lib${lib}.so
ln -sfv ${lib}w.pc %{buildroot}%{_libdir}/pkgconfig/${lib}.pc
done
# fix strange permissions
chmod 755 %{buildroot}/%{_libdir}/*.so.*
# some packages look for -lcurses during build
printf 'INPUT(-lncursesw)\n' > %{buildroot}%{_libdir}/libcursesw.so
ln -sfv libncurses.so %{buildroot}%{_libdir}/libcurses.so
# tic and ticinfo functionality is built in by default
# make sure that anything linking against it links against libncursesw.so instead
for lib in tic tinfo; do
rm -f %{buildroot}%{_libdir}/lib${lib}.so
printf "INPUT(libncursesw.so.%s)\n" "%{majver}" > %{buildroot}%{_libdir}/lib${lib}.so
ln -sfv libncursesw.so.%{majver} %{buildroot}%{_libdir}/lib${lib}.so.%{majver}
ln -sfv ncursesw.pc %{buildroot}%{_libdir}/pkgconfig/${lib}.pc
done
## fix strange permissions
#chmod 755 %{buildroot}/%{_libdir}/*.so.*
#DEFAULT_TERMINFOS="\
#ansi ansi-m console dumb color_xterm linux pcansi-m screen vt52 vt100 vt102 vt220 \
@ -226,8 +241,8 @@ fi
%files -n libncurses-devel
%defattr(-,root,root)
%{_bindir}/ncurses%{major}-config
%{_bindir}/ncursesw%{major}-config
%{_bindir}/ncurses%{majver}-config
%{_bindir}/ncursesw%{majver}-config
%{_datadir}/tabset/*
%{_includedir}/*
%{_libdir}/lib*.so
@ -244,7 +259,7 @@ fi
%{_libdir}/pkgconfig/panelw.pc
%{_libdir}/pkgconfig/tic.pc
%{_libdir}/pkgconfig/ticw.pc
#%{_libdir}/pkgconfig/tinfo.pc
%{_libdir}/pkgconfig/tinfo.pc
%{_mandir}/man3/*
%doc doc/html/hackguide.html
%doc doc/html/ncurses-intro.html
@ -257,6 +272,9 @@ fi
%{_datadir}/terminfo/*
%changelog
* Sat Feb 12 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 6.3-2mamba
- rebuilt with --with-versioned-syms and .so files modified so that widec library is always linked
* Sun Oct 31 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 6.3-1mamba
- update to 6.3.20211021