Hi Andrzej,
Il 26/01/2012 15:01, andrzej.pacanow...@tieto.com ha scritto:
Hi guys,
I've been investigating a possibility of LibreOffice cross-compilation for
Linux X-less device(ARM) and use it as document(writer/calc/impress) to pdf
converter.
i'd like to do more or less the same :)
1) Is it possible to compile LO without any graphic library (pure
-headless)? Or how much work would that require?
AFAIK, not at the moment :)
5) If we're about hacking the build process to our needs (removing
dependencies) where should we start?
You can take a look at the embarassing attached patch (should apply to
git master), that breaks compilation btw :), which i'm slowly trying to
figure out how to fix.
You may also want to take a look at this ./autogen.sh invocation where
you probably want to remove all the --without-system-* to reuse existing
system libraries.
./autogen.sh --without-help --without-junit --without-java --disable-epm
--disable-gtk --disable-gtk3 --disable-odk --disable-vba
--disable-mozilla --disable-gstreamer --disable-randr --without-ppds
--without-afms --disable-cairo-canvas --disable-neon --disable-dbus
--disable-systray --disable-mathmldtd --disable-extension-integration
--with-system-libs --without-system-libvisio --without-system-libcmis
--without-system-libwpd --without-system-cppunit --without-system-libwps
--without-system-libwpg --without-system-graphite
--without-system-sampleicc --without-system-redland
--without-system-hunspell --without-system-mythes
--without-system-altlinuxhyph --without-system-lpsolve
--without-system-libexttextcat --without-system-poppler
--enable-headless --disable-postgresql-sdbc
hth
--
Riccardo Magliocchetti
commit 2f8c941f2ddb817ca20b5710a1e1b2bbbc5bd7c3
Author: Riccardo Magliocchetti <riccardo.magliocche...@gmail.com>
Date: Wed Jan 25 10:22:02 2012 +0100
Build hacks #1
Add --enable-headless to try reduce dependencies
diff --git a/configure.in b/configure.in
index 9a348e3..1fc0b0f 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,11 @@ solaris*)
;;
esac
+if test "$enable_headless" = "yes"; then
+ GUI=headless
+ GUIBASE=headless
+fi
+
INPATH=${OUTPATH}${PROEXT}
AC_SUBST(COM)
AC_SUBST(CPU)
@@ -7100,10 +7110,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 +7164,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 +7184,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 +7202,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 +7815,23 @@ if test "x$enable_kde4" = "xyes"; then
fi
AC_SUBST(ENABLE_KDE4)
+ENABLE_HEADLESS=""
+if test "x$enable_headless" = "xyes"; then
+ ENABLE_HEADLESS="TRUE"
+ R="headless"
+ # 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
+AC_SUBST(ENABLE_HEADLESS)
+
if test -z "$R"; then
AC_MSG_RESULT([none])
else
diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk
index 47da575..36e8c2c 100644
--- a/vcl/Module_vcl.mk
+++ b/vcl/Module_vcl.mk
@@ -67,6 +67,12 @@ $(eval $(call gb_Module_add_targets,vcl,\
endif
endif
+ifneq ($(ENABLE_HEADLESS),)
+$(eval $(call gb_Module_add_targets,vcl,\
+ Library_vclplug_svp \
+))
+endif
+
ifeq ($(GUIBASE),aqua)
$(eval $(call gb_Module_add_targets,vcl,\
Package_osx \
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice