Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 780432

Summary: [PATCH] app-office/libreoffice-7.1.2.2: configure error when /bin/sh != bash
Product: Gentoo Linux Reporter: Matt Whitlock <gentoo>
Component: Current packagesAssignee: Gentoo Office Team <office>
Status: RESOLVED FIXED    
Severity: normal CC: gentoo
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=142335
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 526268    
Attachments: libreoffice-7.1.2.2-configure-bashism.patch

Description Matt Whitlock 2021-04-05 18:22:00 UTC
Created attachment 697785 [details, diff]
libreoffice-7.1.2.2-configure-bashism.patch

LibreOffice's configure.ac contains a Bashism (use of == operator with 'test' built-in). Thus, configure emits an error when /bin/sh is not Bash. This doesn't cause the build to fail outright, but it may be causing misdetection of features.

if test -z "$enable_community_flavor" -o "$enable_community_flavor" == "yes"; then

checking whether to build a Community flavor... ./configure: 10592: test: unexpected operator
no

The attached patch removes the Bashism and allows app-office/libreoffice-7.1.2.2 to configure without error when /bin/sh is Dash.
Comment 1 Andreas Sturmlechner gentoo-dev 2021-05-05 00:44:49 UTC
This appears to be still the case in git master. Would you send your fix upstream?
Comment 2 Matt Whitlock 2021-05-17 16:21:28 UTC
(In reply to Andreas Sturmlechner from comment #1)
> This appears to be still the case in git master. Would you send your fix
> upstream?

https://bugs.documentfoundation.org/show_bug.cgi?id=142335
Comment 3 Andreas Sturmlechner gentoo-dev 2021-05-21 14:12:49 UTC
Thanks for taking it upstream, will backport to 7.1.
Comment 4 Larry the Git Cow gentoo-dev 2021-05-21 14:28:41 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed90a6e8daf6a9ec03b4c62e9d17ee7422a6cc0c

commit ed90a6e8daf6a9ec03b4c62e9d17ee7422a6cc0c
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-05-21 14:19:47 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-05-21 14:21:19 +0000

    app-office/libreoffice: Fix configure.ac bashism
    
    Upstream commit 2c4dd73c4c9f471fa2083f9f99dd27a7148f3175
    
    Thanks-to: Matt Whitlock <gentoo@mattwhitlock.name>
    Closes: https://bugs.gentoo.org/780432
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 .../files/libreoffice-7.1.3.2-bashism.patch        | 33 ++++++++++++++++++++++
 app-office/libreoffice/libreoffice-7.1.3.2.ebuild  |  3 ++
 2 files changed, 36 insertions(+)