Bug 237171

Summary: multimedia/libva: fix build with GCC-based architectures
Product: Ports & Packages Reporter: Piotr Kubaj <pkubaj>
Component: Individual Port(s)Assignee: Jan Beich <jbeich>
Status: Closed FIXED    
Severity: Affects Only Me CC: linimon, pkubaj
Priority: --- Flags: jbeich: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch jbeich: maintainer-approval-

Description Piotr Kubaj freebsd_committer freebsd_triage 2019-04-10 03:43:31 UTC
Created attachment 203551 [details]
patch

Since last update, this port uses C11, so add USES=compiler:c11 to fix build.

Tested on powerpc64 and amd64.
Comment 1 Jan Beich freebsd_committer freebsd_triage 2019-04-10 11:29:26 UTC
Comment on attachment 203551 [details]
patch

Building with GCC 4.2 fails due C99 "for" loop syntax. For USES=compiler:c11 to default to C11 would require GCC >= 5.0.

../va/va_trace.c: In function 'va_TraceVAEncMiscParameterBuffer':
../va/va_trace.c:3309: error: 'for' loop initial declaration used outside C99 mode
http://pylon.nyi.freebsd.org/data/head-powerpc64-default/p498440_s346039/logs/errors/libva-2.4.1.log

Sorry but the next time I'll blindly reject your patches unless you quote error message and maybe link to/attach build log. Trying to trick maintainers into accepting a fix doesn't qualify as review.
Comment 2 commit-hook freebsd_committer freebsd_triage 2019-04-10 11:52:36 UTC
A commit references this bug:

Author: jbeich
Date: Wed Apr 10 11:52:07 UTC 2019
New revision: 498559
URL: https://svnweb.freebsd.org/changeset/ports/498559

Log:
  multimedia/libva: unbreak on GCC architectures after r498397

  ../va/va_trace.c: In function 'va_TraceVAEncMiscParameterBuffer':
  ../va/va_trace.c:3309: error: 'for' loop initial declaration used outside C99 mode

  PR:		237171
  Reported by:	pkg-fallout

Changes:
  head/multimedia/libva/Makefile
  head/multimedia/libva/distinfo
Comment 3 Jan Beich freebsd_committer freebsd_triage 2019-04-10 11:53:56 UTC
Thanks for bringing the bustage to my attention. I wish pkg-fallout@ would notify me about my ports.
https://lists.freebsd.org/pipermail/freebsd-ports/2017-July/109503.html