source: scripts/native-scripts/native-ncurses.sh@ f118837

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since f118837 was 617118d, checked in by Jim Gifford <clfs@…>, 19 years ago

r561@server (orig r559): root | 2005-06-05 02:38:49 -0700
Fixed Directory Structure

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