* [Buildroot] [PATCH v2] Add gpm (general purpose mouse) server package
@ 2014-01-28 16:41 julien.boibessot at free.fr
2014-01-28 18:50 ` Yann E. MORIN
0 siblings, 1 reply; 2+ messages in thread
From: julien.boibessot at free.fr @ 2014-01-28 16:41 UTC (permalink / raw)
To: buildroot
From: Julien Boibessot <julien.boibessot@armadeus.com>
Signed-off-by: Julien Boibessot <julien.boibessot@armadeus.com>
Signed-off-by: Romain Naour <romain.naour@openwide.fr>
---
Changes since v1:
- 80x # in gpm.mk banner
- As recommanded by Romain:
* remove possible circular dependancy with ncurses
* don't allow package selection when BR2_PREFER_STATIC_LIB=y
* fixes headers PATH when gpm wants to build its dependancies rules
package/Config.in | 1 +
package/gpm/Config.in | 24 +++++++++++++++++++++++
package/gpm/gpm.mk | 50 +++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 75 insertions(+), 0 deletions(-)
create mode 100644 package/gpm/Config.in
create mode 100644 package/gpm/gpm.mk
diff --git a/package/Config.in b/package/Config.in
index 78c0e06..d52c65e 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -290,6 +290,7 @@ source "package/fmtools/Config.in"
source "package/freescale-imx/Config.in"
source "package/fxload/Config.in"
source "package/gadgetfs-test/Config.in"
+source "package/gpm/Config.in"
source "package/gpsd/Config.in"
source "package/gptfdisk/Config.in"
source "package/gvfs/Config.in"
diff --git a/package/gpm/Config.in b/package/gpm/Config.in
new file mode 100644
index 0000000..d20e392
--- /dev/null
+++ b/package/gpm/Config.in
@@ -0,0 +1,24 @@
+config BR2_PACKAGE_GPM
+ bool "gpm mouse server"
+ depends on !BR2_PREFER_STATIC_LIB
+ help
+ "gpm" means general purpose mouse (server) and provides mouse support
+ for Linux virtual consoles.
+ gpm-root (to draw menus in current virtual console; config file in
+ /etc/gpm-root.conf) and disable-paste (to disable paste buffer for
+ security reasons), will also be installed.
+
+ http://www.nico.schottelius.org/software/gpm/
+
+if BR2_PACKAGE_GPM
+
+config BR2_PACKAGE_GPM_INSTALL_TEST_TOOLS
+ bool "install gpm test tools also"
+ help
+ Install gpm test tools (get-versions, mev, hltest, mouse-test,
+ display-buttons & display-coords).
+
+endif
+
+comment "gpm mouse server needs a toolchain w/ dynamic library"
+ depends on BR2_PREFER_STATIC_LIB
diff --git a/package/gpm/gpm.mk b/package/gpm/gpm.mk
new file mode 100644
index 0000000..2b81e4b
--- /dev/null
+++ b/package/gpm/gpm.mk
@@ -0,0 +1,50 @@
+###############################################################################
+#
+# 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 dependancies, the first time it is
+# built. CPPFLAGS is used to pass the right include PATH to dependancy rules.
+GPM_CONF_ENV = CPPFLAGS="$(TARGET_CPPFLAGS) -I$(@D)/src/headers/"
+
+# gpm and ncurses have a circular dependancy. As gpm function GPM_Wgetch()
+# (requiring ncurses) is not recommanded for use by ncurses people themself 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
+
+# To generate missing configure:
+define GPM_AUTOGEN_CALL
+ cd $(@D); ./autogen.sh
+endef
+
+GPM_PRE_CONFIGURE_HOOKS += GPM_AUTOGEN_CALL
+
+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
+
+ifeq ($(BR2_PACKAGE_GPM_INSTALL_TEST_TOOLS),)
+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))
--
1.7.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH v2] Add gpm (general purpose mouse) server package
2014-01-28 16:41 [Buildroot] [PATCH v2] Add gpm (general purpose mouse) server package julien.boibessot at free.fr
@ 2014-01-28 18:50 ` Yann E. MORIN
0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2014-01-28 18:50 UTC (permalink / raw)
To: buildroot
Julien, All,
On 2014-01-28 17:41 +0100, julien.boibessot at free.fr spake thusly:
> From: Julien Boibessot <julien.boibessot@armadeus.com>
>
> Signed-off-by: Julien Boibessot <julien.boibessot@armadeus.com>
> Signed-off-by: Romain Naour <romain.naour@openwide.fr>
[--SNIP--]
> diff --git a/package/gpm/gpm.mk b/package/gpm/gpm.mk
> new file mode 100644
> index 0000000..2b81e4b
> --- /dev/null
> +++ b/package/gpm/gpm.mk
> @@ -0,0 +1,50 @@
> +###############################################################################
> +#
> +# 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 dependancies, the first time it is
-> dependencies
> +# built. CPPFLAGS is used to pass the right include PATH to dependancy rules.
-> lower-case 'path' (it's not about the PATH environment variable).
-> dependency
> +GPM_CONF_ENV = CPPFLAGS="$(TARGET_CPPFLAGS) -I$(@D)/src/headers/"
> +
> +# gpm and ncurses have a circular dependancy. As gpm function GPM_Wgetch()
-> dependency
Yes. I have been beaten by this in the past. Sigh... :-/
> +# (requiring ncurses) is not recommanded for use by ncurses people themself and
-> recommended
-> themselves
> +# 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
Oh, good to know! :-)
> +GPM_CONF_OPT = --without-curses
> +
> +# To generate missing configure:
> +define GPM_AUTOGEN_CALL
> + cd $(@D); ./autogen.sh
> +endef
> +GPM_PRE_CONFIGURE_HOOKS += GPM_AUTOGEN_CALL
I'd prefer we only generate the configure.ac file, and call our
autoreconf:
GPM_VERSION = 1.20.7
GPM_SOURCE = gpm-$(GPM_VERSION).tar.bz2
GPM_HOME = http://www.nico.schottelius.org/software/gpm/
GPM_SITE = $(GPM_HOME)/archives
define GPM_GENERATE_CONFIGURE_AC
(printf "AC_INIT([gpm],[%s],[%s])\n" "$(GPM_VERSION)" "$(GPM_HOME)"; \
printf "releasedate=%s\n" $(shell grep '^[[:digit:]]' $(@D)doc/changelog | head -n1 | cut -d: -f2)
printf "release=%s\n" "$(GPM_VERSION)"
cat $(@D)/configure.ac.footer
) >$(@D)/configure.ac
endef
GPM_POST_PATCH_HOOKS += GPM_GENERATE_CONFIGURE_AC
GPM_AUTORECONF = YES
> +
> +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
We usually piut the function definition in the corresponding ifeq-block,
the one below for gpm:
> +ifeq ($(BR2_PACKAGE_GPM_INSTALL_TEST_TOOLS),)
> +GPM_POST_INSTALL_TARGET_HOOKS += GPM_REMOVE_TEST_TOOLS_FROM_TARGET
> +endif
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-28 18:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-28 16:41 [Buildroot] [PATCH v2] Add gpm (general purpose mouse) server package julien.boibessot at free.fr
2014-01-28 18:50 ` Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox