Created attachment 177771 [details] Enable OpenOffice to build and install on PowerPC64 Apache OpenOffice officially supports Linux on PPC64, but only supports FreeBSD on x86 (i386 and AMD64). The Makefile script lacks support for PowerPC64 platform. Other build structures encountered issues later in the build process due to lack of support for FreeBSD on PowerPC64. The included patches adds support for building on FreeBSD on PPC64. Patches are against OpenOffice 4.1.3 on ports tree r427743 (2016-12-03). Patching Instructions: - Download and copy patch file to /usr/ports/editors/openoffice-4 - Execute: patch -i enable-powerpc64.patch - Run make The resulting build runs with full functionality. (Tested on a PowerMac G5 Quad "Late 2005")
I'm surprised that you didn't run into any problems with the unxfbsd?.pro glob pattern in the install phase. On amd64 and i386 this matches unixfbsdx.pro and unxfbsdi.pro. I think this is unxfbsdppc64.pro on PowerPC64.
A commit references this bug: Author: truckman Date: Tue Jan 24 02:09:10 UTC 2017 New revision: 432309 URL: https://svnweb.freebsd.org/changeset/ports/432309 Log: Add PowerPC64 support. [1] Add a section to pkg-message mentioning that spell check dictionaries for the desired languages should be installed. [2] PR: 215130, 212103 Submitted by: Curtis Hamilton <hamiltcl@verizon.net> [1] Submitted by: Arrigo Marchiori <ardovm AT yahoo.it> [2] Changes: head/editors/openoffice-4/Makefile head/editors/openoffice-4/files/patch-openoffice4_powerpc64 head/editors/openoffice-4/files/pkg-message.in
In the current release the patch uses "unxfbsdp.pro" vice "unxfbsdppc64.pro" to be consistent with other CPU implementations for FreeBSD. However, you are correct in the 4.2 developer snapshot, "unxfbsdppc64.pro" is used. hopefully, when AOO 4.2 is released, all necessary powerpc64 support should be included. Not sure why it's necessary to use "ppc" or "ppc64" versus "p" since you can only build for one CPU at a time. Differentiating between 32-bit and 64-bit is taken care of in the code. That being said, the solution in the Makefile works regardless of what is used.
A commit references this bug: Author: truckman Date: Tue Jan 31 03:25:01 UTC 2017 New revision: 432895 URL: https://svnweb.freebsd.org/changeset/ports/432895 Log: Upgrade to upstream svn revision r1780246. This incorporates the pointer comparision fixes required to compile with clang 4.0, so delete patch-clang40. Also, patch-lingucomponent_source_spellcheck_spell_sspellimp.cxx has been incorporated upstream. On amd64, clang++ 4.0 uses the MOVAPS SSE instruction to initialize sufficiently large objects returned by the "new" operator. This requires that the object have 16-byte alignment. The FreeBSD malloc() implementation does the correct thing here, but OpenOffice has a couple of internal memory allocator implementations that only align to 8-byte boundaries at most. In addition OpenOffice overrides the new operator to interpose a couple of layers of wrappers. If the --enable-debug option is passed to configure, the wrapper adds 8 to the size passed to the allocator and adds an 8 byte offset to the pointer returned by the allocator to make room for a signature that it adds to the beginning of the memory block (the signature is validated and the inverse transformation is done when the memory is freed). This breaks the proper alignment done by the mamory allocator. Fix these problems by adding an EXTRA_PATCH that teaches the internal OpenOffice memory allocators to do 16-byte alignment and to use a 16-byte offset in the "new" wrapper, and apply this patch on amd64 if clang 4.0 is the system compiler. Pass the --with-alloc=system flag to configure so that the libc version of malloc() is used instead of one of the internal memory allocator implementations. Fix a few mis-sorts in BUILD_DEPENDS and don't list www/p5-libwww twice. Fix a sporadic failure in the clear_001 QA test that occasionally breaks the build. The nominal mutex hold time is 5 seconds, but because it is only checked one per second, the actual time is more likely to be around 6 seconds. When the before time value is subtracted from the after time value, the result might be 7 whole seconds and a large negative number of nanoseconds. Since the pass/fail check only looks at the difference in the seconds fields, it will fail the "< 7" assertion. Relax the assertion to "<= 7" as a quick fix. Add PowerPC64 support. [1] Add a section to pkg-message mentioning that spell check dictionaries for the desired languages should be installed. [2] Various fixes from PR 216245: [3] * Add option for mysql driver, default off. * Poppler is only needed for the optional PDF Import extension (and we only need poppler and not poppler-glib). * The --without-stlport configure flag is not needed. * Pass the -with-build-version flag to configure (but use ${PKGNAME} for completeness instead of just ${PORTNAME}-${PORTVERSION}) * Tweak a comment in the Makefile. PR: 215130, 212103, 216245 Submitted by: Curtis Hamilton <hamiltcl@verizon.net> [1] Submitted by: Arrigo Marchiori <ardovm AT yahoo.it> [2] Submitted by: pfg [3] Changes: head/editors/openoffice-devel/Makefile head/editors/openoffice-devel/distinfo head/editors/openoffice-devel/files/Makefile.others head/editors/openoffice-devel/files/extra-patch-align16 head/editors/openoffice-devel/files/patch-clang40 head/editors/openoffice-devel/files/patch-lingucomponent_source_spellcheck_spell_sspellimp.cxx head/editors/openoffice-devel/files/patch-sal_qa_osl_mutex_osl__Mutex.cxx head/editors/openoffice-devel/files/pkg-message.in