1 ################################################################################
5 ################################################################################
8 NCURSES_SITE
= $(BR2_GNU_MIRROR
)/ncurses
9 NCURSES_INSTALL_STAGING
= YES
10 NCURSES_DEPENDENCIES
=
11 NCURSES_LICENSE
= MIT with advertising clause
12 NCURSES_LICENSE_FILES
= README
13 NCURSES_CONFIG_SCRIPTS
= ncurses
$(NCURSES_LIB_SUFFIX
)6-config
17 --without-cxx-binding \
23 --disable-rpath-hack \
28 --with-pkg-config-libdir
="/usr/lib/pkgconfig" \
29 $(if
$(BR2_PACKAGE_NCURSES_TARGET_PROGS
),,--without-progs
) \
32 ifeq ($(BR2_STATIC_LIBS
),y
)
33 NCURSES_CONF_OPTS
+= --without-shared
--with-normal
34 else ifeq ($(BR2_SHARED_LIBS
),y
)
35 NCURSES_CONF_OPTS
+= --with-shared
--without-normal
36 else ifeq ($(BR2_SHARED_STATIC_LIBS
),y
)
37 NCURSES_CONF_OPTS
+= --with-shared
--with-normal
40 # configure can't find the soname for libgpm when cross compiling
41 ifeq ($(BR2_PACKAGE_GPM
),y
)
42 NCURSES_CONF_OPTS
+= --with-gpm
=libgpm.so
.2
43 NCURSES_DEPENDENCIES
+= gpm
45 NCURSES_CONF_OPTS
+= --without-gpm
48 NCURSES_TERMINFO_FILES
= \
63 ifeq ($(BR2_PACKAGE_NCURSES_WCHAR
),y
)
64 NCURSES_CONF_OPTS
+= --enable-widec
65 NCURSES_LIB_SUFFIX
= w
66 NCURSES_LIBS
= ncurses menu panel form
68 define NCURSES_LINK_LIBS_STATIC
69 $(foreach lib
,$(NCURSES_LIBS
:%=lib
%), \
70 ln
-sf
$(lib
)$(NCURSES_LIB_SUFFIX
).a
$(STAGING_DIR
)/usr
/lib
/$(lib
).a
72 ln
-sf libncurses
$(NCURSES_LIB_SUFFIX
).a \
73 $(STAGING_DIR
)/usr
/lib
/libcurses.a
76 define NCURSES_LINK_LIBS_SHARED
77 $(foreach lib
,$(NCURSES_LIBS
:%=lib
%), \
78 ln
-sf
$(lib
)$(NCURSES_LIB_SUFFIX
).so
$(STAGING_DIR
)/usr
/lib
/$(lib
).so
80 ln
-sf libncurses
$(NCURSES_LIB_SUFFIX
).so \
81 $(STAGING_DIR
)/usr
/lib
/libcurses.so
84 define NCURSES_LINK_LIBS_SHARED
85 ln
-sf
$(lib
)$(NCURSES_LIB_SUFFIX
).so
$(TARGET_DIR
)/usr
/lib
/$(lib
).so \
86 ln
-sf libncurses
$(NCURSES_LIB_SUFFIX
).so \
87 $(STAGING_DIR
)/usr
/lib
/libcurses.so
88 $(foreach lib
,$(NCURSES_LIBS
:%=lib
%), \
89 ln
-sf
$(lib
)$(NCURSES_LIB_SUFFIX
).so
$(STAGING_DIR
)/usr
/lib
/$(lib
).so
91 ln
-sf libncurses
$(NCURSES_LIB_SUFFIX
).so \
92 $(STAGING_DIR
)/usr
/lib
/libcurses.so
95 define NCURSES_LINK_PC
96 $(foreach pc,$(NCURSES_LIBS
), \
97 ln
-sf
$(pc)$(NCURSES_LIB_SUFFIX
).
pc \
98 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/$(pc).
pc
102 NCURSES_LINK_STAGING_LIBS
= \
103 $(if
$(BR2_STATIC_LIBS
)$(BR2_SHARED_STATIC_LIBS
),$(call NCURSES_LINK_LIBS_STATIC
);) \
104 $(if
$(BR2_SHARED_LIBS
)$(BR2_SHARED_STATIC_LIBS
),$(call NCURSES_LINK_LIBS_SHARED
))
106 NCURSES_LINK_STAGING_PC
= $(call NCURSES_LINK_PC
)
108 NCURSES_CONF_OPTS
+= --enable-ext-colors
109 NCURSES_TERMINFO_FILES
+= \
114 NCURSES_POST_INSTALL_STAGING_HOOKS
+= NCURSES_LINK_STAGING_LIBS
115 NCURSES_POST_INSTALL_STAGING_HOOKS
+= NCURSES_LINK_STAGING_PC
117 endif # BR2_PACKAGE_NCURSES_WCHAR
119 ifneq ($(BR2_ENABLE_DEBUG
),y
)
120 NCURSES_CONF_OPTS
+= --without-debug
123 # ncurses breaks with parallel build, but takes quite a while to
124 # build single threaded. Work around it similar to how Gentoo does
125 define NCURSES_BUILD_CMDS
126 $(TARGET_MAKE_ENV
) $(MAKE1
) -C
$(@D
) DESTDIR
=$(STAGING_DIR
) sources
127 rm -rf
$(@D
)/misc
/pc-files
128 $(TARGET_MAKE_ENV
) $(MAKE
) -C
$(@D
) DESTDIR
=$(STAGING_DIR
)
131 ifeq ($(BR2_PACKAGE_NCURSES_TARGET_PROGS
),y
)
132 define NCURSES_TARGET_SYMLINK_RESET
133 ln
-sf tset
$(TARGET_DIR
)/usr
/bin
/reset
135 NCURSES_POST_INSTALL_TARGET_HOOKS
+= NCURSES_TARGET_SYMLINK_RESET
138 define NCURSES_TARGET_CLEANUP_TERMINFO
139 $(RM
) -rf
$(TARGET_DIR
)/usr
/share
/terminfo
$(TARGET_DIR
)/usr
/share
/tabset
140 # $(foreach t,$(NCURSES_TERMINFO_FILES), \
141 # $(INSTALL) -D -m 0644 $(STAGING_DIR)/usr/share/terminfo/$(t) \
142 # $(TARGET_DIR)/usr/share/terminfo/$(t)
145 NCURSES_POST_INSTALL_TARGET_HOOKS
+= NCURSES_TARGET_CLEANUP_TERMINFO
148 # On systems with an older version of tic, the installation of ncurses hangs
149 # forever. To resolve the problem, build a static version of tic on host
150 # ourselves, and use that during installation.
152 define HOST_NCURSES_BUILD_CMDS
153 $(HOST_MAKE_ENV
) $(MAKE1
) -C
$(@D
) sources
154 $(HOST_MAKE_ENV
) $(MAKE
) -C
$(@D
)/progs tic
157 HOST_NCURSES_CONF_OPTS
= \
162 --without-cxx-binding \
166 $(eval
$(autotools-package
))
167 $(eval
$(host-autotools-package
))