[PATCH] Introduce an --enable-theme="theme1 theme2..." option

Sebastian Spaeth Sebastian at SSpaeth.de
Thu Dec 9 03:23:55 PST 2010


By default, we include all defaults as before, but if given, we can
limit the number of included themes with e.g. --enable-theme="oxygen
tango". This is passed through set_soenv and sets the environment
variable ENABLE_THEMES="...." which can be used by the packimages
makefile in the postprocess repository.

Signed-off-by: Sebastian Spaeth <Sebastian at SSpaeth.de>
---
 configure.in |   28 +++++++++++++++++++++++++++-
 set_soenv.in |    1 +
 2 files changed, 28 insertions(+), 1 deletions(-)

diff --git a/configure.in b/configure.in
index 7fe1e95..8671340 100755
--- a/configure.in
+++ b/configure.in
@@ -487,6 +487,12 @@ AC_ARG_ENABLE(extra-font,
 	[Add extra font content.]),
 ,)
 
+AC_ARG_ENABLE(theme,
+    AS_HELP_STRING([--enable-theme="theme1 theme2..."],
+	[Choose which themes to include. By default all available themes are included.
+         Possible choices: crystal, hicontrast, oxygen, tango.]),
+,)
+
 dnl ---------- Deprecated since 2010-11-05 ----------
 
 AC_ARG_ENABLE(mysql-connector,
@@ -7634,9 +7640,29 @@ else
   SCPDEFS="$SCPDEFS -DWITH_EXTRA_FONT"
 fi
 AC_SUBST(WITH_EXTRA_FONT)
-
 AC_SUBST(SCPDEFS)
 
+dnl ===================================================================
+dnl Test which themes to include
+dnl ===================================================================
+AC_MSG_CHECKING([which themes to include])
+ALL_THEMES="crystal hicontrast oxygen tango"
+if test "z$enable_theme" = "z"; then
+  ENABLE_THEMES=$ALL_THEMES
+  AC_MSG_RESULT([$ENABLE_THEMES])
+else
+  ENABLE_THEMES=""
+  for theme in $enable_theme
+  do
+    ENABLE_THEMES="$ENABLE_THEMES $theme"
+  done
+  AC_MSG_RESULT([$ENABLE_THEMES])
+fi
+AC_SUBST(ENABLE_THEMES)
+
+dnl ===================================================================
+dnl Test whether to enable ActiveX embedding
+dnl ===================================================================
 if test "$_os" = "WINNT"; then
   AC_MSG_CHECKING([whether to enable ActiveX embedding of LibO components])
   if test "$enable_activex_component" = "yes" -o "$enable_activex_component" = "TRUE" -o "$enable_activex_component" = ""; then
diff --git a/set_soenv.in b/set_soenv.in
index cc41e61..4985cb0 100644
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -1694,6 +1694,7 @@ ToFile( "ENABLE_MINIMIZER",   "@ENABLE_MINIMIZER@","e" );
 ToFile( "ENABLE_PRESENTER_SCREEN","@ENABLE_PRESENTER_SCREEN@","e" );
 ToFile( "ENABLE_REPORTBUILDER","@ENABLE_REPORTBUILDER@","e" );
 ToFile( "ENABLE_UNIX_QUICKSTARTER", "@ENABLE_UNIX_QUICKSTARTER@", "e" );
+ToFile( "ENABLE_THEMES",     "@ENABLE_THEMES@","e");
 ToFile( "SYSTEM_JFREEREPORT","@SYSTEM_JFREEREPORT@","e" );
 ToFile( "OOO_JUNIT_JAR",     "@OOO_JUNIT_JAR@",    "e" );
 ToFile( "SAC_JAR",           "@SAC_JAR@",          "e" );
-- 
1.7.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
 filename=0002-Don-t-harcode-list-of-themes-to-process.patch
Content-Description: Against postprocess repo



More information about the LibreOffice mailing list