Bug 209380

Summary: math/octave-forge-video: Update to 1.2.2
Product: Ports & Packages Reporter: Ben Woods <woodsb02>
Component: Individual Port(s)Assignee: Stephen Montgomery-Smith <stephen>
Status: Closed FIXED    
Severity: Affects Only Me CC: marino, stephen, woodsb02
Priority: --- Keywords: patch
Version: LatestFlags: bugzilla: maintainer-feedback? (stephen)
Hardware: Any   
OS: Any   
URL: https://sourceforge.net/p/octave/video/ci/1.2.2/tree/NEWS
Bug Depends on:    
Bug Blocks: 207547    
Attachments:
Description Flags
Patch to update math/octave-forge-video to 1.2.2
woodsb02: maintainer-approval? (stephen)
QA: Successful poudriere testport logs for math/octave-forge-video 1.2.2 against FFmpeg 3.0.1 (from PR 207547) on FreeBSD 11-current amd64 none

Description Ben Woods freebsd_committer freebsd_triage 2016-05-08 15:41:43 UTC
Created attachment 170118 [details]
Patch to update math/octave-forge-video to 1.2.2

math/octave-forge-video:
- Update to 1.2.2
- This new version also allows octave-forge-video to build successfully once multimedia/ffmpeg is updated to 3.0.x. Note that multimedia/ffmpeg is currently still on the 2.8.x branch, however this update is backwards compatible with ffmpeg 2.8.x.
- Add CPPFLAGS+=-I${LOCALBASE}/include to allow build to find ffmpeg headers

  Changes this release:
    https://sourceforge.net/p/octave/video/ci/1.2.2/tree/NEWS
Comment 1 Ben Woods freebsd_committer freebsd_triage 2016-05-08 15:43:00 UTC
Created attachment 170119 [details]
QA: Successful poudriere testport logs for math/octave-forge-video 1.2.2 against FFmpeg 3.0.1 (from PR 207547) on FreeBSD 11-current amd64
Comment 2 commit-hook freebsd_committer freebsd_triage 2016-05-08 17:48:19 UTC
A commit references this bug:

Author: stephen
Date: Sun May  8 17:47:34 UTC 2016
New revision: 414813
URL: https://svnweb.freebsd.org/changeset/ports/414813

Log:
  - Update to 1.2.2.
  - This new version also allows octave-forge-video to build successfully once
  multimedia/ffmpeg is updated to 3.0.x. Note that multimedia/ffmpeg is
  currently still on the 2.8.x branch, however this update is backwards
  compatible with ffmpeg 2.8.x.
  - Add CPPFLAGS+=-I${LOCALBASE}/include to allow build to find ffmpeg headers.

  PR:		ports/209380
  Submitted by:	Ben Woods <woodsb02@gmail.com>

Changes:
  head/math/octave-forge-video/Makefile
  head/math/octave-forge-video/distinfo
Comment 3 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2016-05-08 17:49:04 UTC
Committed.  Thank you very much.
Comment 4 John Marino freebsd_committer freebsd_triage 2016-05-24 06:24:24 UTC
The fix is not complete.
To be fully correct, it also needs "LDFLAGS+= -L${LOCALBASE}/lib
Not all compilers automatically search /usr/local/lib for libraries.

See fail log excerpt before I locally added that line:

checking for pthread_create in -lpthread... yes
checking for av_mallocz in -lavutil... no
configure: error: Octave-Forge video package requires libavutil from FFmpeg
===>  Script "configure" failed unexpectedly.
Please report the problem to stephen@FreeBSD.org [maintainer] and attach the
"/wrkdirs/math/octave-forge-video/video-1.2.2/src/config.log" including the
output of the failure of your make command. Also, it might be a good idea to
provide an overview of all packages installed on your system (e.g. a
/usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1
Comment 5 Ben Woods freebsd_committer freebsd_triage 2016-05-24 06:59:20 UTC
Thanks for finding that John. What version of FreeBSD are you seeing that failure on?

In this case, we should remove the new CPPFLAGS+= line and replace it with USES=localbase which will add both CPPFLAGS and LDFLAGS.
Comment 6 John Marino freebsd_committer freebsd_triage 2016-05-24 07:06:30 UTC
Not FreeBSD, DragonFly, which has a base compiler that doesn't look in /usr/local by default.

I'm very wary of USES=localbase.

When it first appeared, it was meant to address a specific linking issue (and the approach was questionable).  It was never advertised as a shortcut for include/linker flags to ${LOCALBASE}

In any case, I think it's use needs to be clarified b/c I have a gut feeling it's being abused (used beyond it's original purpose), e.g. , since ports installs in the localbase, how come every port doesn't have USES=localbase set by default internally?
Comment 7 John Marino freebsd_committer freebsd_triage 2016-05-24 07:07:34 UTC
FYI, the key is "-isystem".

That's not correct by default, so using USE=localbase automatically as a flag replacement is probably wrong.
Comment 8 commit-hook freebsd_committer freebsd_triage 2016-05-25 23:53:00 UTC
A commit references this bug:

Author: stephen
Date: Wed May 25 23:52:10 UTC 2016
New revision: 415869
URL: https://svnweb.freebsd.org/changeset/ports/415869

Log:
  - Add localbase to ldflags so that it will build with dragonfly.

  PR:		ports/209380
  Submitted by:	John Marino <marino@FreeBSD.org>

Changes:
  head/math/octave-forge-video/Makefile
Comment 9 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2016-05-25 23:53:57 UTC
Committed John Marino's suggestion.  Thank you.