From: Juergen Borleis <jbe@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH v2] libpaper: Make the default paper configurable
Date: Tue, 8 Jan 2019 08:47:37 +0100 [thread overview]
Message-ID: <20190108074737.20938-2-jbe@pengutronix.de> (raw)
In-Reply-To: <20190108074737.20938-1-jbe@pengutronix.de>
For embedded systems it makes sense to be able to configure the default
paper name at build-time instead of run-time via environment variable.
The approach currently used in the rule file to configure the paper size
at build-time does not work, since using the environment variable
'PAPERSIZE' only works at run-time.
This change adds a new '--with-paper' configure switch, to be able to
overwrite the default 'letter' setting.
Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
---
.../0001-Make-the-default-paper-configurable.patch | 32 ++++++++++++++++++++++
patches/libpaper-1.1.24+nmu5/series | 4 +++
rules/libpaper.make | 9 +++---
3 files changed, 41 insertions(+), 4 deletions(-)
create mode 100644 patches/libpaper-1.1.24+nmu5/0001-Make-the-default-paper-configurable.patch
create mode 100644 patches/libpaper-1.1.24+nmu5/series
diff --git a/patches/libpaper-1.1.24+nmu5/0001-Make-the-default-paper-configurable.patch b/patches/libpaper-1.1.24+nmu5/0001-Make-the-default-paper-configurable.patch
new file mode 100644
index 000000000..aad9f5a80
--- /dev/null
+++ b/patches/libpaper-1.1.24+nmu5/0001-Make-the-default-paper-configurable.patch
@@ -0,0 +1,32 @@
+From: Juergen Borleis <juergen@kreuzholzen.de>
+Date: Tue, 1 Jan 2019 22:12:43 +0100
+Subject: [PATCH] Make the default paper configurable
+
+For embedded systems it makes sense to be able to configure the default
+paper name at build-time instead of run-time via environment variable.
+
+Signed-off-by: Juergen Borleis <juergen@kreuzholzen.de>
+---
+ configure.ac | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index b6e937163775..34342d1f9295 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -30,7 +30,14 @@ AC_SUBST(PAPERCONFVAR)
+ AH_TEMPLATE(PAPERCONFVAR, [Environment variable that overrides the default configuration file location])
+ AC_DEFINE_UNQUOTED(PAPERCONFVAR, "$PAPERCONFVAR")
+
+-PAPERSIZE=letter
++AC_MSG_CHECKING([which paper format name is the default one])
++AC_ARG_WITH([default-paper],
++ [AS_HELP_STRING([--with-default-paper=@<:@name@:>@], [build with default paper name @<:@default=letter@:>@])],
++ [],
++ [with_default_paper=letter])
++AC_MSG_RESULT([${with_default_paper}])
++
++PAPERSIZE=${with_default_paper}
+ AC_SUBST(PAPERSIZE)
+ AH_TEMPLATE(PAPERSIZE, [Default paper size])
+ AC_DEFINE_UNQUOTED(PAPERSIZE, "$PAPERSIZE")
diff --git a/patches/libpaper-1.1.24+nmu5/series b/patches/libpaper-1.1.24+nmu5/series
new file mode 100644
index 000000000..dcd68e553
--- /dev/null
+++ b/patches/libpaper-1.1.24+nmu5/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-Make-the-default-paper-configurable.patch
+# e6daca9c3e99c1f166eba3ea6dc1961e - git-ptx-patches magic
diff --git a/rules/libpaper.make b/rules/libpaper.make
index 239118165..45cd946cc 100644
--- a/rules/libpaper.make
+++ b/rules/libpaper.make
@@ -33,13 +33,14 @@ LIBPAPER_LICENSE_FILES := file://COPYING;md5=0278281246c1e59af1ef0ae1784a4948
# Prepare
# ----------------------------------------------------------------------------
-LIBPAPER_CONF_ENV := \
- $(CROSS_ENV) \
- PAPERSIZE=$(PTXCONF_LIBPAPER_SIZE)
#
# autoconf
#
-LIBPAPER_CONF_TOOL := autoconf
+LIBPAPER_CONF_TOOL := autoconf
+LIBPAPER_CONF_OPT := \
+ $(CROSS_AUTOCONF_USR) \
+ --with-default-paper=$(PTXCONF_LIBPAPER_SIZE)
+
#
# ----------------------------------------------------------------------------
# Target-Install
--
2.11.0
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
prev parent reply other threads:[~2019-01-08 7:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-08 7:47 Juergen Borleis
2019-01-08 7:47 ` Juergen Borleis [this message]
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=20190108074737.20938-2-jbe@pengutronix.de \
--to=jbe@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