mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Juergen Borleis <jbe@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] libpaper: Make the default paper configurable
Date: Fri,  4 Jan 2019 12:52:39 +0100	[thread overview]
Message-ID: <20190104115239.9102-1-jbe@pengutronix.de> (raw)

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..8a71f9009
--- /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..b8744604629b 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([paper],
++	[AS_HELP_STRING([--with-paper=@<:@name@:>@], [build with default paper name @<:@default=letter@:>@])],
++	[],
++	[with_paper=letter])
++AC_MSG_RESULT([${with_paper}])
++
++PAPERSIZE=${with_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..453a3aae1 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-paper=$(PTXCONF_LIBPAPER_SIZE)
+
 #
 # ----------------------------------------------------------------------------
 # Target-Install
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

             reply	other threads:[~2019-01-04 11:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-04 11:52 Juergen Borleis [this message]
2019-01-07 10:53 ` Roland Hieber

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=20190104115239.9102-1-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