]> Git Repo - buildroot-mgba.git/blame - package/ncurses/ncurses.mk
ncurses: build statically when BR2_PREFER_STATIC_LIB
[buildroot-mgba.git] / package / ncurses / ncurses.mk
CommitLineData
6387962e
EA
1#############################################################
2#
3# ncurses
a6dca68c
JV
4# this installs only a few vital termcap entries
5#
6387962e 6#############################################################
a6dca68c
JV
7# Copyright (C) 2002 by Ken Restivo <[email protected]>
8# $Id: ncurses.mk,v 1.7 2005/01/03 04:38:13 andersen Exp $
9#
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.
14#
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.
19#
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
23# USA
24
25# TARGETS
7d584285 26NCURSES_VERSION = 5.7
92d69b97 27NCURSES_SITE = $(BR2_GNU_MIRROR)/ncurses
92d69b97 28NCURSES_INSTALL_STAGING = YES
bf446513 29NCURSES_DEPENDENCIES = host-ncurses
92d69b97
LL
30
31NCURSES_CONF_OPT = \
311a5830 32 $(if $(BR2_PREFER_STATIC_LIB),--without-shared,--with-shared) \
92d69b97
LL
33 --without-cxx \
34 --without-cxx-binding \
35 --without-ada \
36 --without-progs \
4d651b4d 37 --without-tests \
92d69b97
LL
38 --disable-big-core \
39 --without-profile \
40 --disable-rpath \
41 --enable-echo \
42 --enable-const \
43 --enable-overwrite \
311a5830 44 --enable-broken_linker
ab57732b 45
92d69b97
LL
46ifneq ($(BR2_ENABLE_DEBUG),y)
47NCURSES_CONF_OPT += --without-debug
48endif
a6dca68c 49
a6dca68c 50
92d69b97
LL
51define NCURSES_BUILD_CMDS
52 $(MAKE1) -C $(@D) DESTDIR=$(STAGING_DIR)
53endef
a6dca68c 54
92d69b97 55define NCURSES_PATCH_NCURSES_CONFIG
0cf28ade 56 $(SED) 's^prefix="^prefix="$(STAGING_DIR)^' \
3bb02f5b 57 $(STAGING_DIR)/usr/bin/ncurses5-config
92d69b97
LL
58endef
59
3bb02f5b 60NCURSES_POST_STAGING_INSTALL_HOOKS += NCURSES_PATCH_NCURSES_CONFIG
92d69b97
LL
61
62ifeq ($(BR2_HAVE_DEVFILES),y)
63define NCURSES_INSTALL_TARGET_DEVFILES
64 mkdir -p $(TARGET_DIR)/usr/include
65 cp -dpf $(NCURSES_DIR)/include/curses.h $(TARGET_DIR)/usr/include/curses.h
66 cp -dpf $(NCURSES_DIR)/include/ncurses_dll.h $(TARGET_DIR)/usr/include/ncurses_dll.h
67 cp -dpf $(NCURSES_DIR)/include/term.h $(TARGET_DIR)/usr/include/
68 cp -dpf $(NCURSES_DIR)/include/unctrl.h $(TARGET_DIR)/usr/include/
69 cp -dpf $(NCURSES_DIR)/include/termcap.h $(TARGET_DIR)/usr/include/
70 cp -dpf $(NCURSES_DIR)/lib/libncurses.a $(TARGET_DIR)/usr/lib/
71 (cd $(TARGET_DIR)/usr/lib; \
72 ln -fs libncurses.a libcurses.a; \
73 ln -fs libncurses.a libtermcap.a; \
74 )
75 (cd $(TARGET_DIR)/usr/include; ln -fs curses.h ncurses.h)
76 rm -f $(TARGET_DIR)/usr/lib/libncurses.so
77 (cd $(TARGET_DIR)/usr/lib; ln -fs libncurses.so.$(NCURSES_VERSION) libncurses.so)
78endef
79endif
a6dca68c 80
311a5830
PK
81ifneq ($(BR2_PREFER_STATIC_LIB),y)
82
ac1d92c4 83ifeq ($(BR2_PACKAGE_NCURSES_TARGET_PANEL),y)
92d69b97 84define NCURSES_INSTALL_TARGET_PANEL
46528496 85 cp -dpf $(NCURSES_DIR)/lib/libpanel.so* $(TARGET_DIR)/usr/lib/
92d69b97 86endef
d284bd5b 87endif
92d69b97 88
ac1d92c4 89ifeq ($(BR2_PACKAGE_NCURSES_TARGET_FORM),y)
92d69b97 90define NCURSES_INSTALL_TARGET_FORM
46528496 91 cp -dpf $(NCURSES_DIR)/lib/libform.so* $(TARGET_DIR)/usr/lib/
92d69b97 92endef
d284bd5b 93endif
92d69b97 94
ac1d92c4 95ifeq ($(BR2_PACKAGE_NCURSES_TARGET_MENU),y)
92d69b97 96define NCURSES_INSTALL_TARGET_MENU
46528496 97 cp -dpf $(NCURSES_DIR)/lib/libmenu.so* $(TARGET_DIR)/usr/lib/
92d69b97 98endef
d284bd5b 99endif
92d69b97 100
311a5830
PK
101endif
102
92d69b97
LL
103define NCURSES_INSTALL_TARGET_CMDS
104 mkdir -p $(TARGET_DIR)/usr/lib
311a5830 105 $(if $(BR2_PREFER_STATIC_LIB),,cp -dpf $(NCURSES_DIR)/lib/libncurses.so* $(TARGET_DIR)/usr/lib/)
92d69b97
LL
106 $(NCURSES_INSTALL_TARGET_PANEL)
107 $(NCURSES_INSTALL_TARGET_FORM)
108 $(NCURSES_INSTALL_TARGET_MENU)
49b38b50 109 ln -snf /usr/share/terminfo $(TARGET_DIR)/usr/lib/terminfo
a6dca68c
JV
110 mkdir -p $(TARGET_DIR)/usr/share/terminfo/x
111 cp -dpf $(STAGING_DIR)/usr/share/terminfo/x/xterm $(TARGET_DIR)/usr/share/terminfo/x
112 cp -dpf $(STAGING_DIR)/usr/share/terminfo/x/xterm-color $(TARGET_DIR)/usr/share/terminfo/x
113 cp -dpf $(STAGING_DIR)/usr/share/terminfo/x/xterm-xfree86 $(TARGET_DIR)/usr/share/terminfo/x
114 mkdir -p $(TARGET_DIR)/usr/share/terminfo/v
115 cp -dpf $(STAGING_DIR)/usr/share/terminfo/v/vt100 $(TARGET_DIR)/usr/share/terminfo/v
116 cp -dpf $(STAGING_DIR)/usr/share/terminfo/v/vt102 $(TARGET_DIR)/usr/share/terminfo/v
117 cp -dpf $(STAGING_DIR)/usr/share/terminfo/v/vt200 $(TARGET_DIR)/usr/share/terminfo/v
118 cp -dpf $(STAGING_DIR)/usr/share/terminfo/v/vt220 $(TARGET_DIR)/usr/share/terminfo/v
119 mkdir -p $(TARGET_DIR)/usr/share/terminfo/a
120 cp -dpf $(STAGING_DIR)/usr/share/terminfo/a/ansi $(TARGET_DIR)/usr/share/terminfo/a
121 mkdir -p $(TARGET_DIR)/usr/share/terminfo/l
122 cp -dpf $(STAGING_DIR)/usr/share/terminfo/l/linux $(TARGET_DIR)/usr/share/terminfo/l
e940b303
GZ
123 mkdir -p $(TARGET_DIR)/usr/share/terminfo/s
124 cp -dpf $(STAGING_DIR)/usr/share/terminfo/s/screen $(TARGET_DIR)/usr/share/terminfo/s
92d69b97
LL
125 $(NCURSES_INSTALL_TARGET_DEVFILES)
126endef # NCURSES_INSTALL_TARGET_CMDS
6387962e 127
bf446513
TDS
128#
129# On systems with an older version of tic, the installation of ncurses hangs
130# forever. To resolve the problem, build a static version of tic on host
131# ourselves, and use that during installation.
132#
133define HOST_NCURSES_BUILD_CMDS
134 $(MAKE1) -C $(@D) sources
135 $(MAKE) -C $(@D)/progs tic
136endef
137
79f7d48f
PK
138HOST_NCURSES_DEPENDENCIES =
139
bf446513 140HOST_NCURSES_CONF_OPT = \
57194c2b 141 --without-shared --without-gpm
bf446513 142
300f9c9c
TP
143$(eval $(call AUTOTARGETS))
144$(eval $(call AUTOTARGETS,host))
This page took 0.455678 seconds and 4 git commands to generate.