summaryrefslogtreecommitdiff
path: root/scripts/build/companion_libs/220-ncurses.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build/companion_libs/220-ncurses.sh')
-rw-r--r--scripts/build/companion_libs/220-ncurses.sh52
1 files changed, 17 insertions, 35 deletions
diff --git a/scripts/build/companion_libs/220-ncurses.sh b/scripts/build/companion_libs/220-ncurses.sh
index 573523b..f1fcd1a 100644
--- a/scripts/build/companion_libs/220-ncurses.sh
+++ b/scripts/build/companion_libs/220-ncurses.sh
@@ -9,15 +9,11 @@ do_ncurses_for_target() { :; }
if [ "${CT_NCURSES_TARGET}" = "y" -o "${CT_NCURSES}" = "y" ]; then
do_ncurses_get() {
- CT_GetFile "ncurses-${CT_NCURSES_VERSION}" .tar.gz \
- {http,ftp,https}://ftp.gnu.org/pub/gnu/ncurses \
- ftp://invisible-island.net/ncurses
+ CT_Fetch NCURSES
}
do_ncurses_extract() {
- CT_Extract "ncurses-${CT_NCURSES_VERSION}"
- CT_DoExecLog ALL chmod -R u+w "${CT_SRC_DIR}/ncurses-${CT_NCURSES_VERSION}"
- CT_Patch "ncurses" "${CT_NCURSES_VERSION}"
+ CT_ExtractPatch NCURSES
}
# We need tic that runs on the build when building ncurses for host/target
@@ -31,26 +27,13 @@ do_ncurses_for_build() {
"--without-tests" \
"--without-cxx" \
"--without-cxx-binding" \
- "--without-ada")
- # If we are not canadian, this is also our host curses
- # Unlike other companion libs, we skip host build if build==host
- # (i.e. in simple cross or native): ncurses may not be needed for
- # host, but we still need them on build to produce 'tic'.
- case "${CT_TOOLCHAIN_TYPE}" in
- native|cross)
- if [ "${CT_NCURSES_HOST_DISABLE_DB}" = "y" ]; then
- opts+=( "--disable-database" )
- fi
- if [ -n "${CT_NCURSES_HOST_FALLBACKS}" ]; then
- opts+=( "--with-fallbacks=${CT_NCURSES_HOST_FALLBACKS}" )
- fi
- opts+=( "${CT_NCURSES_HOST_CONFIG_ARGS[@]}" )
- ;;
- esac
+ "--without-ada" \
+ "--without-fallbacks" )
do_ncurses_backend host="${CT_BUILD}" \
destdir="${CT_BUILDTOOLS_PREFIX_DIR}" \
cflags="${CT_CFLAGS_FOR_BUILD}" \
ldflags="${CT_LDFLAGS_FOR_BUILD}" \
+ install_target=install.progs \
"${opts[@]}"
CT_Popd
CT_EndStep
@@ -60,13 +43,6 @@ if [ "${CT_NCURSES}" = "y" ]; then
do_ncurses_for_host() {
local -a opts
- # Unlike other companion libs, we skip host build if build==host
- # (i.e. in simple cross or native): ncurses may not be needed for
- # host, but we still need them on build to produce 'tic'.
- case "${CT_TOOLCHAIN_TYPE}" in
- native|cross) return 0;;
- esac
-
CT_DoStep INFO "Installing ncurses for host"
CT_mkdir_pushd "${CT_BUILD_DIR}/build-ncurses-host-${CT_HOST}"
opts=("--enable-symlinks" \
@@ -76,7 +52,8 @@ do_ncurses_for_host() {
"--without-cxx-binding" \
"--without-ada" )
if [ "${CT_NCURSES_HOST_DISABLE_DB}" = "y" ]; then
- opts+=( "--disable-database" )
+ opts+=( "--disable-database" \
+ "--disable-db-install" )
fi
if [ -n "${CT_NCURSES_HOST_FALLBACKS}" ]; then
opts+=( "--with-fallbacks=${CT_NCURSES_HOST_FALLBACKS}" )
@@ -120,6 +97,7 @@ do_ncurses_for_target() {
prefix="${prefix}" \
destdir="${CT_SYSROOT_DIR}" \
shared="${CT_SHARED_LIBS}" \
+ cflags="${CT_ALL_TARGET_CFLAGS}" \
"${opts[@]}"
CT_Popd
CT_EndStep
@@ -142,12 +120,12 @@ do_ncurses_backend() {
local ldflags
local shared
local arg
- local for_target
+ local install_target=install
for arg in "$@"; do
case "$arg" in
--*)
- ncurses_opts+=("$arg")
+ ncurses_opts+=("${arg}")
;;
*)
eval "${arg// /\\ }"
@@ -177,7 +155,7 @@ do_ncurses_backend() {
CFLAGS="${cflags}" \
LDFLAGS="${ldflags}" \
${CONFIG_SHELL} \
- "${CT_SRC_DIR}/ncurses-${CT_NCURSES_VERSION}/configure" \
+ "${CT_SRC_DIR}/ncurses/configure" \
--build=${CT_BUILD} \
--host=${host} \
--prefix="${prefix}" \
@@ -196,9 +174,13 @@ do_ncurses_backend() {
# it also builds ncurses anyway, and dedicated targets (install.includes and
# install.progs) do not do well with parallel make (-jX).
CT_DoLog EXTRA "Building ncurses"
- CT_DoExecLog ALL make ${JOBSFLAGS}
+ CT_DoExecLog ALL make ${CT_JOBSFLAGS}
+
+ # STRIPPROG is handled by our wrapper around install.
CT_DoLog EXTRA "Installing ncurses"
- CT_DoExecLog ALL make install
+ CT_DoExecLog ALL \
+ STRIPPROG="${host}-strip" \
+ make "${install_target}"
}
fi