source: scripts/scripts/native-scripts/native-ncurses.sh @ 63b3dd5

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since 63b3dd5 was 63b3dd5, checked in by Jim Gifford <clfs@…>, 18 years ago

r2508@server (orig r1247): ryan | 2006-03-10 02:07:51 -0800

r1297@rei: lfs | 2006-03-09 18:43:59 +1100
Add ncurses-5.5-fixes-1.patch
-----------------------------
Submitted by: Alexander E. Patrakov
Date: 2005-12-07
Initial Package Version: 5.5
Upstream Status: Backport
Origin: Cherry-picked from ftp://invisible-island.net/ncurses/5.5/*.gz
Description: Fixes the following bugs:




  • Property mode set to 100755
File size: 2.5 KB
Line 
1#!/bin/bash
2
3# cross-lfs native ncurses build
4# ------------------------------
5# $LastChangedBy$
6# $LastChangedDate$
7# $LastChangedRevision$
8# $HeadURL$
9#
10
11cd ${SRC}
12LOG=ncurses-native.log
13libdir="lib"
14
15SELF=`basename ${0}`
16set_buildenv
17set_libdirname
18setup_multiarch
19
20unpack_tarball ncurses-${NCURSES_VER} &&
21cd ${PKGDIR}
22
23case ${NCURSES_VER} in
24   5.5 ) apply_patch ncurses-5.5-fixes-1 ;;
25esac
26
27if [ ! "${libdirname}" = "lib" ]; then
28   extra_conf="--libdir=/usr/${libdirname}"
29
30   # Patch misc/run_tic.in to create lib64/terminfo -> share/terminfo link
31   test -f misc/run_tic.in-ORIG ||
32      mv misc/run_tic.in misc/run_tic.in-ORIG
33
34   sed "s:^\(TICDIR.*/\)lib\(.*\):\1${libdirname}\2:g" \
35      misc/run_tic.in-ORIG > misc/run_tic.in
36fi
37
38
39# replace some deprecated headers
40# strstream deprecated in favour of sstream
41test -f c++/cursesw.h-ORIG ||
42   mv c++/cursesw.h c++/cursesw.h-ORIG
43sed 's/include <strstream.h>/include <sstream>/g' c++/cursesw.h-ORIG > c++/cursesw.h
44
45# CHECK THIS... Should only affect ncurses 5.2 and less,
46# must check whether vsscanf is picked up or not in 5.3
47test 5.2 = "${NCURSES_VER}" &&
48{
49   # Apply cursesw.cc vsscanf patch
50   # Unsure who provided the original patch used.
51   # Please contact the authors so we can attribute you correctly.
52   test -f c++/cursesw.cc-ORIG ||
53      cp c++/cursesw.cc c++/cursesw.cc-ORIG
54   grep -v strstreambuf c++/cursesw.cc-ORIG |
55   sed 's@ss.vscan(@::vsscanf(buf, @' > c++/cursesw.cc
56}
57
58max_log_init Ncurses ${NCURSES_VER} "native (shared)" ${CONFLOGS} ${LOG}
59CC="${CC-gcc} ${ARCH_CFLAGS}" \
60CXX="${CXX-g++} ${ARCH_CFLAGS}" \
61./configure --prefix=/usr --with-shared \
62   --without-debug ${extra_conf} \
63   >> ${LOGFILE} 2>&1 &&
64echo " o Configure OK" &&
65
66min_log_init ${BUILDLOGS} &&
67make \
68   >> ${LOGFILE} 2>&1 &&
69echo " o Build OK" &&
70
71min_log_init ${INSTLOGS} &&
72make install \
73   >> ${LOGFILE} 2>&1 &&
74echo " o ALL OK" || barf
75
76chmod 755 /usr/${libdirname}/*.${NCURSES_VER} &&
77chmod 644 /usr/${libdirname}/libncurses++.a &&
78mv /usr/${libdirname}/libncurses.so.* /${libdirname}
79ln -s libncurses.a /usr/${libdirname}/libcurses.a
80ln -sf ../../${libdirname}/libncurses.so.5 /usr/${libdirname}/libncurses.so
81ln -sf ../../${libdirname}/libncurses.so.5 /usr/${libdirname}/libcurses.so
82
83#ldconfig
84
85if [ ! -f /usr/include/term.h -a -f /usr/include/ncurses/term.h ]; then
86   ln -sf ncurses/term.h /usr/include
87fi
88
89# also create a curses.h symlink
90if [ ! -f /usr/include/curses.h -a -f /usr/include/ncurses/curses.h ]; then
91   ln -sf ncurses/curses.h /usr/include
92fi
93
94/sbin/ldconfig
Note: See TracBrowser for help on using the repository browser.