1 #############################################################
4 # this installs only a few vital termcap entries
6 #############################################################
7 # Copyright (C) 2002 by Ken Restivo <ken@246gt.com>
8 # $Id: ncurses.mk,v 1.7 2005/01/03 04:38:13 andersen Exp $
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU Library General Public License as
12 # published by the Free Software Foundation; either version 2 of the
13 # License, or (at your option) any later version.
15 # This program is distributed in the hope that it will be useful, but
16 # WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 # Library General Public License for more details.
20 # You should have received a copy of the GNU Library General Public
21 # License along with this program; if not, write to the Free Software
22 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
27 NCURSES_SITE
:=$(BR2_GNU_MIRROR
)/ncurses
28 NCURSES_DIR
:=$(BUILD_DIR
)/ncurses-
$(NCURSES_VERSION
)
29 NCURSES_SOURCE
:=ncurses-
$(NCURSES_VERSION
).
tar.gz
32 ifneq ($(BR2_PACKAGE_NCURSES_TARGET_HEADERS
),y
)
33 NCURSES_WANT_STATIC
=--disable-static
36 $(DL_DIR
)/$(NCURSES_SOURCE
):
37 $(WGET
) -P
$(DL_DIR
) $(NCURSES_SITE
)/$(NCURSES_SOURCE
)
39 $(NCURSES_DIR
)/.patched
: $(DL_DIR
)/$(NCURSES_SOURCE
)
40 $(NCURSES_CAT
) $(DL_DIR
)/$(NCURSES_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
41 #use the local tic and not whatever the build system was going to find.
42 $(SED
) 's~\$$srcdir/shlib tic\$$suffix~/usr/bin/tic~' \
43 $(NCURSES_DIR
)/misc
/run_tic.in
44 toolchain
/patch-kernel.sh
$(NCURSES_DIR
) package
/ncurses
/ ncurses\
*.patch
45 $(CONFIG_UPDATE
) $(@D
)
48 $(NCURSES_DIR
)/.configured
: $(NCURSES_DIR
)/.patched
49 (cd
$(NCURSES_DIR
); rm -rf config.cache
; \
50 BUILD_CC
="$(HOSTCC)" \
52 $(AUTO_CONFIGURE_TARGET
) \
58 --libexecdir
=/usr
/lib \
60 --datadir=/usr
/share \
61 --localstatedir
=/var \
62 --includedir=/usr
/include \
63 --mandir=/usr
/share
/man \
64 --infodir=/usr
/share
/info \
65 --with-terminfo-dirs
=/usr
/share
/terminfo \
66 --with-default-terminfo-dir
=/usr
/share
/terminfo \
67 --with-shared
--without-cxx
--without-cxx-binding \
68 --without-ada
--without-progs
--disable-big-core \
69 $(DISABLE_NLS
) $(DISABLE_LARGEFILE
) \
70 --without-profile
--without-debug
--disable-rpath \
71 --enable-echo
--enable-const
--enable-overwrite \
72 --enable-broken_linker \
73 $(NCURSES_WANT_STATIC
) \
77 $(NCURSES_DIR
)/lib
/libncurses.so.
$(NCURSES_VERSION
): $(NCURSES_DIR
)/.configured
78 $(MAKE1
) DESTDIR
=$(STAGING_DIR
) -C
$(NCURSES_DIR
) \
79 libs panel menu form headers
81 $(STAGING_DIR
)/lib
/libncurses.so.
$(NCURSES_VERSION
): $(NCURSES_DIR
)/lib
/libncurses.so.
$(NCURSES_VERSION
)
83 prefix=$(STAGING_DIR
)/usr
/ \
84 exec_prefix=$(STAGING_DIR
) \
85 bindir=$(STAGING_DIR
)/bin \
86 sbindir
=$(STAGING_DIR
)/sbin \
87 libexecdir
=$(STAGING_DIR
)/usr
/lib \
88 datadir=$(STAGING_DIR
)/usr
/share \
89 sysconfdir
=$(STAGING_DIR
)/etc \
90 localstatedir
=$(STAGING_DIR
)/var \
91 libdir=$(STAGING_DIR
)/lib \
92 infodir=$(STAGING_DIR
)/usr
/share
/info \
93 mandir=$(STAGING_DIR
)/usr
/share
/man \
94 includedir=$(STAGING_DIR
)/usr
/include \
95 gxx_include_dir
=$(STAGING_DIR
)/usr
/include/c
++ \
96 ticdir
=$(STAGING_DIR
)/usr
/share
/terminfo \
97 -C
$(NCURSES_DIR
) install
98 chmod a-x
$(NCURSES_DIR
)/lib
/libncurses.so
*
101 $(TARGET_DIR
)/lib
/libncurses.so.
$(NCURSES_VERSION
): $(STAGING_DIR
)/lib
/libncurses.so.
$(NCURSES_VERSION
)
102 cp
-dpf
$(NCURSES_DIR
)/lib
/libncurses.so
* $(TARGET_DIR
)/lib
/
103 -cp
-dpf
$(STAGING_DIR
)/usr
/lib
/terminfo
$(TARGET_DIR
)/usr
/lib
/
104 mkdir
-p
$(TARGET_DIR
)/usr
/share
/terminfo
/x
105 cp
-dpf
$(STAGING_DIR
)/usr
/share
/terminfo
/x
/xterm
$(TARGET_DIR
)/usr
/share
/terminfo
/x
106 cp
-dpf
$(STAGING_DIR
)/usr
/share
/terminfo
/x
/xterm-color
$(TARGET_DIR
)/usr
/share
/terminfo
/x
107 cp
-dpf
$(STAGING_DIR
)/usr
/share
/terminfo
/x
/xterm-xfree86
$(TARGET_DIR
)/usr
/share
/terminfo
/x
108 mkdir
-p
$(TARGET_DIR
)/usr
/share
/terminfo
/v
109 cp
-dpf
$(STAGING_DIR
)/usr
/share
/terminfo
/v
/vt100
$(TARGET_DIR
)/usr
/share
/terminfo
/v
110 cp
-dpf
$(STAGING_DIR
)/usr
/share
/terminfo
/v
/vt102
$(TARGET_DIR
)/usr
/share
/terminfo
/v
111 cp
-dpf
$(STAGING_DIR
)/usr
/share
/terminfo
/v
/vt200
$(TARGET_DIR
)/usr
/share
/terminfo
/v
112 cp
-dpf
$(STAGING_DIR
)/usr
/share
/terminfo
/v
/vt220
$(TARGET_DIR
)/usr
/share
/terminfo
/v
113 mkdir
-p
$(TARGET_DIR
)/usr
/share
/terminfo
/a
114 cp
-dpf
$(STAGING_DIR
)/usr
/share
/terminfo
/a
/ansi
$(TARGET_DIR
)/usr
/share
/terminfo
/a
115 mkdir
-p
$(TARGET_DIR
)/usr
/share
/terminfo
/l
116 cp
-dpf
$(STAGING_DIR
)/usr
/share
/terminfo
/l
/linux
$(TARGET_DIR
)/usr
/share
/terminfo
/l
117 mkdir
-p
$(TARGET_DIR
)/usr
/share
/terminfo
/r
118 cp
-dpf
$(STAGING_DIR
)/usr
/share
/terminfo
/r
/rxvt
$(TARGET_DIR
)/usr
/share
/terminfo
/r
119 -$(STRIPCMD
) $(STRIP_STRIP_UNNEEDED
) $@
122 $(TARGET_DIR
)/usr
/lib
/libncurses.a
: $(STAGING_DIR
)/lib
/libncurses.a
123 mkdir
-p
$(TARGET_DIR
)/usr
/include
124 cp
-dpf
$(NCURSES_DIR
)/include/curses.h
$(TARGET_DIR
)/usr
/include/ncurses.h
125 cp
-dpf
$(NCURSES_DIR
)/include/ncurses_dll.h
$(TARGET_DIR
)/usr
/include/ncurses_dll.h
126 cp
-dpf
$(NCURSES_DIR
)/include/term.h
$(TARGET_DIR
)/usr
/include/
127 cp
-dpf
$(NCURSES_DIR
)/include/unctrl.h
$(TARGET_DIR
)/usr
/include/
128 cp
-dpf
$(NCURSES_DIR
)/include/termcap.h
$(TARGET_DIR
)/usr
/include/
129 cp
-dpf
$(NCURSES_DIR
)/lib
/libncurses.a
$(TARGET_DIR
)/usr
/lib
/
130 rm -f
$(TARGET_DIR
)/usr
/lib
/terminfo
131 (cd
$(TARGET_DIR
)/usr
/lib
; ln
-fs ..
/share
/terminfo
; \
132 ln
-fs libncurses.a libcurses.a
; \
133 ln
-fs libncurses.a libtermcap.a
; \
135 (cd
$(TARGET_DIR
)/usr
/include; ln
-fs ncurses.h curses.h
)
136 rm -f
$(TARGET_DIR
)/lib
/libncurses.so
137 (cd
$(TARGET_DIR
)/usr
/lib
; ln
-fs ..
/..
/lib
/libncurses.so.
$(NCURSES_VERSION
) libncurses.so
)
138 -$(STRIPCMD
) $(STRIP_STRIP_UNNEEDED
) $(TARGET_DIR
)/lib
/libncurses.so.
$(NCURSES_VERSION
)
141 ncurses
: $(TARGET_DIR
)/lib
/libncurses.so.
$(NCURSES_VERSION
)
143 ncurses-headers
: $(TARGET_DIR
)/usr
/lib
/libncurses.a
145 ncurses-source
: $(DL_DIR
)/$(NCURSES_SOURCE
)
148 -$(MAKE
) -C
$(NCURSES_DIR
) clean
149 rm -f
$(STAGING_DIR
)/lib
/libncurses.so
* $(TARGET_DIR
)/lib
/libncurses.so
*
150 rm -f
$(STAGING_DIR
)/usr
/lib
/libncurses.so
* $(TARGET_DIR
)/usr
/lib
/libncurses.so
*
151 rm -rf
$(STAGING_DIR
)/usr
/share
/tabset
$(TARGET_DIR
)/usr
/share
/tabset
152 rm -rf
$(STAGING_DIR
)/usr
/share
/terminfo
$(TARGET_DIR
)/usr
/share
/terminfo
155 rm -rf
$(NCURSES_DIR
)
157 #############################################################
159 # Toplevel Makefile options
161 #############################################################
162 ifeq ($(BR2_PACKAGE_NCURSES
),y
)
165 ifeq ($(BR2_PACKAGE_NCURSES_TARGET_HEADERS
),y
)
166 TARGETS
+=ncurses-headers