board/csky: fixup gdb instructions in readme.txt
[buildroot-gz.git] / package / gpm / gpm.mk
blobed4c1fd305fe99bb1ad3ae5042a45a7d7a7f4d42
1 ################################################################################
3 # gpm
5 ################################################################################
7 GPM_VERSION = 1.20.7
8 GPM_SOURCE = gpm-$(GPM_VERSION).tar.lzma
9 GPM_SITE = http://www.nico.schottelius.org/software/gpm/archives
10 GPM_LICENSE = GPLv2+
11 GPM_LICENSE_FILES = COPYING
12 GPM_INSTALL_STAGING = YES
13 GPM_DEPENDENCIES = host-bison
15 # if not already installed in staging dir, gpm Makefile may fail to find some
16 # of the headers needed to generate build dependencies, the first time it is
17 # built. CPPFLAGS is used to pass the right include path to dependency rules.
18 GPM_CONF_ENV = \
19 CPPFLAGS="$(TARGET_CPPFLAGS) -I$(@D)/src/headers/" \
20 ac_cv_path_emacs=no
22 # For some reason, Microblaze gcc does not define __ELF__, which gpm
23 # configure script uses to determine whether the architecture uses ELF
24 # binaries and therefore can build shared libraries. We fix this by
25 # telling GPM that ELF is used on Microblaze.
26 ifeq ($(BR2_microblaze),y)
27 GPM_CONF_ENV += itz_cv_sys_elf=yes
28 endif
30 # gpm and ncurses have a circular dependency. As gpm function GPM_Wgetch()
31 # (requiring ncurses) is not recommended for use by ncurses people themselves
32 # and as it's better to have gpm support in ncurses that the contrary, we force
33 # gpm to not look after ncurses explicitly.
34 # http://invisible-island.net/ncurses/ncurses.faq.html#using_gpm_lib
35 GPM_CONF_OPTS = --without-curses
37 # configure is missing but gpm seems not compatible with our autoreconf
38 # mechanism so we have to do it manually instead of using GPM_AUTORECONF = YES
39 define GPM_RUN_AUTOGEN
40 cd $(@D) && PATH=$(BR_PATH) ./autogen.sh
41 endef
42 GPM_PRE_CONFIGURE_HOOKS += GPM_RUN_AUTOGEN
44 GPM_DEPENDENCIES += host-automake host-autoconf host-libtool
46 # gpm tries to build/install .info doc even if makeinfo isn't installed on the
47 # host, so we have to disable global doc installation to prevent autobuild
48 # errors.
49 define GPM_DISABLE_DOC_INSTALL
50 $(SED) 's/SUBDIRS = src doc contrib/SUBDIRS = src contrib/' \
51 $(@D)/Makefile.in
52 endef
53 GPM_POST_PATCH_HOOKS += GPM_DISABLE_DOC_INSTALL
55 ifeq ($(BR2_PACKAGE_GPM_INSTALL_TEST_TOOLS),)
56 define GPM_REMOVE_TEST_TOOLS_FROM_TARGET
57 for tools in mev hltest mouse-test display-buttons \
58 get-versions display-coords; do \
59 rm -f $(TARGET_DIR)/usr/bin/$$tools ; \
60 done
61 endef
62 GPM_POST_INSTALL_TARGET_HOOKS += GPM_REMOVE_TEST_TOOLS_FROM_TARGET
63 endif
65 define GPM_INSTALL_GPM_ROOT_CONF_ON_TARGET
66 $(INSTALL) -m 0644 -D $(@D)/conf/gpm-root.conf $(TARGET_DIR)/etc/
67 endef
69 GPM_POST_INSTALL_TARGET_HOOKS += GPM_INSTALL_GPM_ROOT_CONF_ON_TARGET
71 $(eval $(autotools-package))