cbb1d7ec37
--with-pic alone doesn't generate PIC code in newer ncurses (6.6+). The static archive produced non-PIC objects using R_X86_64_PC32 relocations, which can't be linked into PIE executables. Forced PIC via: - Switched DYNAMIC_INIT → DYNAMIC_STATIC_INIT (builds both shared AND static) - Added CFLAGS+=+=-fPIC CXXFLAGS+=+=-fPIC export (forces PIC at compile) redbear-netctl-console now links successfully against libncursesw.a.
38 lines
782 B
TOML
38 lines
782 B
TOML
[source]
|
|
tar = "https://ftp.gnu.org/gnu/ncurses/ncurses-6.6.tar.gz"
|
|
blake3 = "fbec55697a01f99b9cc3f25be55e73ae7091f4c53e5d81a1ea15734c4e5b7238"
|
|
patches = [
|
|
"redox.patch"
|
|
]
|
|
|
|
[build]
|
|
template = "custom"
|
|
script = """
|
|
DYNAMIC_STATIC_INIT
|
|
COOKBOOK_CONFIGURE_FLAGS+=(
|
|
--disable-db-install
|
|
--disable-stripping
|
|
--disable-widec
|
|
--enable-pc-files
|
|
--with-pic
|
|
--without-ada
|
|
--without-manpages
|
|
--without-tests
|
|
--with-terminfo-dirs=/usr/share/terminfo
|
|
--with-pkg-config-libdir=/usr/lib/pkgconfig
|
|
cf_cv_func_mkstemp=yes
|
|
)
|
|
if [ "${COOKBOOK_DYNAMIC}" == "1" ]
|
|
then
|
|
COOKBOOK_CONFIGURE_FLAGS+=(--with-shared)
|
|
fi
|
|
export CFLAGS="${CFLAGS} -fPIC"
|
|
export CXXFLAGS="${CXXFLAGS} -fPIC"
|
|
cookbook_configure
|
|
"""
|
|
|
|
[package]
|
|
dependencies = [
|
|
"terminfo",
|
|
]
|