Hello,
I've progressed a bit with X11 / cairo less build. Now everything builds
but somethings chokes in make dev-install:
http://pastebin.com/qsi0wPFR
Where are these missing files listed? I suppose i have to add some
conditionals.
Attached all the changes that i have locally, they are diffed against an
old master and i'd like to have a working build before rebasing.
If someone is so keen to take a look at the patches and point out what
could be improved, uneeded changes (RepositoryModule_ooo.mk?) it'll be
great.
A couple of tests has been disabled because of "no suitable windowing
system found, exiting.\n" error from
vcl/unx/generic/plugadapt/salplug.cxx::CreateSalInstance(). And i
suppose the same error will bite me when i'll try yo run what i have
compiled.
thanks in advance
--
Riccardo Magliocchetti
diff --git a/Module_tail_build.mk b/Module_tail_build.mk
index 362434d..eb16dc3 100644
--- a/Module_tail_build.mk
+++ b/Module_tail_build.mk
@@ -25,7 +25,6 @@
$(eval $(call gb_Module_Module,tail_end))
$(eval $(call gb_Module_add_moduledirs,tail_end,\
- accessibility \
animations \
avmedia \
basctl \
@@ -53,8 +52,6 @@ $(eval $(call gb_Module_add_moduledirs,tail_end,\
lingucomponent \
linguistic \
lotuswordpro \
- MathMLDTD \
- Mesa \
np_sdk \
oox \
package \
@@ -78,7 +75,6 @@ $(eval $(call gb_Module_add_moduledirs,tail_end,\
unoxml \
uui \
vbahelper \
- wizards \
writerfilter \
writerperfect \
xmerge \
@@ -86,6 +82,15 @@ $(eval $(call gb_Module_add_moduledirs,tail_end,\
xmlsecurity \
))
+ifneq ($(GUIBASE),headless)
+$(eval $(call gb_Module_add_targets,tail_end,\
+ accessibility \
+ MathMLDTD \
+ Mesa \
+ wizards \
+))
+endif
+
ifeq ($(MERGELIBS),TRUE)
$(eval $(call gb_Module_add_targets,tail_end,\
Library_merged \
diff --git a/RepositoryModule_ooo.mk b/RepositoryModule_ooo.mk
index 3f0f023..2285176 100644
--- a/RepositoryModule_ooo.mk
+++ b/RepositoryModule_ooo.mk
@@ -29,8 +29,6 @@
$(eval $(call gb_Module_Module,ooo))
$(eval $(call gb_Module_add_moduledirs,ooo,\
- accessibility \
- animations \
basctl \
basebmp \
basegfx \
@@ -50,7 +48,6 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
dtrans \
editeng \
eventattacher \
- extensions \
fileaccess \
filter \
forms \
@@ -61,25 +58,17 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
i18npool \
i18nutil \
idl \
- lingucomponent \
- linguistic \
- lotuswordpro \
- MathMLDTD \
- Mesa \
nlpsolver \
np_sdk \
o3tl \
offapi \
- oovbaapi \
oox \
package \
padmin \
psprint_config \
regexp \
- reportdesign \
sal \
salhelper \
- sane \
sax \
sc \
scaddins \
@@ -95,21 +84,17 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
svx \
sw \
swext \
- twain \
toolkit \
tools \
ucb \
ucbhelper \
udkapi \
- unixODBC \
UnoControls \
unotools \
unoxml \
ure \
uui \
- vbahelper \
vcl \
- wizards \
writerfilter \
writerperfect \
xmerge \
@@ -120,6 +105,26 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
xmlscript \
))
+ifneq ($(GUIBASE),headless)
+$(eval $(call gb_Module_add_moduledirs,ooo,\
+ accessibility \
+ animations \
+ extensions \
+ lingucomponent \
+ linguistic \
+ lotuswordpro \
+ MathMLDTD \
+ Mesa \
+ oovbaapi \
+ reportdesign \
+ sane \
+ twain \
+ unixODBC \
+ vbahelper \
+ wizards \
+))
+endif
+
ifneq ($(SOLAR_JAVA),)
ifneq "$(OOO_JUNIT_JAR)" ""
$(eval $(call gb_Module_add_moduledirs,ooo,\
diff --git a/configure.in b/configure.in
index 9a348e3..2e0f393 100644
--- a/configure.in
+++ b/configure.in
@@ -723,6 +723,11 @@ AC_ARG_ENABLE(kde4,
both KDE3 and KDE4.]),
,)
+AC_ARG_ENABLE(headless,
+ AS_HELP_STRING([--enable-headless],
+ [Disable building of GUIs to reduce dependencies. Useful for server usage.]),
+,)
+
AC_ARG_ENABLE(unix-qstart-libpng,
AS_HELP_STRING([--disable-unix-qstart-libpng],
[On UNIX systems, we have a faster splash app, that can use libpng to
@@ -2935,6 +2940,10 @@ solaris*)
;;
esac
+if test "$enable_headless" = "yes"; then
+ GUIBASE=headless
+fi
+
INPATH=${OUTPATH}${PROEXT}
AC_SUBST(COM)
AC_SUBST(CPU)
@@ -3163,6 +3172,19 @@ else
fi
AC_SUBST(DISABLE_STRIP)
+if test "$enable_headless" = "yes"; then
+ # be sure to do not mess with uneeded stuff
+ test_randr=no
+ test_xrender=no
+ test_cups=no
+ test_fontconfig=yes
+ test_gtk=no
+ build_gstreamer=no
+ test_kde=no
+ test_kde4=no
+ test_unix_quickstarter=no
+fi
+
dnl check for cups support
dnl ===================================================================
if test "$test_cups" = "yes"; then
@@ -7100,10 +7122,14 @@ AC_SUBST(ENABLE_NSPLUGIN)
dnl ***************************************
dnl testing for X libraries and includes...
dnl ***************************************
+WANT_X11="no"
+if test "$_os" != "WINNT" -a "$_os" != "Android" -a "$_os" != "iOS" -a "$enable_headless" !=
"yes"; then
+ WANT_X11="yes"
+fi
if test "$_os" = "Darwin" -a "x$x_includes" = "xno_x_includes"; then
dnl Mac OS X using Aqua graphics. Don't check for X11.
:
-elif test "$_os" != "WINNT" -a "$_os" != "Android" -a "$_os" != "iOS"; then
+elif test WANT_X11 = "yes"; then
AC_PATH_X
AC_PATH_XTRA
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
@@ -7150,7 +7176,7 @@ else
fi
AC_SUBST(XLIB)
-if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "Android" -a "$_os" != "iOS"; then
+if test WANT_X11 = "yes" -a "$_os" != "Darwin"; then
dnl ===================================================================
dnl Check for Composite.h for Mozilla plugin
dnl ===================================================================
@@ -7170,7 +7196,7 @@ dnl ===================================================================
dnl Check for system Xrender
dnl ===================================================================
AC_MSG_CHECKING([whether to use Xrender])
-if test "$test_xrender" = "yes"; then
+if test WANT_X11 = "yes" -a "$test_xrender" = "yes"; then
AC_MSG_RESULT([yes])
AC_CHECK_LIB(Xrender, XRenderQueryVersion, [],
[AC_MSG_ERROR(libXrender not found or functional)], [])
@@ -7188,7 +7214,7 @@ dnl ===================================================================
dnl Check for XRandr
dnl ===================================================================
AC_MSG_CHECKING([whether to enable RandR support])
-if test "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \) ; then
+if test WANT_X11 = "yes" -a "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr"
= "TRUE" \) ; then
if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then
XRANDR_DLOPEN="TRUE"
AC_MSG_RESULT([configured to dlopen libXrandr at runtime])
@@ -7801,6 +7827,16 @@ if test "x$enable_kde4" = "xyes"; then
fi
AC_SUBST(ENABLE_KDE4)
+ENABLE_HEADLESS=""
+if test "x$enable_headless" = "xyes"; then
+ ENABLE_HEADLESS="TRUE"
+ SCPDEFS="$SCPDEFS -DENABLE_HEADLESS"
+ R="headless"
+ # this does not work see hack in Library_vcl.mk
+ AC_DEFINE(HEADLESS)
+fi
+AC_SUBST(ENABLE_HEADLESS)
+
if test -z "$R"; then
AC_MSG_RESULT([none])
else
@@ -9460,7 +9496,7 @@ SYSTEM_CAIRO=""
AC_MSG_CHECKING([whether to use the system cairo])
-if test "$with_system_cairo" = "yes"; then
+if test "$enable_cairo_canvas" = "yes" -a "$with_system_cairo" = "yes"; then
SYSTEM_CAIRO=YES
AC_MSG_RESULT([yes])
@@ -9490,8 +9526,10 @@ else
if test "$ENABLE_LIBRSVG" != NO -o -z "$ENABLE_DIRECTX"; then
BUILD_TYPE="$BUILD_TYPE CAIRO"
fi
- else
- BUILD_TYPE="$BUILD_TYPE CAIRO"
+ else
+ if test "$enable_cairo_canvas" = "yes"; then
+ BUILD_TYPE="$BUILD_TYPE CAIRO"
+ fi
fi
fi
diff --git a/desktop/Module_desktop.mk b/desktop/Module_desktop.mk
index 2765cc9..c1796ba 100644
--- a/desktop/Module_desktop.mk
+++ b/desktop/Module_desktop.mk
@@ -114,6 +114,8 @@ else ifeq ($(OS),ANDROID)
else ifeq ($(OS),IOS)
+else ifeq ($(GUIBASE),headless)
+
else
$(eval $(call gb_Module_add_targets,desktop,\
diff --git a/hwpfilter/Module_hwpfilter.mk b/hwpfilter/Module_hwpfilter.mk
index 461c017..ff1948e 100644
--- a/hwpfilter/Module_hwpfilter.mk
+++ b/hwpfilter/Module_hwpfilter.mk
@@ -31,8 +31,10 @@ $(eval $(call gb_Module_add_targets,hwpfilter,\
Library_hwp \
))
+ifneq ($(GUIBASE),headless)
$(eval $(call gb_Module_add_check_targets,hwpfilter,\
CppunitTest_hwpfilter_test_hwpfilter \
))
+endif
# vim: set noet sw=4 ts=4:
diff --git a/postprocess/packcomponents/makefile.mk b/postprocess/packcomponents/makefile.mk
index 94923a3..9ab503c 100644
--- a/postprocess/packcomponents/makefile.mk
+++ b/postprocess/packcomponents/makefile.mk
@@ -193,7 +193,7 @@ my_components += \
my_components += pythonloader
.ENDIF
-.IF "$(OS)" != "WNT" && "$(OS)" != "MACOSX" && "$(OS)" != "IOS" && "$(OS)" != "ANDROID"
+.IF "$(OS)" != "WNT" && "$(OS)" != "MACOSX" && "$(OS)" != "IOS" && "$(OS)" != "ANDROID" &&
"$(GUIBASE)" != "headless"
my_components += component/desktop/unx/splash/splash
.ENDIF
diff --git a/postprocess/packregistry/makefile.mk b/postprocess/packregistry/makefile.mk
index b542843..843a880 100644
--- a/postprocess/packregistry/makefile.mk
+++ b/postprocess/packregistry/makefile.mk
@@ -312,6 +312,8 @@ MY_FILES_main += \
# ?
.ELIF "$(GUIBASE)" == "android"
# ?
+.ELIF "$(GUIBASE)" == "headless"
+# ?
.ELSE
ERROR : unknown-GUIBASE
.END
diff --git a/toolkit/Library_tk.mk b/toolkit/Library_tk.mk
index 5dee5a9..8dabc0d 100644
--- a/toolkit/Library_tk.mk
+++ b/toolkit/Library_tk.mk
@@ -141,10 +141,12 @@ $(eval $(call gb_Library_add_cxxflags,tk,\
$(gb_OBJCXXFLAGS)))
endif
+ifneq ($(GUIBASE),headless)
ifneq (,$(filter LINUX DRAGONFLY OPENBSD FREEBSD NETBSD, $(OS)))
$(eval $(call gb_Library_add_linked_libs,tk,\
X11 \
))
endif
+endif
# vim: set noet sw=4 ts=4:
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index fa6093e..23ebbc9 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -430,6 +430,64 @@ $(eval $(call gb_Library_use_externals,vcl,\
))
endif
+ifeq ($(GUIBASE),headless)
+$(eval $(call gb_Library_add_cxxflags,vcl,\
+ $$(FREETYPE_CFLAGS) \
+))
+$(eval $(call gb_Library_add_defs,vcl,\
+ -DHEADLESS \
+ -DSAL_DLLPREFIX=\"$(gb_Library_SYSPRE)\" \
+ -DSAL_DLLPOSTFIX=\"$(gb_Library_OOOEXT)\" \
+ -D_XSALSET_LIBNAME=\"$(call gb_Library_get_runtime_filename,spa)\" \
+))
+$(eval $(call gb_Library_add_exception_objects,vcl,\
+ vcl/generic/app/gensys \
+ vcl/generic/app/geninst \
+ vcl/generic/app/gendisp \
+ vcl/generic/print/bitmap_gfx \
+ vcl/generic/print/common_gfx \
+ vcl/generic/print/glyphset \
+ vcl/generic/print/printerjob \
+ vcl/generic/print/psputil \
+ vcl/generic/print/genpspgraphics \
+ vcl/generic/print/genprnpsp \
+ vcl/generic/print/text_gfx \
+ vcl/generic/fontmanager/fontsubst \
+ vcl/generic/glyphs/gcach_ftyp \
+ vcl/generic/glyphs/gcach_layout \
+ vcl/generic/glyphs/gcach_rbmp \
+ vcl/generic/glyphs/glyphcache \
+ vcl/generic/fontmanager/fontcache \
+ vcl/generic/fontmanager/fontconfig \
+ vcl/generic/fontmanager/fontmanager \
+ vcl/generic/fontmanager/helper \
+ vcl/generic/fontmanager/parseAFM \
+ vcl/unx/generic/printer/jobdata \
+ vcl/unx/generic/printer/ppdparser \
+ vcl/unx/generic/plugadapt/salplug \
+ vcl/null/printerinfomanager \
+ vcl/headless/svpbmp \
+ vcl/headless/svpdummies \
+ vcl/headless/svpelement \
+ vcl/headless/svpframe \
+ vcl/headless/svpgdi \
+ vcl/headless/svpinst \
+ vcl/headless/svpdata \
+ vcl/headless/svpprn \
+ vcl/headless/svptext \
+ vcl/headless/svpvd \
+))
+
+$(eval $(call gb_Library_add_linked_libs,vcl,\
+ basebmp \
+))
+
+$(eval $(call gb_Library_use_externals,vcl,\
+ fontconfig \
+ freetype \
+))
+endif
+
ifeq ($(GUIBASE),android)
$(eval $(call gb_Library_add_libs,vcl,\
-llog \
diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk
index 47da575..aad5157 100644
--- a/vcl/Module_vcl.mk
+++ b/vcl/Module_vcl.mk
@@ -67,6 +67,12 @@ $(eval $(call gb_Module_add_targets,vcl,\
endif
endif
+ifeq ($(GUIBASE),headless)
+$(eval $(call gb_Module_add_targets,vcl,\
+ Library_vclplug_svp \
+))
+endif
+
ifeq ($(GUIBASE),aqua)
$(eval $(call gb_Module_add_targets,vcl,\
Package_osx \
diff --git a/vcl/inc/unx/saldata.hxx b/vcl/inc/unx/saldata.hxx
index 591f4f6..fbf3251 100644
--- a/vcl/inc/unx/saldata.hxx
+++ b/vcl/inc/unx/saldata.hxx
@@ -29,6 +29,8 @@
#ifndef _SV_SALDATA_HXX
#define _SV_SALDATA_HXX
+#ifndef HEADLESS
+
// -=-= includes -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#include <signal.h>
#include <unx/salunx.h>
@@ -111,6 +113,8 @@ public:
X11SalData* GetX11SalData();
+#endif
+
#endif // _SV_SALDATA_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/unx/svunx.h b/vcl/inc/unx/svunx.h
index e3ea4cc..36ca677 100644
--- a/vcl/inc/unx/svunx.h
+++ b/vcl/inc/unx/svunx.h
@@ -29,8 +29,10 @@
#ifndef _SVUNX_H
#define _SVUNX_H
+#ifndef HEADLESS
#include <tools/prex.h>
#include <tools/postx.h>
+#endif
#endif
diff --git a/vcl/unx/generic/plugadapt/salplug.cxx b/vcl/unx/generic/plugadapt/salplug.cxx
index 4449914..f16dfeb 100644
--- a/vcl/unx/generic/plugadapt/salplug.cxx
+++ b/vcl/unx/generic/plugadapt/salplug.cxx
@@ -55,7 +55,7 @@ static oslModule pCloseModule = NULL;
static SalInstance* tryInstance( const OUString& rModuleBase )
{
SalInstance* pInst = NULL;
-#ifndef ANDROID
+#if !defined(ANDROID) || !defined(HEADLESS)
// Disable gtk3 plugin load except in experimental mode for now.
if( rModuleBase.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "gtk3" ) ) &&
!officecfg::Office::Common::Misc::ExperimentalMode::get(
comphelper::getProcessComponentContext() ) )
@@ -130,7 +130,7 @@ static SalInstance* tryInstance( const OUString& rModuleBase )
return pInst;
}
-#ifndef ANDROID
+#if !defined(ANDROID) || !defined(HEADLESS)
static DesktopType get_desktop_environment()
{
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index 98bf630..55984b0 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -655,7 +655,7 @@ const PPDParser* PPDParser::getParser( const String& rFile )
PrinterInfoManager& rMgr = PrinterInfoManager::get();
if( rMgr.getType() == PrinterInfoManager::CUPS )
{
-#ifndef ANDROID
+#if !defined(ANDROID) && !defined(HEADLESS)
pNewParser = const_cast<PPDParser*>(static_cast<CUPSManager&>(rMgr).createCUPSParser(
aFile ));
#endif
}
diff --git a/writerfilter/Module_writerfilter.mk b/writerfilter/Module_writerfilter.mk
index a35daa9..aca8f0f 100644
--- a/writerfilter/Module_writerfilter.mk
+++ b/writerfilter/Module_writerfilter.mk
@@ -37,10 +37,16 @@ $(eval $(call gb_Module_add_targets,writerfilter,\
Package_writerfilter_generated \
))
+ifneq ($(GUIBASE),headless)
$(eval $(call gb_Module_add_check_targets,writerfilter,\
CppunitTest_writerfilter_doctok \
CppunitTest_writerfilter_rtftok \
))
+else
+$(eval $(call gb_Module_add_check_targets,writerfilter,\
+ CppunitTest_writerfilter_doctok \
+))
+endif
$(eval $(call gb_Module_add_subsequentcheck_targets,writerfilter,\
JunitTest_writerfilter_complex \
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.