Subject: pkg/23881: graphics/ffmpeg won't build on FreeBSD -- appendix to PR/23879
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <dotz@irc.pl>
List: netbsd-bugs
Date: 12/25/2003 10:00:57
>Number:         23881
>Category:       pkg
>Synopsis:       graphics/ffmpeg won't build on FreeBSD -- appendix to PR/23879
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 25 10:02:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Michal Pasternak
>Release:        N/A
>Organization:
>Environment:
FreeBSD mainframe.w.lub.pl 4.9-STABLE FreeBSD 4.9-STABLE #0: Tue Dec 23 20:45:53 CET 2003     root@mainframe.w.lub.pl:/usr/obj/usr/src/sys/MP-UX  i386

>Description:
On FreeBSD, after correcting the devel/libgetopt's buildlink2.mk (as
described in PR/23880) and patching ffmpeg as described in PR/23879,
problems still persist:

cc -DFFSERVER_CONF=\"/usr/pkg/etc/ffserver.conf\" -O2 -I/usr/pkg/include -Wall -I./libavcodec -I./libav -I/usr/pkg/include  -c -o ffserver.o ffserver.c 
ffserver.c:32: getopt.h: No such file or directory
gmake: *** [ffserver.o] Error 1
*** Error code 2

>How-To-Repeat:

>Fix:
Submitting a patch where previous PR's haven't been commited could
complicate the things a bit, so here's the solution: please change
ffserver's:

	#include <getopt.h>

to:

	#ifndef __FreeBSD__
	#include <getopt.h>
	#else
	#include <unistd.h>
	#endif

Diff -u and save as patches/patch-ab

>Release-Note:
>Audit-Trail:
>Unformatted: