[Libreoffice-commits] core.git: bin/run bridges/Library_cpp_uno.mk configure.ac distro-configs/LibreOfficeHaiku.conf Makefile.in solenv/gbuild

Kacper Kasper kacperkasper at gmail.com
Mon Feb 19 11:58:33 UTC 2018


 Makefile.in                                |    2 
 bin/run                                    |   22 +++++++++
 bridges/Library_cpp_uno.mk                 |    6 +-
 configure.ac                               |   48 +++++++++++++++++++++
 distro-configs/LibreOfficeHaiku.conf       |   66 +++++++++++++++++++++++++++++
 solenv/gbuild/platform/HAIKU_INTEL_GCC.mk  |   16 +++++++
 solenv/gbuild/platform/HAIKU_X86_64_GCC.mk |   14 ++++++
 solenv/gbuild/platform/com_GCC_defs.mk     |    2 
 8 files changed, 172 insertions(+), 4 deletions(-)

New commits:
commit 60f1490af9b29ac2df8e9e9411e9d41b472f9113
Author: Kacper Kasper <kacperkasper at gmail.com>
Date:   Sun Feb 18 15:15:56 2018 +0100

    Buildsystem changes to recognize Haiku.
    
    Change-Id: I219d556f8e124cfe426cc1ac3c54da34eb7ef790
    Reviewed-on: https://gerrit.libreoffice.org/49925
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/Makefile.in b/Makefile.in
index bedd90a40d18..2b7b4e2a7125 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -59,7 +59,7 @@ else # MAKE_RESTARTS
 all: build
 
 check-if-root:
-	@if test `id -u` = 0 && ! grep -q 'lxc\|docker' /proc/self/cgroup; then \
+	@if test ! `uname` = 'Haiku' && `id -u` = 0 && ! grep -q 'lxc\|docker' /proc/self/cgroup; then \
 		echo; \
 		echo 'No. You make ME a sandwich.'; \
 		echo; \
diff --git a/bin/run b/bin/run
index 7055ffe177b3..51de1f153512 100755
--- a/bin/run
+++ b/bin/run
@@ -53,6 +53,28 @@ elif [ $(uname) = Darwin ]; then
 
     exec ${LO_TRACE} "${exedir}/$@"
 
+elif [ $(uname) = Haiku ]; then
+
+    dir=$(readlink -f "$(pwd)")
+
+    while test ! -d "${dir}/instdir/program" ; do
+        if test "${dir}" = "/"; then
+            echo "error: cannot find \"program\" dir from \"$(pwd)\""
+            exit 1
+        fi
+        dir=$(readlink -f "${dir}/..")
+    done
+
+    exedir="${dir}"/workdir/LinkTarget/Executable
+    export URE_BOOTSTRAP=file://"${dir}"/instdir/program/fundamentalrc
+    export LIBRARY_PATH=${LIBRARY_PATH:+$LIBRARY_PATH:}"${dir}"/instdir/program
+
+#    echo "setting URE_BOOTSTRAP to: ${URE_BOOTSTRAP}"
+#    echo "setting search path to: ${LIBRARY_PATH}"
+#    echo "execing: ${exedir}/$1"
+
+    exec ${LO_TRACE} "${exedir}/$@"
+
 else
 
     dir=$(readlink -f "$(pwd)")
diff --git a/bridges/Library_cpp_uno.mk b/bridges/Library_cpp_uno.mk
index 11d3ea8808a4..5cc6b247126a 100644
--- a/bridges/Library_cpp_uno.mk
+++ b/bridges/Library_cpp_uno.mk
@@ -81,7 +81,7 @@ endif
 
 else ifeq ($(CPUNAME),INTEL)
 
-ifneq ($(filter ANDROID DRAGONFLY FREEBSD LINUX NETBSD OPENBSD,$(OS)),)
+ifneq ($(filter ANDROID DRAGONFLY FREEBSD LINUX NETBSD OPENBSD HAIKU,$(OS)),)
 bridges_SELECTED_BRIDGE := gcc3_linux_intel
 bridge_asm_objects := call
 bridge_exception_objects := cpp2uno except uno2cpp
@@ -176,7 +176,7 @@ bridge_exception_objects := except
 
 else ifeq ($(CPUNAME),X86_64)
 
-ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD,$(OS)),)
+ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD HAIKU,$(OS)),)
 bridges_SELECTED_BRIDGE := gcc3_linux_x86-64
 bridge_asm_objects := call
 bridge_noncallexception_noopt_objects := callvirtualmethod
@@ -223,7 +223,7 @@ $(eval $(call gb_Library_add_cxxflags,gcc3_uno,\
 	$(if $(filter TRUE,$(HAVE_GCC_AVX)),-mno-avx) \
 ))
 
-ifeq ($(filter ANDROID WNT DRAGONFLY FREEBSD NETBSD OPENBSD MACOSX IOS,$(OS)),)
+ifeq ($(filter ANDROID WNT DRAGONFLY FREEBSD NETBSD OPENBSD MACOSX IOS HAIKU,$(OS)),)
 $(eval $(call gb_Library_add_libs,gcc3_uno,\
 	-ldl \
 ))
diff --git a/configure.ac b/configure.ac
index c40f61b3f1c7..e20e91e7fa42 100644
--- a/configure.ac
+++ b/configure.ac
@@ -786,6 +786,29 @@ linux-android*)
     BUILD_TYPE="$BUILD_TYPE CAIRO FONTCONFIG FREETYPE"
     ;;
 
