summaryrefslogtreecommitdiffstats
path: root/package/gpm/gpm.mk
diff options
context:
space:
mode:
authorJulien Boibessot <julien.boibessot@armadeus.com>2014-01-29 19:20:59 +0100
committerPeter Korsgaard <peter@korsgaard.com>2014-02-02 21:53:03 +0100
commitbc8ede2bb335d83029a2ad15515fa4e44fbd4e0a (patch)
tree46576053c1e66d2db83c225e7083729bc6bfdd4d /package/gpm/gpm.mk
parentfc95ad82e11e9a97131884574de78afc2918cffc (diff)
downloadbuildroot-bc8ede2bb335d83029a2ad15515fa4e44fbd4e0a.tar.gz
buildroot-bc8ede2bb335d83029a2ad15515fa4e44fbd4e0a.zip
Add gpm (general purpose mouse) server package
[Peter: small white space fixes as pointed out by Yann] Signed-off-by: Julien Boibessot <julien.boibessot@armadeus.com> Signed-off-by: Romain Naour <romain.naour@openwide.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/gpm/gpm.mk')
-rw-r--r--package/gpm/gpm.mk51
1 files changed, 51 insertions, 0 deletions
diff --git a/package/gpm/gpm.mk b/package/gpm/gpm.mk
new file mode 100644
index 0000000000..6fd5a3fa2c
--- /dev/null
+++ b/package/gpm/gpm.mk
@@ -0,0 +1,51 @@
+###############################################################################
+#
+# gpm
+#
+###############################################################################
+
+GPM_VERSION = 1.20.7
+GPM_SOURCE = gpm-$(GPM_VERSION).tar.bz2
+GPM_SITE = http://www.nico.schottelius.org/software/gpm/archives/
+GPM_LICENSE = GPLv2+
+GPM_LICENSE_FILES = COPYING
+GPM_INSTALL_STAGING = YES
+
+# if not already installed in staging dir, gpm Makefile may fail to find some
+# of the headers needed to generate build dependencies, the first time it is
+# built. CPPFLAGS is used to pass the right include path to dependency rules.
+GPM_CONF_ENV = CPPFLAGS="$(TARGET_CPPFLAGS) -I$(@D)/src/headers/"
+
+# gpm and ncurses have a circular dependency. As gpm function GPM_Wgetch()
+# (requiring ncurses) is not recommended for use by ncurses people themselves
+# and as it's better to have gpm support in ncurses that the contrary, we force
+# gpm to not look after ncurses explicitly.
+# http://invisible-island.net/ncurses/ncurses.faq.html#using_gpm_lib
+GPM_CONF_OPT = --without-curses
+
+# configure is missing but gpm seems not compatible with our autoreconf
+# mechanism so we have to do it manually instead of using GPM_AUTORECONF = YES
+define GPM_RUN_AUTOGEN
+ cd $(@D) && PATH=$(HOST_PATH) ./autogen.sh
+endef
+GPM_POST_PATCH_HOOKS += GPM_RUN_AUTOGEN
+
+GPM_DEPENDENCIES += host-automake host-autoconf host-libtool
+
+ifeq ($(BR2_PACKAGE_GPM_INSTALL_TEST_TOOLS),)
+define GPM_REMOVE_TEST_TOOLS_FROM_TARGET
+ for tools in mev hltest mouse-test display-buttons \
+ get-versions display-coords; do \
+ rm -f $(TARGET_DIR)/usr/bin/$$tools ; \
+ done
+endef
+GPM_POST_INSTALL_TARGET_HOOKS += GPM_REMOVE_TEST_TOOLS_FROM_TARGET
+endif
+
+define GPM_INSTALL_GPM_ROOT_CONF_ON_TARGET
+ $(INSTALL) -m 0644 -D $(@D)/conf/gpm-root.conf $(TARGET_DIR)/etc/
+endef
+
+GPM_POST_INSTALL_TARGET_HOOKS += GPM_INSTALL_GPM_ROOT_CONF_ON_TARGET
+
+$(eval $(autotools-package))
OpenPOWER on IntegriCloud