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.

Signed-off-by: Alexander Aring <[email protected]>
---
 ...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 <[email protected]>
+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.
+
+Also drop support for X11 mkfontdir util search.
+
+Signed-off-by: Alexander Aring <[email protected]>
+---
+ 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
+
+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 <[email protected]>
+#
+# 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
+
+#
+# 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 
<[email protected]>")
+       @$(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)
+
+       @$(call install_finish, cmatrix)
+
+       @$(call touch)
+
+# vim: syntax=make
-- 
2.0.0


-- 
ptxdist mailing list
[email protected]

Reply via email to