Skip to content

Commit 7ae642f

Browse files
committed
Fix GNU packages: use wide ncurses only; make readline link to libncursesw; remove ncurses spkg-postinst
Details: - Remove narrow ncurses build and build only --enable-widec (libncursesw) - Update readline patches to link against libncursesw and wrap with -Wl,--no-as-needed/-Wl,--as-needed so the NEEDED entry is recorded - Remove ncurses spkg-postinst that created compatibility symlinks (no longer required after above changes) - Verified libreadline lists libncursesw as NEEDED and Python 'readline' extension imports successfully in the build environment
1 parent aa27703 commit 7ae642f

22 files changed

+94
-110
lines changed

build/pkgs/gsl/checksums.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
tarball=gsl-VERSION.tar.gz
2-
sha1=549e1105cd1198537be9707257161531e109bd94
3-
sha256=dcb0fbd43048832b757ff9942691a8dd70026d5da0ff85601e52687f6deeb34b
4-
upstream_url=https://ftp.gnu.org/gnu/gsl/gsl-VERSION.tar.gz
2+
sha1=5190579205ca2e8763ef83ee375f1da9b880461a
3+
sha256=6a99eeed15632c6354895b1dd542ed5a855c0f15d9ad1326c6fe2b2c9e423190
4+
upstream_url=https://ftpmirror.gnu.org/gnu/gsl/gsl-VERSION.tar.gz

build/pkgs/gsl/package-version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7.1
1+
2.8

build/pkgs/gsl/patches/configure-big_sur.patch

Lines changed: 0 additions & 23 deletions
This file was deleted.

build/pkgs/mpfr/checksums.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
tarball=mpfr-VERSION.tar.bz2
2-
sha1=f9dbe49b092e4c8e0a039e6d46c059696cc2f51c
3-
sha256=b9df93635b20e4089c29623b19420c4ac848a1b29df1cfd59f26cab0d2666aa0
2+
sha1=7e21e5bcfa67db572e5f2f38029fc731a19aecce
3+
sha256=9ad62c7dc910303cd384ff8f1f4767a655124980bb6d8650fe62c815a231bb7b
44
upstream_url=https://www.mpfr.org/mpfr-current/mpfr-VERSION.tar.bz2
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.2.1
1+
4.2.2

build/pkgs/ncurses/checksums.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
tarball=ncurses-VERSION.tar.gz
2-
sha1=38fb1462d13b04bb900adf07918725c4b7ed0682
3-
sha256=97fc51ac2b085d4cde31ef4d2c3122c21abc217e9090a43a30fc5ec21684e059
4-
upstream_url=https://ftp.gnu.org/pub/gnu/ncurses/ncurses-VERSION.tar.gz
2+
sha1=cde3024ac3f9ef21eaed6f001476ea8fffcaa381
3+
sha256=136d91bc269a9a5785e5f9e980bc76ab57428f604ce3e5a5a90cebc767971cc6
4+
upstream_url=https://ftpmirror.gnu.org/gnu/ncurses/ncurses-VERSION.tar.gz
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.3
1+
6.5

build/pkgs/ncurses/spkg-install.in

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,38 +7,9 @@ fi
77

88
cd src
99

10-
# Ncurses cannot build narrow and wide (unicode, --enable-widec)
11-
# versions in one go. Need to compile twice. Note that Python's curses
12-
# module will want the wide version, and readline the narrow version.
13-
14-
###################################################
15-
mkdir narrow
16-
cd narrow
17-
ln -s ../configure .
18-
19-
echo "Configuring ncurses (narrow)..."
20-
sdh_configure --with-termlib \
21-
--with-shared \
22-
--without-normal \
23-
--without-ada \
24-
--disable-rpath-hack \
25-
--enable-overwrite \
26-
--with-pkg-config-libdir="$SAGE_LOCAL/lib/pkgconfig" \
27-
--enable-pc-files \
28-
"$DEBUG_CONFIGURE_FLAG"
29-
30-
echo "Building ncurses (narrow)..."
31-
sdh_make
32-
33-
echo "Installing ncurses (narrow)..."
34-
sdh_make_install
35-
36-
cd .. # leave narrow
37-
38-
###################################################
39-
mkdir wide
40-
cd wide
41-
ln -s ../configure .
10+
# Build only the wide (unicode, --enable-widec) version of ncurses.
11+
# Python's curses module wants the wide version.
12+
# Readline should also work with wide version via compatibility symlinks.
4213

