mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH 4/4] cmatrix: add new package
Date: Mon, 16 Jun 2014 20:47:58 +0200	[thread overview]
Message-ID: <20140616184758.GB14975@localhost> (raw)
In-Reply-To: <1402862806-7297-4-git-send-email-alex.aring@gmail.com>

On Sun, Jun 15, 2014 at 10:06:46PM +0200, Alexander Aring wrote:
> This is a must have tool for linux hackers. This tool isn't
> cross-compile friendly. The added patch removes the static filename
> check for consolefonts path. This is removed and should handeld by a
> select on KBD_CONSOLEFONTS.
> 
> Another issue is that "make install-data-local" should install fonts
> into consolefonts directory. This is also a static path without a
> ${prefix} variable. This is solved by install the necessary fonts
> manually in targetinstall. Currently there is no X11 font support.

This needs to be fixed. 'make install' fails here with:
[...]/install: cannot create regular file '/usr/share/consolefonts/matrix.fnt': Permission denied
[...]/install: cannot create regular file '/usr/share/consolefonts/matrix.psf.gz': Permission denied

This needs to be patched. Create $(DESTDIR)/usr/share/consolefonts/ and
install the fonts there.

> 
> Signed-off-by: Alexander Aring <alex.aring@gmail.com>
> ---
>  ...emove-check-on-file-and-check-on-mkfontdi.patch | 68 ++++++++++++++++++++++
>  patches/cmatrix-1.2a/autogen.sh                    |  1 +
>  patches/cmatrix-1.2a/series                        |  1 +
>  rules/cmatrix.in                                   | 11 ++++
>  rules/cmatrix.make                                 | 59 +++++++++++++++++++
>  5 files changed, 140 insertions(+)
>  create mode 100644 patches/cmatrix-1.2a/0001-configure-remove-check-on-file-and-check-on-mkfontdi.patch
>  create mode 120000 patches/cmatrix-1.2a/autogen.sh
>  create mode 100644 patches/cmatrix-1.2a/series
>  create mode 100644 rules/cmatrix.in
>  create mode 100644 rules/cmatrix.make
> 
> diff --git a/patches/cmatrix-1.2a/0001-configure-remove-check-on-file-and-check-on-mkfontdi.patch b/patches/cmatrix-1.2a/0001-configure-remove-check-on-file-and-check-on-mkfontdi.patch
> new file mode 100644
> index 0000000..ee3b478
> --- /dev/null
> +++ b/patches/cmatrix-1.2a/0001-configure-remove-check-on-file-and-check-on-mkfontdi.patch
> @@ -0,0 +1,68 @@
> +From 29c8a5853843749a581e839be9bd869e32a85913 Mon Sep 17 00:00:00 2001
> +From: Alexander Aring <alex.aring@gmail.com>
> +Date: Sun, 15 Jun 2014 19:14:30 +0200
> +Subject: [PATCH] configure: remove check on file and check on mkfontdir
> +
> +This patch removes the check on files which should be handled by ptxdist
> +and dependencies. We cannot use a AC_CHECK_FILES on cross compiling.

This patch is not needed, if you set:

CMATRIX_CONF_ENV := \
	$(CROSS_ENV) \
	ac_cv_file__usr_lib_kbd_consolefonts=no \
	ac_cv_file__usr_share_consolefonts=yes \
	ac_cv_file__usr_lib_X11_fonts_misc=no \
	ac_cv_file__usr_X11R6_lib_X11_fonts_misc=no

> +
> +Also drop support for X11 mkfontdir util search.
> +
> +Signed-off-by: Alexander Aring <alex.aring@gmail.com>
> +---
> + configure.in | 39 ---------------------------------------
> + 1 file changed, 39 deletions(-)
> +
> +diff --git a/configure.in b/configure.in
> +index 509f63f..a7611b0 100644
> +--- a/configure.in
> ++++ b/configure.in
> +@@ -81,45 +81,6 @@ else
> +     AC_DEFINE_UNQUOTED(HAVE_CONSOLECHARS, $CONSOLECHARS)
> + fi
> + 
> +-if test x$CONSOLECHARS != x -o x$CONSOLECHARS != x'"$CONSOLECHARS"'; then
> +-     if test x$SETFONT != x -o x$SETFONT != x'"$SETFONT"'; then
> +-
> +-	dnl Now look for the console fonts directory...
> +-	AC_CHECK_FILES([/usr/lib/kbd/consolefonts /usr/share/consolefonts])
> +-
> +-	if test "x$ac_cv_file__usr_lib_kbd_consolefonts" = "xno"; then
> +-	    if test "x$ac_cv_file__usr_share_consolefonts" = "xno"; then
> +-		AC_MSG_WARN([ 
> +-
> +-*** You do not appear to have a consolefonts directory in a standard location
> +-*** (/usr/lib/kbd or /usr/share), even though you appear to have the
> +-*** consolechars and/or setfont command.  The matrix font for the console
> +-*** will not be installed.  This means you will not be able to use the
> +-*** matrix console font (and the -l command line switch) unless the font
> +-*** is located in your current directory when you run CMatrix.
> +-])
> +-	    fi
> +-	fi
> +-     fi
> +-fi 
> +-
> +-
> +-AC_PATH_PROG(MKFONTDIR, mkfontdir, "", $PATH:/usr/bin:/usr/bin/X11:/usr/local/bin/X11:/usr/X11R6/bin:/usr/local/bin:/sbin:/usr/sbin)
> +-AC_CHECK_FILES([/usr/lib/X11/fonts/misc /usr/X11R6/lib/X11/fonts/misc])
> +-
> +-if test "x$ac_cv_file__usr_lib_X11_fonts_misc" = "xno"; then
> +-    if test "x$ac_cv_file__usr_X11R6_lib_X11_fonts_misc" = "xno"; then
> +-	AC_MSG_WARN([ 
> +-
> +-*** You do not appear to have an X window fonts directory in the standard
> +-*** locations (/usr/lib/X11/fonts/misc or /usr/X11R6/lib/X11/fonts/misc). The
> +-*** mtx.pcf font will not be installed.  This means you will probably not
> +-*** be able to use the mtx fonts in your x terminals, and hence be unable
> +-*** to use the -x command line switch.  Sorry about that...
> +-])
> +-	fi
> +-    fi
> +-
> + dnl Parse any configure options
> + 
> + LIBS="$LIBS $CURSES_LIB"
> +-- 
> +2.0.0
> +
> diff --git a/patches/cmatrix-1.2a/autogen.sh b/patches/cmatrix-1.2a/autogen.sh
> new file mode 120000
> index 0000000..9f8a4cb
> --- /dev/null
> +++ b/patches/cmatrix-1.2a/autogen.sh
> @@ -0,0 +1 @@
> +../autogen.sh
> \ No newline at end of file
> diff --git a/patches/cmatrix-1.2a/series b/patches/cmatrix-1.2a/series
> new file mode 100644
> index 0000000..409d01e
> --- /dev/null
> +++ b/patches/cmatrix-1.2a/series
> @@ -0,0 +1 @@
> +0001-configure-remove-check-on-file-and-check-on-mkfontdi.patch
> diff --git a/rules/cmatrix.in b/rules/cmatrix.in
> new file mode 100644
> index 0000000..d1903ab
> --- /dev/null
> +++ b/rules/cmatrix.in
> @@ -0,0 +1,11 @@
> +## SECTION=shell_and_console

