Bug 233453 - mail/thunderbird: use textproc/gsed for GNU extensions
Summary: mail/thunderbird: use textproc/gsed for GNU extensions
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks: 229925
  Show dependency treegraph
 
Reported: 2018-11-23 21:34 UTC by Kyle Evans
Modified: 2018-11-26 06:46 UTC (History)
2 users (show)

See Also:


Attachments
svn(1) diff of mail/thunderbird (588 bytes, patch)
2018-11-23 21:34 UTC, Kyle Evans
jbeich: maintainer-approval-
Details | Diff
Replace \S with [^[:space:]] (put under files/ directory) (513 bytes, patch)
2018-11-25 16:21 UTC, Jan Beich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle Evans freebsd_committer 2018-11-23 21:34:14 UTC
Created attachment 199498 [details]
svn(1) diff of mail/thunderbird

Hi,

thunderbird's config script uses GNU extensions, namely: \S. This has gone unnoticed on FreeBSD because it generally works- \S is interpreted as an escape of an ordinary character, resulting in 'S'. Escapes of ordinary characters will be disallowed in future versions of regex(3), thus move to textproc/gsed to do the right thing with this GNU extension.

Thanks,

Kyle Evans
Comment 1 Jan Beich freebsd_committer 2018-11-25 16:21:06 UTC
Created attachment 199545 [details]
Replace \S with [^[:space:]] (put under files/ directory)

Looks like this affects every USE_GECKO port. I'd rather fix sed(1) usage and push it upstream.
Comment 2 Jan Beich freebsd_committer 2018-11-25 23:18:20 UTC
Comment on attachment 199498 [details]
svn(1) diff of mail/thunderbird

This version is non-trivial to upstream as aliases are platform-specific e.g., gsed binary doesn't exist on GNU platforms. BSD regex/sed is also used on OpenBSD which probably have the same issue (but not the error).
Comment 3 Jan Beich freebsd_committer 2018-11-26 00:12:42 UTC
Comment on attachment 199545 [details]
Replace \S with [^[:space:]] (put under files/ directory)

> +ac_configure_args="`echo $ac_configure_args | sed -e 's/--with-system-nspr[^[:space:]]* *//'`"

Doh, [ and ] have to be escaped in autoconf e.g., [^[:space:]] -> [[^[:space:]]].
Comment 4 commit-hook freebsd_committer 2018-11-26 06:45:07 UTC
A commit references this bug:

Author: jbeich
Date: Mon Nov 26 06:45:00 UTC 2018
New revision: 485923
URL: https://svnweb.freebsd.org/changeset/ports/485923

Log:
  gecko: unbreak with more strict regex(3) on FreeBSD 13

  In file included from ../.build/dom/workers/Unified_cpp_dom_workers0.cpp:11:
  dom/workers/ChromeWorkerScope.cpp:56:10: error: use of undeclared identifier 'JS_InitCTypesClass'
      if (!JS_InitCTypesClass(aCx, aGlobal) ||
           ^
  dom/workers/ChromeWorkerScope.cpp:61:18: error: unknown type name 'JSCTypesCallbacks'
      static const JSCTypesCallbacks callbacks = {
                   ^

  PR:		233453
  Reported by:	kevans

Changes:
  head/mail/thunderbird/files/patch-bug1509757
  head/www/firefox/files/patch-bug1509757
  head/www/firefox-esr/files/patch-bug1509757
  head/www/palemoon/files/patch-bug1509757
  head/www/seamonkey/files/patch-bug1509757