--- a/Makefile 2015-05-03 02:37:10.000000000 -0400 +++ b/Makefile 2015-05-06 19:06:57.207866000 -0400 @@ -325,6 +325,11 @@ EXTRA_PATCHES+= ${FILESDIR}/extra-configure.ac .endif +.if ${ARCH} == "powerpc64" +EXTRA_PATCHES+= ${FILESDIR}/extra-enable_powerpc64_build +USE_GCC= 4.8+ +.endif + .if ${OSVERSION} < 900506 CONFIGURE_ARGS+= --with-linker-hash-style=sysv .endif diff -urN libreoffice/Makefile.common libreoffice_local/Makefile.common --- libreoffice/Makefile.common 2015-04-25 13:30:29.000000000 -0400 +++ libreoffice_local/Makefile.common 2015-05-06 18:48:00.020953000 -0400 @@ -17,7 +17,7 @@ MASTER_SITES?= http://download.documentfoundation.org/libreoffice/${MASTER_SITE_SUBDIR}/ .endif -ONLY_FOR_ARCH= i386 amd64 +ONLY_FOR_ARCH= i386 amd64 powerpc64 # for dynamic plist generation PLISTD?= ${WRKDIR}/plist_dirs --- a/files/extra-enable_powerpc64_build 1969-12-31 19:00:00.000000000 -0500 +++ b/files/extra-enable_powerpc64_build 2015-05-06 20:13:58.664529000 -0400 @@ -0,0 +1,96 @@ +--- a/bridges/Library_cpp_uno.mk 2015-04-20 15:36:29.000000000 -0400 ++++ b/bridges/Library_cpp_uno.mk 2015-05-06 18:16:35.314879000 -0400 +@@ -119,6 +119,12 @@ + bridge_noopt_objects := except + bridge_exception_objects := cpp2uno uno2cpp + ++else ifeq ($(OS)-$(CPUNAME),FREEBSD-POWERPC64) ++ ++bridges_SELECTED_BRIDGE := gcc3_linux_powerpc64 ++bridge_noopt_objects := cpp2uno uno2cpp ++bridge_exception_objects := except ++ + else ifeq ($(CPUNAME),X86_64) + + ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD,$(OS)),) +--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx 2015-04-20 15:36:29.000000000 -0400 ++++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx 2015-05-06 18:16:35.331133000 -0400 +@@ -17,8 +17,11 @@ + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +- ++#if defined (FREEBSD) || defined(NETBSD) || defined(OPENBSD) || defined(DRAGONFLY) ++#include ++#else + #include ++#endif + + #include + #include +--- a/configure.ac 2015-05-06 18:08:54.099927000 -0400 ++++ b/configure.ac 2015-05-06 18:15:16.156078000 -0400 +@@ -4275,6 +4275,11 @@ + RTL_ARCH=X86_64 + PLATFORMID=freebsd_x86_64 + ;; ++ powerpc64) ++ CPUNAME=POWERPC64 ++ RTL_ARCH=PowerPC_64 ++ PLATFORMID=freebsd_powerpc64 ++ ;; + *) + AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os]) + ;; +--- a/solenv/gbuild/platform/FREEBSD_POWERPC64_GCC.mk 1969-12-31 19:00:00.000000000 -0500 ++++ b/solenv/gbuild/platform/FREEBSD_POWERPC64_GCC.mk 2015-05-06 18:16:35.299362000 -0400 +@@ -0,0 +1,17 @@ ++# -*- 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 += -DPPC ++gb_COMPILERDEFAULTOPTFLAGS := -O2 ++gb_CXXFLAGS += -mminimal-toc ++ ++include $(GBUILDDIR)/platform/unxgcc.mk ++ ++# vim: set noet sw=4: +--- a/testtools/CustomTarget_uno_test.mk 2015-05-06 20:11:22.846110000 -0400 ++++ b/testtools/CustomTarget_uno_test.mk 2015-05-06 20:10:07.369638000 -0400 +@@ -13,17 +13,17 @@ + .PHONY : $(call gb_CustomTarget_get_target,testtools/uno_test) + + $(call gb_CustomTarget_get_target,testtools/uno_test) : \ +- $(call gb_Executable_get_runtime_dependencies,uno) \ +- $(call gb_InternalUnoApi_get_target,bridgetest) \ +- $(call gb_Rdb_get_target,uno_services) \ +- $(call gb_Rdb_get_target,ure/services) \ +- $(call gb_UnoApi_get_target,udkapi) +- $(call gb_Helper_abbreviate_dirs,\ +- $(call gb_Executable_get_command,uno) \ +- -s com.sun.star.test.bridge.BridgeTest \ +- -- com.sun.star.test.bridge.CppTestObject \ +- -env:LO_BUILD_LIB_DIR=$(call gb_Helper_make_url,$(gb_Library_WORKDIR_FOR_BUILD)) \ +- -env:URE_MORE_SERVICES=$(call gb_Helper_make_url,$(call gb_Rdb_get_target,uno_services)) \ +- -env:URE_MORE_TYPES=$(call gb_Helper_make_url,$(WORKDIR)/UnoApiTarget/bridgetest.rdb)) ++# $(call gb_Executable_get_runtime_dependencies,uno) \ ++# $(call gb_InternalUnoApi_get_target,bridgetest) \ ++# $(call gb_Rdb_get_target,uno_services) \ ++# $(call gb_Rdb_get_target,ure/services) \ ++# $(call gb_UnoApi_get_target,udkapi) ++# $(call gb_Helper_abbreviate_dirs,\ ++# $(call gb_Executable_get_command,uno) \ ++# -s com.sun.star.test.bridge.BridgeTest \ ++# -- com.sun.star.test.bridge.CppTestObject \ ++# -env:LO_BUILD_LIB_DIR=$(call gb_Helper_make_url,$(gb_Library_WORKDIR_FOR_BUILD)) \ ++# -env:URE_MORE_SERVICES=$(call gb_Helper_make_url,$(call gb_Rdb_get_target,uno_services)) \ ++# -env:URE_MORE_TYPES=$(call gb_Helper_make_url,$(WORKDIR)/UnoApiTarget/bridgetest.rdb)) + + # vim:set shiftwidth=4 tabstop=4 noexpandtab: