Bug 239509 - multimedia/ffmpeg: Fix build dependencies and minor clean-up
Summary: multimedia/ffmpeg: Fix build dependencies and minor clean-up
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-multimedia (Nobody)
URL:
Keywords:
Depends on:
Blocks: 205250
  Show dependency treegraph
 
Reported: 2019-07-29 08:26 UTC by Daniel Engberg
Modified: 2019-07-29 19:58 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (multimedia)
diizzy: maintainer-feedback+
diizzy: merge-quarterly?


Attachments
v1 (17.21 KB, patch)
2019-07-29 08:26 UTC, Daniel Engberg
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Engberg freebsd_committer freebsd_triage 2019-07-29 08:26:51 UTC
Created attachment 206135 [details]
v1

Only require NASM on i386 and amd64
Strip -O2 when enabling OPTIMIZED_CFLAGS to avoid setting multiple -O FLAGS

Compile and Run-time tested on:
aarch64, Orange Pi PC2, 13.0-CURRENT
armv7, Orange Pi PC, 13.0-CURRENT
amd64, Dell T20 (Intel i7-3770), 13.0-CURRENT
Comment 1 Jan Beich freebsd_committer freebsd_triage 2019-07-29 16:26:47 UTC
(In reply to daniel.engberg.lists from comment #0)
> Only require NASM on i386 and amd64

Not optimal. nasm is used on amd64 and i386 and GNU as elsewhere. Some architectures (e.g., sparc64, mips*, riscv*) don't need either.

> Strip -O2 when enabling OPTIMIZED_CFLAGS to avoid setting multiple -O FLAGS

Redundant. -O3 from OPTIMIZED_CFLAGS is passed *after* -O2 from /usr/share/mk/sys.mk.
Comment 2 Daniel Engberg freebsd_committer freebsd_triage 2019-07-29 18:28:24 UTC
Sorry I don't understand what you're trying to say, what do you mean by GNU as elsewhere? Unless I'm reading ffmpeg code wrong it's only required for x86asm so I don't see why we need to build it on other arches. https://github.com/FFmpeg/FFmpeg/blob/release/4.1/configure#L5742

Yes, -O2 it's purely a cosmetic/readability fix but as that considered bad pratice?
Comment 3 Jan Beich freebsd_committer freebsd_triage 2019-07-29 19:23:15 UTC
(In reply to daniel.engberg.lists from comment #2)
> what do you mean by GNU as elsewhere?

When building on aarch64 without devel/binutils:

  ===>  Configuring for ffmpeg-4.2,1
  GNU assembler not found, install/update gas-preprocessor

which is under the following conditional in configure:

  if enabled_any arm aarch64 || enabled_all ppc altivec && enabled asm; then

Do you see x86 there?

> Yes, -O2 it's purely a cosmetic/readability fix
> but as that considered bad pratice?

Cosmetic changes unnecessarily complicate maintenance. .include <bsd.port.options.mk> is also unnecessary given -O2 comes from sys.mk, not bsd.port.mk. And ${CFLAGS:S/-O2//g} maybe better spelled as ${CFLAGS:N-O*}.
Comment 4 commit-hook freebsd_committer freebsd_triage 2019-07-29 19:25:06 UTC
A commit references this bug:

Author: jbeich
Date: Mon Jul 29 19:24:32 UTC 2019
New revision: 507589
URL: https://svnweb.freebsd.org/changeset/ports/507589

Log:
  multimedia/ffmpeg: both nasm and as(1) are not used

  powerpcspe doesn't support AltiVec unlike powerpc or powerpc64.

  PR:		239509

Changes:
  head/multimedia/ffmpeg/Makefile
Comment 5 Daniel Engberg freebsd_committer freebsd_triage 2019-07-29 19:58:26 UTC
Ahh, now I see what you mean. Thanks