[Libreoffice-commits] core.git: config_host.mk.in configure.ac extras/Module_extras.mk scp2/InstallModule_ooo.mk scp2/source

Stephan Bergmann sbergman at redhat.com
Wed May 15 08:15:15 PDT 2013


 config_host.mk.in                  |    1 +
 configure.ac                       |   36 ++++++++++++++++++++++++++++++++++++
 extras/Module_extras.mk            |    2 +-
 scp2/InstallModule_ooo.mk          |    1 +
 scp2/source/ooo/file_extra_ooo.scp |    4 ++++
 5 files changed, 43 insertions(+), 1 deletion(-)

New commits:
commit 0c99c1c2cafabf72b7cb32fc313441e52fd2876a
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed May 15 16:04:31 2013 +0200

    gallery: allow disabling the from-source build in configure
    
    Change-Id: Ic390ceeb9f52953d5dea6999b194956e90eb4629

diff --git a/config_host.mk.in b/config_host.mk.in
index 7f755cd..1b7ee43 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -546,6 +546,7 @@ export WITH_EXTRA_GALLERY=@WITH_EXTRA_GALLERY@
 export WITH_EXTRA_SAMPLE=@WITH_EXTRA_SAMPLE@
 export WITH_EXTRA_TEMPLATE=@WITH_EXTRA_TEMPLATE@
 export WITH_FONTS=@WITH_FONTS@
+export WITH_GALLERY_BUILD=@WITH_GALLERY_BUILD@
 export WITH_GSSAPI=@WITH_GSSAPI@
 export WITH_HELPPACK_INTEGRATION=@WITH_HELPPACK_INTEGRATION@
 export WITH_KRB5=@WITH_KRB5@
diff --git a/configure.ac b/configure.ac
index 62b6315..91737ba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1215,6 +1215,14 @@ AC_ARG_WITH(referenced-git,
     GIT_REFERENCE_SRC=$withval ,
 )
 
+AC_ARG_WITH(galleries,
+    AS_HELP_STRING([--with-galleries],
+        [Specify how galleries should be built. It is possible either to
+         build these internally from source ("build"), or to (optionally
+         download and) unpack them them from a package ("package"), or
+         to disable them ("no")]),
+)
+
 AC_ARG_WITH(theme,
     AS_HELP_STRING([--with-theme="theme1 theme2..."],
         [Choose which themes to include. By default those themes with an '*' are included.
@@ -2201,6 +2209,34 @@ fi
 AC_SUBST(SYSBASE)
 
 dnl ===================================================================
+dnl  Sort out various gallery compilation options
+dnl ===================================================================
+AC_MSG_CHECKING([how to build and package galleries])
+if test -n "${with_galleries}"; then
+    if test "$with_galleries" = "build"; then
+        WITH_GALLERY_BUILD=YES
+        AC_MSG_RESULT([build from source images internally])
+    elif test "$with_galleries" = "package"; then
+        WITH_GALLERY_BUILD=PACKAGE
+        AC_MSG_ERROR([FIXME - implement build from pre-compiled package])
+    elif test "$with_galleries" = "no"; then
+        WITH_GALLERY_BUILD=
+        AC_MSG_RESULT([disable non-internal gallery build])
+    else
+        AC_MSG_ERROR([unknown value --with-galleries=$with_galleries])
+    fi
+else
+   if test $_os != iOS -a $_os != Android; then
+        WITH_GALLERY_BUILD=YES
+        AC_MSG_RESULT([internal src images for desktop])
+   else
+        WITH_GALLERY_BUILD=
+        AC_MSG_RESULT([disable src imgage build for non-desktop])
+   fi
+fi
+AC_SUBST(WITH_GALLERY_BUILD)
+
+dnl ===================================================================
 dnl  Checks if ccache is available
 dnl ===================================================================
 if test "$enable_ccache" = "yes" -o \( "$enable_ccache" = "" -a "$enable_icecream" != "yes" \); then
diff --git a/extras/Module_extras.mk b/extras/Module_extras.mk
index e7a3c0b..b8429d8 100644
--- a/extras/Module_extras.mk
+++ b/extras/Module_extras.mk
@@ -43,7 +43,7 @@ $(eval $(call gb_Module_add_targets,extras,\
 	Package_wordbook \
 ))
 
-ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
+ifeq ($(WITH_GALLERY_BUILD),YES)
 $(eval $(call gb_Module_add_targets,extras,\
 	Gallery_arrows \
 	Gallery_computers \
diff --git a/scp2/InstallModule_ooo.mk b/scp2/InstallModule_ooo.mk
index e37484d..40cdafc 100644
--- a/scp2/InstallModule_ooo.mk
+++ b/scp2/InstallModule_ooo.mk
@@ -69,6 +69,7 @@ $(eval $(call gb_InstallModule_define_if_set,scp2/ooo,\
 	SYSTEM_REDLAND \
 	SYSTEM_SNDFILE \
 	SYSTEM_STDLIBS \
+	WITH_GALLERY_BUILD \
 	WITH_MOZAB4WIN \
 	WITH_MYSPELL_DICTS \
 ))
diff --git a/scp2/source/ooo/file_extra_ooo.scp b/scp2/source/ooo/file_extra_ooo.scp
index f6d731e..65048ec 100644
--- a/scp2/source/ooo/file_extra_ooo.scp
+++ b/scp2/source/ooo/file_extra_ooo.scp
@@ -161,6 +161,8 @@ File gid_File_Extra_Gallroot
     Name = "extras_gallroot.filelist";
 End
 
+#if defined (WITH_GALLERY_BUILD)
+
 GALLERY_FILELIST(arrows)
 GALLERY_FILELIST(computers)
 GALLERY_FILELIST(diagrams)
@@ -173,6 +175,8 @@ GALLERY_FILELIST(symbols)
 GALLERY_FILELIST(transportation)
 GALLERY_FILELIST(txtshapes)
 
+#endif
+
 File gid_File_Extra_Gallmytheme
     Dir = FILELIST_DIR;
     USER_FILE_BODY;


More information about the Libreoffice-commits mailing list