summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config_host.mk.in1
-rw-r--r--configure.ac36
-rw-r--r--extras/Module_extras.mk2
-rw-r--r--scp2/InstallModule_ooo.mk1
-rw-r--r--scp2/source/ooo/file_extra_ooo.scp4
5 files changed, 43 insertions, 1 deletions
diff --git a/config_host.mk.in b/config_host.mk.in
index 7f755cd463b8..1b7ee43f32d2 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 62b6315ec680..91737baffe2f 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 e7a3c0b8da71..b8429d80ff1a 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 e37484d09d77..40cdafc335c7 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 f6d731e51248..65048ec0a280 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;