Maybe games is a better section, even if it's not really a game.

> +
> +config CMATRIX
> +	tristate
> +	prompt "cmatrix"
> +	select NCURSES
> +	select KBD
> +	select KBD_SETFONT
> +	select KBD_CONSOLEFONTS
> +	help
> +	  Shows a scrolling 'Matrix' like screen in Linux.
> diff --git a/rules/cmatrix.make b/rules/cmatrix.make
> new file mode 100644
> index 0000000..d4ef7f6
> --- /dev/null
> +++ b/rules/cmatrix.make
> @@ -0,0 +1,59 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2014 by Alexander Aring <aar@pengutronix.de>
> +#
> +# See CREDITS for details about who has contributed to this project.
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_CMATRIX) += cmatrix
> +
> +#
> +# Paths and names
> +#
> +CMATRIX_VERSION	:= 1.2a
> +CMATRIX_MD5	:= ebfb5733104a258173a9ccf2669968a1
> +CMATRIX		:= cmatrix-$(CMATRIX_VERSION)
> +CMATRIX_SUFFIX	:= tar.gz
> +CMATRIX_URL	:= http://www.asty.org/cmatrix/dist/$(CMATRIX).$(CMATRIX_SUFFIX)
> +CMATRIX_SOURCE	:= $(SRCDIR)/$(CMATRIX).$(CMATRIX_SUFFIX)
> +CMATRIX_DIR	:= $(BUILDDIR)/$(CMATRIX)
> +CMATRIX_LICENSE	:= GPLv2
> +

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

and the env as specified above.

> +#
> +# autoconf
> +#
> +CMATRIX_CONF_OPT := \
> +	$(CROSS_AUTOCONF_USR) \
> +	--disable-debug
> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/cmatrix.targetinstall:
> +	@$(call targetinfo)
> +
> +	@$(call install_init, cmatrix)
> +	@$(call install_fixup, cmatrix,PRIORITY,optional)
> +	@$(call install_fixup, cmatrix,SECTION,base)
> +	@$(call install_fixup, cmatrix,AUTHOR,"Alexander Aring <aar@pengutronix.de>")
> +	@$(call install_fixup, cmatrix,DESCRIPTION,missing)
> +
> +	@$(call install_copy, cmatrix, 0, 0, 0755, -, /usr/bin/cmatrix)
> +
> +	@$(call install_copy, cmatrix, 0, 0, 0644, $(CMATRIX_DIR)/matrix.fnt, \
> +		/usr/share/consolefonts/matrix.fnt)
> +	@$(call install_copy, cmatrix, 0, 0, 0644, $(CMATRIX_DIR)/matrix.psf.gz, \
> +		/usr/share/consolefonts/matrix.psf.gz)

You can drop the source path, once you have the new patch I mentioned.

Michael

> +
> +	@$(call install_finish, cmatrix)
> +
> +	@$(call touch)
> +
> +# vim: syntax=make
> -- 
> 2.0.0
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2014-06-16 18:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-15 20:06 [ptxdist] [PATCH 1/4] libusb: fix libusbx to libusb prompt Alexander Aring
2014-06-15 20:06 ` [ptxdist] [PATCH 2/4] protobuf: version bump 2.4.1 -> 2.5.0 Alexander Aring
2014-06-16 19:01   ` Michael Olbrich
2014-06-15 20:06 ` [ptxdist] [PATCH 3/4] kbd: rework and version bump 1.15.2 -> 2.0.1 Alexander Aring
2014-06-15 20:51   ` Alexander Aring
2014-06-16 18:22   ` Michael Olbrich
2014-06-16 19:03     ` Alexander Aring
2014-06-16 19:15       ` Michael Olbrich
2014-06-15 20:06 ` [ptxdist] [PATCH 4/4] cmatrix: add new package Alexander Aring
2014-06-16 18:47   ` Michael Olbrich [this message]
2014-06-16 19:06     ` Alexander Aring
2014-06-16 19:00 ` [ptxdist] [PATCH 1/4] libusb: fix libusbx to libusb prompt Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140616184758.GB14975@localhost \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox