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

Bug 780432

Summary: [PATCH] app-office/libreoffice- configure error when /bin/sh != bash
Product: Gentoo Linux Reporter: Matt Whitlock <gentoo>
Component: Current packagesAssignee: Gentoo Office Team <office>
Severity: normal CC: emily.rowlands+gentoo
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
See Also:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 526268    
Attachments: libreoffice-

Description Matt Whitlock 2021-04-05 18:22:00 UTC
Created attachment 697785 [details, diff]

LibreOffice's 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

The attached patch removes the Bashism and allows app-office/libreoffice- 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?
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):

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

    app-office/libreoffice: Fix bashism
    Upstream commit 2c4dd73c4c9f471fa2083f9f99dd27a7148f3175
    Thanks-to: Matt Whitlock <>
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Andreas Sturmlechner <>

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