* [ptxdist] [PATCH] libpaper: Make the default paper configurable
@ 2019-01-04 11:52 Juergen Borleis
2019-01-07 10:53 ` Roland Hieber
0 siblings, 1 reply; 2+ messages in thread
From: Juergen Borleis @ 2019-01-04 11:52 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..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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [ptxdist] [PATCH] libpaper: Make the default paper configurable
2019-01-04 11:52 [ptxdist] [PATCH] libpaper: Make the default paper configurable Juergen Borleis
@ 2019-01-07 10:53 ` Roland Hieber
0 siblings, 0 replies; 2+ messages in thread
From: Roland Hieber @ 2019-01-07 10:53 UTC (permalink / raw)
To: Juergen Borleis; +Cc: ptxdist
Hi Jürgen,
I would suggest --with-default-paper instead of --with-paper, see the
following fixup. Otherwise looks fine to me.
- Roland
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
index 8a71f9009..bcc61dd23 100644
--- 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
@@ -11,7 +11,7 @@ Signed-off-by: Juergen Borleis <juergen@kreuzholzen.de>
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
-index b6e937163775..b8744604629b 100644
+index 5451156fafb5..4f9c53df37eb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,7 +30,14 @@ AC_SUBST(PAPERCONFVAR)
@@ -20,13 +20,13 @@ index b6e937163775..b8744604629b 100644
-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@:>@])],
++AC_ARG_WITH([default-paper],
++ [AS_HELP_STRING([--with-default-paper=@<:@name@:>@], [build with default paper name @<:@default=letter@:>@])],
+ [],
-+ [with_paper=letter])
-+AC_MSG_RESULT([${with_paper}])
++ [with_default_paper=letter])
++AC_MSG_RESULT([${with_default_paper}])
+
-+PAPERSIZE=${with_paper}
++PAPERSIZE=${with_default_paper}
AC_SUBST(PAPERSIZE)
AH_TEMPLATE(PAPERSIZE, [Default paper size])
AC_DEFINE_UNQUOTED(PAPERSIZE, "$PAPERSIZE")
diff --git a/rules/libpaper.make b/rules/libpaper.make
index 453a3aae1..45cd946cc 100644
--- a/rules/libpaper.make
+++ b/rules/libpaper.make
@@ -39,7 +39,7 @@ LIBPAPER_LICENSE_FILES := file://COPYING;md5=0278281246c1e59af1ef0ae1784a4948
LIBPAPER_CONF_TOOL := autoconf
LIBPAPER_CONF_OPT := \
$(CROSS_AUTOCONF_USR) \
- --with-paper=$(PTXCONF_LIBPAPER_SIZE)
+ --with-default-paper=$(PTXCONF_LIBPAPER_SIZE)
#
# ----------------------------------------------------------------------------
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-08 13:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-04 11:52 [ptxdist] [PATCH] libpaper: Make the default paper configurable Juergen Borleis
2019-01-07 10:53 ` Roland Hieber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox