]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/gpm/gpm.mk
gpm: fixes build error when makeinfo is not installed on host
[coffee/buildroot.git] / package / gpm / gpm.mk
1 ###############################################################################
2 #
3 # gpm
4 #
5 ###############################################################################
6
7 GPM_VERSION = 1.20.7
8 GPM_SOURCE = gpm-$(GPM_VERSION).tar.bz2
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
14 # if not already installed in staging dir, gpm Makefile may fail to find some
15 # of the headers needed to generate build dependencies, the first time it is
16 # built. CPPFLAGS is used to pass the right include path to dependency rules.
17 GPM_CONF_ENV = CPPFLAGS="$(TARGET_CPPFLAGS) -I$(@D)/src/headers/"
18
19 # gpm and ncurses have a circular dependency. As gpm function GPM_Wgetch()
20 # (requiring ncurses) is not recommended for use by ncurses people themselves
21 # and as it's better to have gpm support in ncurses that the contrary, we force
22 # gpm to not look after ncurses explicitly.
23 # http://invisible-island.net/ncurses/ncurses.faq.html#using_gpm_lib
24 GPM_CONF_OPT = --without-curses
25
26 # configure is missing but gpm seems not compatible with our autoreconf
27 # mechanism so we have to do it manually instead of using GPM_AUTORECONF = YES
28 define GPM_RUN_AUTOGEN
29         cd $(@D) && PATH=$(HOST_PATH) ./autogen.sh
30 endef
31 GPM_POST_PATCH_HOOKS += GPM_RUN_AUTOGEN
32
33 GPM_DEPENDENCIES += host-automake host-autoconf host-libtool
34
35 # gpm tries to build/install .info doc even if makeinfo isn't installed on the
36 # host, so we have to disable global doc installation to prevent autobuild
37 # errors.
38 define GPM_DISABLE_DOC_INSTALL
39         $(SED) 's/SUBDIRS = src doc contrib/SUBDIRS = src contrib/' \
40                 $(@D)/Makefile.in
41 endef
42 GPM_POST_PATCH_HOOKS += GPM_DISABLE_DOC_INSTALL
43
44 ifeq ($(BR2_PACKAGE_GPM_INSTALL_TEST_TOOLS),)
45 define GPM_REMOVE_TEST_TOOLS_FROM_TARGET
46         for tools in mev hltest mouse-test display-buttons \
47                         get-versions display-coords; do \
48                 rm -f $(TARGET_DIR)/usr/bin/$$tools ; \
49         done
50 endef
51 GPM_POST_INSTALL_TARGET_HOOKS += GPM_REMOVE_TEST_TOOLS_FROM_TARGET
52 endif
53
54 define GPM_INSTALL_GPM_ROOT_CONF_ON_TARGET
55         $(INSTALL) -m 0644 -D $(@D)/conf/gpm-root.conf $(TARGET_DIR)/etc/
56 endef
57
58 GPM_POST_INSTALL_TARGET_HOOKS += GPM_INSTALL_GPM_ROOT_CONF_ON_TARGET
59
60 $(eval $(autotools-package))