Bug 218562 - graphics/dri: typo in BSD sed fix from Mesa 17.1
Summary: graphics/dri: typo in BSD sed fix from Mesa 17.1
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-x11 (Nobody)
URL: https://lists.freedesktop.org/archive...
Keywords: patch, regression
Depends on: 218799
Blocks: 217016
  Show dependency treegraph
 
Reported: 2017-04-11 09:51 UTC by Jan Beich
Modified: 2017-05-12 18:54 UTC (History)
1 user (show)

See Also:
rezny: maintainer-feedback+


Attachments
v0 (2.70 KB, patch)
2017-04-11 09:51 UTC, Jan Beich
no flags Details | Diff
v1 (5.12 KB, patch)
2017-04-11 10:27 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 Jan Beich freebsd_committer 2017-04-11 09:51:51 UTC
Created attachment 181681 [details]
v0

Despite discussion in bug 217016 my patch there was discarded in favor of manually backporting upstream change and making the same mistake upstream did. configure.ac has to be preprocessed by autoconf in order to remove extra [...] symbols used for quoting character list. Doing so would properly strip -f* flags including -fno-exceptions.

  $ llvm-config40 --cxxflags | sed -E ... -e 's/[[[:space:]]]+-f[[^[:space:]]]*//g' ...

vs.

  $ llvm-config40 --cxxflags | sed -E ... -e 's/[[:space:]]+-f[^[:space:]]*//g' ...
Comment 1 Jan Beich freebsd_committer 2017-04-11 10:10:53 UTC
FYI, proper fix for DragonFly (and OS X) got stalled on review.

https://lists.freedesktop.org/archives/mesa-dev/2017-March/148950.html

(In reply to Jan Beich from comment #0)
> making the same mistake upstream did

s/upstream/upstream reviewer/
Comment 2 Jan Beich freebsd_committer 2017-04-11 10:27:49 UTC
Created attachment 181684 [details]
v1

(In reply to Jan Beich from comment #1)
> FYI, proper fix for DragonFly (and OS X) got stalled on review.

Nevermind, I've included the upstream fix. It survived poudriere and sed(1) on FreeBSD 9.x which is close to DragonFly.

https://cgit.freedesktop.org/mesa/mesa/commit/?id=62c48ccb413b
https://cgit.freedesktop.org/mesa/mesa/commit/?id=bd6f0dcafce7
Comment 3 Matthew Rezny freebsd_committer 2017-04-11 17:18:46 UTC
*Sigh* I put back the stripping of -fno-exceptions because that seemed necessary due to the imperfect sed action in post-patch, then figured I might as well backport that sed change from 17.1 since it's in the same place. I made the change in configure first, then configure.ac and counted more brackets, so go add some in configure thinking I must have missed copying everything the first time, and somehow that all does work with -march present. I should have just left well enough alone with [:graph:] there....

Thanks for providing a standalone diff that can easily be applied without other changes. Since this is only a build fix (if there are any build failures) there is no need to bump PORTREVISION.
Comment 4 Jan Beich freebsd_committer 2017-04-11 17:30:44 UTC
PORTREVISION  was bumped out of caution. llvm-config has a bunch of -f* flags that neither Mesa build nor the ports framework passes otherwise.

$ llvm-config40 --cxxflags | sed 'y/ /\n/' | sed '/^-f/!d'
-fno-strict-aliasing
-fno-omit-frame-pointer
-fstack-protector
-fPIC
-fvisibility-inlines-hidden
-fcolor-diagnostics
-ffunction-sections
-fdata-sections
-fno-strict-aliasing
-fno-omit-frame-pointer
-fstack-protector
-fno-exceptions
-fno-rtti
Comment 5 Jan Beich freebsd_committer 2017-04-11 17:33:25 UTC
Nevermind, -fno-omit-frame-pointer was actually from my make.conf (for profiling). The rest are mostly optimizations.
Comment 6 commit-hook freebsd_committer 2017-05-12 18:47:32 UTC
A commit references this bug:

Author: rezny
Date: Fri May 12 18:46:56 UTC 2017
New revision: 440699
URL: https://svnweb.freebsd.org/changeset/ports/440699

Log:
  Consolidate the Mesa ports, update to 17.0.4, and add Wayland option

  * libGL, libEGL, libglesv2, libglapi, and gbm have been moved into mesa-libs,
    graphics/dri has been renamed to mesa-dri, and USE_GL has been adjusted
  * mesa-libs has a new WAYLAND option that enables platform support in libEGL
  * mesa-dri now depends on graphics/s2tc for compressed texture support [1]
  * re-remove obsolete dependency on makedepends [2]
  * correct sed fix backported from 17.1 [3]

  PR:		218799 (exp-run), 212762 [1], 218552 [2], 218562 [3]
  Submitted by:	dbn [1], jbeich [2,3]
  Reported by:	afiskon@devzen.ru [1]
  Reviewed by:	kwm, johalun0@gmail.com
  Approved by:	portmgr, swills (mentor)
  Differential Revision:  https://reviews.freebsd.org/D10448

Changes:
  head/MOVED
  head/Mk/Scripts/qa.sh
  head/Mk/bsd.port.mk
  head/Mk/bsd.xorg.mk
  head/emulators/i386-wine/Makefile.i386
  head/emulators/i386-wine-devel/Makefile.i386
  head/graphics/Makefile
  head/graphics/copperspice/Makefile
  head/graphics/dri/
  head/graphics/gbm/
  head/graphics/libEGL/
  head/graphics/libGL/
  head/graphics/libglapi/
  head/graphics/libglesv2/
  head/graphics/libosmesa/Makefile
  head/graphics/mesa-dri/
  head/graphics/mesa-dri/Makefile
  head/graphics/mesa-dri/Makefile.common
  head/graphics/mesa-dri/Makefile.targets
  head/graphics/mesa-dri/distinfo
  head/graphics/mesa-dri/files/
  head/graphics/mesa-dri/files/configure.ac
  head/graphics/mesa-dri/files/patch-configure
  head/graphics/mesa-dri/files/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp
  head/graphics/mesa-dri/pkg-descr
  head/graphics/mesa-libs/
  head/graphics/mesa-libs/Makefile
  head/graphics/mesa-libs/Makefile.common
  head/graphics/mesa-libs/Makefile.targets
  head/graphics/mesa-libs/distinfo
  head/graphics/mesa-libs/files/
  head/graphics/mesa-libs/pkg-descr
  head/graphics/mesa-libs/pkg-plist
  head/graphics/s2tc/Makefile
  head/graphics/wayland/Makefile
  head/graphics/wayland/distinfo
  head/graphics/wayland/files/patch-Makefile.am
  head/graphics/wayland/files/patch-src_wayland-server.c
  head/graphics/wayland/files/patch-src_wayland-shm.c
  head/graphics/wayland/files/patch-tests_connection-test.c
  head/graphics/wayland/files/patch-tests_event-loop-test.c
  head/graphics/wayland/files/patch-tests_os-wrappers-test.c
  head/graphics/wayland/files/patch-tests_queue-test.c
  head/graphics/wayland/files/patch-tests_test-runner.c
  head/lang/clover/Makefile
  head/lang/clover/pkg-descr
  head/lang/clover/pkg-plist
  head/net/tigervnc/Makefile
  head/net/tigervnc-devel/Makefile
  head/science/iboview/Makefile
  head/x11/xorg/Makefile
  head/x11-toolkits/gtkada3/Makefile