mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: ptxdist@pengutronix.de
Cc: Alexander Aring <alex.aring@gmail.com>
Subject: [ptxdist] [PATCH v4 2/4] cmatrix: add new package
Date: Tue, 17 Jun 2014 18:13:19 +0200	[thread overview]
Message-ID: <1403021601-8244-2-git-send-email-alex.aring@gmail.com> (raw)
In-Reply-To: <1403021601-8244-1-git-send-email-alex.aring@gmail.com>

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 <alex.aring@gmail.com>
---
Changes since v4:
 - fix patch subject issues
 \-> the author deleted one of his scripts and will use git format-patch arguments

Changes since v2:
 - Add generate consolefonts directory and $(DESTDIR) in install-data-local
 - change section to games
 - add ac_cv_file_* envs in CMATRIX_CONF_ENV

 ...01-cmatrix-add-DESTDIR-and-drop-X11-fonts.patch | 57 ++++++++++++++++++
 patches/cmatrix-1.2a/autogen.sh                    |  1 +
 patches/cmatrix-1.2a/series                        |  1 +
 rules/cmatrix.in                                   | 11 ++++
 rules/cmatrix.make                                 | 68 ++++++++++++++++++++++
 5 files changed, 138 insertions(+)
 create mode 100644 patches/cmatrix-1.2a/0001-cmatrix-add-DESTDIR-and-drop-X11-fonts.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-cmatrix-add-DESTDIR-and-drop-X11-fonts.patch b/patches/cmatrix-1.2a/0001-cmatrix-add-DESTDIR-and-drop-X11-fonts.patch
new file mode 100644
index 0000000..ea063f8
--- /dev/null
+++ b/patches/cmatrix-1.2a/0001-cmatrix-add-DESTDIR-and-drop-X11-fonts.patch
@@ -0,0 +1,57 @@
+From 01d02698f86db8877c7303501cf5f80e7e9fda64 Mon Sep 17 00:00:00 2001
+From: Alexander Aring <alex.aring@gmail.com>
+Date: Mon, 16 Jun 2014 21:34:27 +0200
+Subject: [PATCH] cmatrix: add DESTDIR and drop X11 fonts
+
+This patch adds $(DESTDIR) for testing if path exists and installpaths.
+Also remove of X11 fonts install.
+
+Signed-off-by: Alexander Aring <alex.aring@gmail.com>
+---
+ Makefile.am | 33 ++++-----------------------------
+ 1 file changed, 4 insertions(+), 29 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 0baa794..051f18b 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -8,32 +8,7 @@ EXTRA_DIST =	AUTHORS COPYING ChangeLog INSTALL NEWS README \
+ 		matrix.psf.gz mtx.pcf cmatrix.1 cmatrix.spec
+ 
+ install-data-local:
+-	@if test -d /usr/share/consolefonts; then \
+-	    echo " Installing matrix fonts in /usr/share/consolefonts..."; \
+-	    $(INSTALL_DATA) $(srcdir)/matrix.fnt /usr/share/consolefonts; \
+-	    $(INSTALL_DATA) $(srcdir)/matrix.psf.gz /usr/share/consolefonts; \
+-	fi
+-	@if test -d /usr/lib/kbd/consolefonts; then \
+-	    echo " Installing matrix fonts in /usr/lib/kbd/consolefonts..."; \
+-	    $(INSTALL_DATA) $(srcdir)/matrix.fnt /usr/lib/kbd/consolefonts; \
+-	    $(INSTALL_DATA) $(srcdir)/matrix.psf.gz /usr/lib/kbd/consolefonts; \
+-	fi
+-	@if test -d /usr/lib/X11/fonts/misc; then \
+-	    echo " Installing X window matrix fonts in /usr/lib/X11/fonts/misc..."; \
+-	    $(INSTALL_DATA) $(srcdir)/mtx.pcf /usr/lib/X11/fonts/misc; \
+-	    $(INSTALL_DATA) $(srcdir)/mtx.pcf /usr/lib/X11/fonts/misc; \
+-	    echo " Running mkfontdir /usr/lib/X11/fonts/misc..."; \
+-	    $(MKFONTDIR) /usr/lib/X11/fonts/misc; \
+-	    echo " Done.  If this is the first time you have installed CMatrix you will"; \
+-	    echo " probably have to restart X window in order to use the mtx.pcf font."; \
+-	else \
+-	if test -d /usr/X11R6/lib/X11/fonts/misc; then \
+-	    echo " Installing X window matrix fonts in /usr/X11R6/lib/X11/fonts/misc..."; \
+-	    $(INSTALL_DATA) $(srcdir)/mtx.pcf /usr/X11R6/lib/X11/fonts/misc; \
+-	    $(INSTALL_DATA) $(srcdir)/mtx.pcf /usr/X11R6/lib/X11/fonts/misc; \
+-	    echo " Running mkfontdir /usr/X11R6/lib/X11/fonts/misc..."; \
+-	    $(MKFONTDIR) /usr/X11R6/lib/X11/fonts/misc; \
+-	    echo " Done.  If this is the first time you have installed CMatrix you will"; \
+-	    echo " probably have to restart X window in order to use the mtx.pcf font."; \
+-	fi \
+-	fi
++	mkdir $(DESTDIR)/usr/share/consolefonts
++	echo " Installing matrix fonts in $(DESTDIR)/usr/share/consolefonts..."; \
++	$(INSTALL_DATA) $(srcdir)/matrix.fnt $(DESTDIR)/usr/share/consolefonts; \
++	$(INSTALL_DATA) $(srcdir)/matrix.psf.gz $(DESTDIR)/usr/share/consolefonts
+-- 
+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..fea47ae
--- /dev/null
+++ b/patches/cmatrix-1.2a/series
@@ -0,0 +1 @@
+0001-cmatrix-add-DESTDIR-and-drop-X11-fonts.patch
diff --git a/rules/cmatrix.in b/rules/cmatrix.in
new file mode 100644
index 0000000..f1323fa
--- /dev/null
+++ b/rules/cmatrix.in
@@ -0,0 +1,11 @@
+## SECTION=games
+
+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..2255c71
--- /dev/null
+++ b/rules/cmatrix.make
@@ -0,0 +1,68 @@
+# -*-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
+# ----------------------------------------------------------------------------
+
+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
+
+#
+# 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, -, /usr/share/consolefonts/matrix.fnt)
+	@$(call install_copy, cmatrix, 0, 0, 0644, -, /usr/share/consolefonts/matrix.psf.gz)
+
+	@$(call install_finish, cmatrix)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.0.0


-- 
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2014-06-17 16:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-17 16:13 [ptxdist] [PATCH v4 1/4] kbd: rework and version bump 1.15.2 -> 2.0.1 Alexander Aring
2014-06-17 16:13 ` Alexander Aring [this message]
2014-06-17 16:13 ` [ptxdist] [PATCH v4 3/4] svgalib: fix library permissions to 0644 Alexander Aring
2014-06-17 16:13 ` [ptxdist] [PATCH v4 4/4] xorg-fonts: fix possible error handling Alexander Aring
2014-06-17 22:44 ` [ptxdist] [PATCH v4 1/4] kbd: rework and version bump 1.15.2 -> 2.0.1 Michael Olbrich
2014-06-20  7:24   ` Alexander Aring

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=1403021601-8244-2-git-send-email-alex.aring@gmail.com \
    --to=alex.aring@gmail.com \
    --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