+haiku*)
+    test_cups=no
+    test_dbus=no
+    test_randr=no
+    test_xrender=no
+    test_freetype=yes
+    test_cairo=yes
+    enable_java=no
+    enable_opengl=no
+    enable_odk=no
+    enable_gconf=no
+    enable_gnome_vfs=no
+    enable_gstreamer=no
+    enable_vlc=no
+    enable_gltf=no
+    enable_collada=no
+    enable_coinmp=no
+    enable_pdfimport=no
+    enable_postgresql_sdbc=no
+    enable_firebird_sdbc=no
+    _os=Haiku
+    ;;
+
 *)
     AC_MSG_ERROR([$host_os operating system is not suitable to build LibreOffice for!])
     ;;
@@ -4020,6 +4043,31 @@ freebsd*)
     esac
     ;;
 
+haiku*)
+    COM=GCC
+    USING_X11=
+    GUIBASE=haiku
+    RTL_OS=Haiku
+    OS=HAIKU
+    P_SEP=:
+
+    case "$host_cpu" in
+    i*86)
+        CPUNAME=INTEL
+        RTL_ARCH=x86
+        PLATFORMID=haiku_x86
+        ;;
+    x86_64|amd64)
+        CPUNAME=X86_64
+        RTL_ARCH=X86_64
+        PLATFORMID=haiku_x86_64
+        ;;
+    *)
+        AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+        ;;
+    esac
+    ;;
+
 kfreebsd*)
     COM=GCC
     USING_X11=TRUE
diff --git a/distro-configs/LibreOfficeHaiku.conf b/distro-configs/LibreOfficeHaiku.conf
new file mode 100644
index 000000000000..6026c7fb5942
--- /dev/null
+++ b/distro-configs/LibreOfficeHaiku.conf
@@ -0,0 +1,66 @@
+--with-vendor=The Document Foundation
+--with-system-libxml
+--with-system-neon
+--with-system-boost
+--with-boost-libdir=/boot/system/lib
+--with-system-clucene
+--with-system-expat
+--with-system-libpng
+--with-system-jpeg
+--with-system-zlib
+--with-system-bzip2
+--with-system-icu
+--with-system-openssl
+--with-system-curl
+--with-system-cppunit
+--with-system-hunspell
+--with-system-altlinuxhyph
+--with-system-lcms2
+--with-system-librevenge
+--with-system-libodfgen
+--with-system-libwpd
+--with-system-libwpg
+--with-system-libwps
+--with-system-libvisio
+--with-system-libcdr
+--with-system-libmspub
+--with-system-libmwaw
+--with-system-libetonyek
+--with-system-libfreehand
+--with-system-libebook
+--with-system-libabw
+--with-system-libpagemaker
+--with-system-libzmf
+--with-system-libstaroffice
+--with-system-libqxp
+--with-system-epoxy
+--with-system-clucene
+--with-system-mdds
+--with-system-glm
+--with-system-openldap
+--with-system-liblangtag
+--with-system-graphite
+--with-system-harfbuzz
+--with-system-nss
+--with-system-lpsolve
+--with-system-orcus
+--with-system-redland
+--with-system-libcmis
+--with-system-cairo
+--with-theme=breeze sifr
+--with-galleries=no
+--without-helppack-integration
+--without-java
+--without-system-jars
+--without-doxygen
+--disable-sdremote
+--disable-gio
+--disable-randr
+--disable-gstreamer-0-10
+--disable-cups
+--disable-ccache
+--disable-postgresql-sdbc
+--disable-lotuswordpro
+--disable-firebird-sdbc
+--disable-cairo-canvas
+--enable-python=no
diff --git a/solenv/gbuild/platform/HAIKU_INTEL_GCC.mk b/solenv/gbuild/platform/HAIKU_INTEL_GCC.mk
new file mode 100644
index 000000000000..5582d2dc8876
--- /dev/null
+++ b/solenv/gbuild/platform/HAIKU_INTEL_GCC.mk
@@ -0,0 +1,16 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+#please make generic modifications to unxgcc.mk
+
+gb_CPUDEFS := -DX86
+
+include $(GBUILDDIR)/platform/unxgcc.mk
+
+# vim: set noet sw=4:
diff --git a/solenv/gbuild/platform/HAIKU_X86_64_GCC.mk b/solenv/gbuild/platform/HAIKU_X86_64_GCC.mk
new file mode 100644
index 000000000000..6199f17b3015
--- /dev/null
+++ b/solenv/gbuild/platform/HAIKU_X86_64_GCC.mk
@@ -0,0 +1,14 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+#please make generic modifications to unxgcc.mk
+
+include $(GBUILDDIR)/platform/unxgcc.mk
+
+# vim: set noet sw=4:
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index 4dc10e5bfccc..ac3cbc366cf7 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -252,6 +252,8 @@ else ifeq ($(OS_FOR_BUILD),WNT)
 # In theory possible if cross-compiling to some Unix from Windows,
 # in practice strongly discouraged to even try that
 gb_Helper_LIBRARY_PATH_VAR := PATH
+else ifeq ($(OS_FOR_BUILD),HAIKU)
+gb_Helper_LIBRARY_PATH_VAR := LIBRARY_PATH
 else
 gb_Helper_LIBRARY_PATH_VAR := LD_LIBRARY_PATH
 endif


More information about the Libreoffice-commits mailing list