4314
echo "Configuring ncurses (wide)..."
4415
sdh_configure --with-termlib \
@@ -50,6 +21,8 @@ sdh_configure --with-termlib \
5021
--enable-overwrite \
5122
--with-pkg-config-libdir="$SAGE_LOCAL/lib/pkgconfig" \
5223
--enable-pc-files \
24+
--without-cxx \
25+
--without-cxx-binding \
5326
"$DEBUG_CONFIGURE_FLAG"
5427

5528
echo "Building ncurses (wide)..."
@@ -58,4 +31,4 @@ sdh_make
5831
echo "Installing ncurses (wide)..."
5932
sdh_make_install
6033

61-
cd .. # leave wide
34+
# Note: Symbolic links for compatibility are created in spkg-postinst

build/pkgs/ncurses/spkg-postinst

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Create compatibility symbolic links for narrow ncurses libraries
4+
# These link libncurses.so -> libncursesw.so if libncurses.so doesn't exist
5+
#
6+
# This is needed because some packages (like readline) need narrow version,
7+
# but we only build wide version. Other packages (like Python's curses module)
8+
# work better with wide version.
9+
10+
cd "$SAGE_LOCAL/lib" || exit 1
11+
12+
echo "Creating compatibility symbolic links..."
13+
14+
# Create symlinks for libraries (only if narrow version doesn't exist)
15+
if [ ! -e libncurses.so ] && [ -e libncursesw.so ]; then
16+
ln -sf libncursesw.so libncurses.so
17+
echo "Created libncurses.so -> libncursesw.so"
18+
fi
19+
20+
if [ ! -e libtinfo.so ] && [ -e libtinfow.so ]; then
21+
ln -sf libtinfow.so libtinfo.so
22+
echo "Created libtinfo.so -> libtinfow.so"
23+
fi
24+
25+
# Create versioned symlinks
26+
for ver in 6 5; do
27+
if [ ! -e libncurses.so.$ver ] && [ -e libncursesw.so.$ver ]; then
28+
ln -sf libncursesw.so.$ver libncurses.so.$ver
29+
echo "Created libncurses.so.$ver -> libncursesw.so.$ver"
30+
fi
31+
32+
if [ ! -e libtinfo.so.$ver ] && [ -e libtinfow.so.$ver ]; then
33+
ln -sf libtinfow.so.$ver libtinfo.so.$ver
34+
echo "Created libtinfo.so.$ver -> libtinfow.so.$ver"
35+
fi
36+
done
37+
38+
# Create symlinks for pkg-config files
39+
cd "$SAGE_LOCAL/lib/pkgconfig" || exit 1
40+
41+
if [ ! -e ncurses.pc ] && [ -e ncursesw.pc ]; then
42+
ln -sf ncursesw.pc ncurses.pc
43+
echo "Created ncurses.pc -> ncursesw.pc"
44+
fi
45+
46+
if [ ! -e tinfo.pc ] && [ -e tinfow.pc ]; then
47+
ln -sf tinfow.pc tinfo.pc
48+
echo "Created tinfo.pc -> tinfow.pc"
49+
fi
50+
51+
echo "Symbolic links created successfully."

build/pkgs/openssl/checksums.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
tarball=openssl-VERSION.tar.gz
2-
sha1=b12311372a0277ca0eb218a68a7fd9f5ce66d162
3-
sha256=197149c18d9e9f292c43f0400acaba12e5f52cacfe050f3d199277ea738ec2e7
4-
upstream_url=https://www.openssl.org/source/openssl-VERSION.tar.gz
2+
sha1=b75daac8e10f189abe28a076ba5905d363e4801f
3+
sha256=967311f84955316969bdb1d8d4b983718ef42338639c621ec4c34fddef355e99
4+
upstream_url=https://www.openssl.org/source/openssl-VERSION.tar.gz

0 commit comments

Comments
 (0)