* [ptxdist] [PATCH v2] libpaper: Make the default paper configurable
@ 2019-01-08 7:47 Juergen Borleis
2019-01-08 7:47 ` Juergen Borleis
0 siblings, 1 reply; 2+ messages in thread
From: Juergen Borleis @ 2019-01-08 7:47 UTC (permalink / raw)
To: ptxdist
Change since v1:
- instead of '--with-paper' the new options is now called
'--with-default-paper' like Roland suggested.
Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 2+ messages in thread
* [ptxdist] [PATCH v2] libpaper: Make the default paper configurable
2019-01-08 7:47 [ptxdist] [PATCH v2] libpaper: Make the default paper configurable Juergen Borleis
@ 2019-01-08 7:47 ` Juergen Borleis
0 siblings, 0 replies; 2+ messages in thread
From: Juergen Borleis @ 2019-01-08 7:47 UTC (permalink / raw)
To: ptxdist
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-08 7:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-08 7:47 [ptxdist] [PATCH v2] libpaper: Make the default paper configurable Juergen Borleis
2019-01-08 7:47 ` Juergen Borleis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox