Subject: Re: buildlink3.mk and library dependancies
To: None <tech-pkg@NetBSD.org>
From: None <murray@river-styx.org>
List: tech-pkg
Date: 01/27/2006 10:48:07
------=_20060127104807_37391
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

G'day Bernd,
    This is what I'm thinking and may help illustrate the problem I'm
trying to solve. The included buildlink file is a copy of yours with
an addition from me which is what I'm using to fix my problem. Please
have a look.
    Basically, when I'm using ffmpeg-devel in say, transcode, I need to
patch things to make sure transcode uses these additional link flags
for compiling. This is easy to reproduce. Build ffmpeg-devel with some
PKG_OPTIONS selected. Go to transcode pkg and just run 'make
configure' and bang, you'll see the problem in the config.log and
terminal output. The transcode configure script fails to use
libavcodec (part of ffmpeg) as it needs to know to link libavcodec
against these additional libraries used in the ffmpeg build.

Any ideas using buildlink framework?

Take care,
    Murray Armfield

> On Mon, Jan 23, 2006 at 01:37:30PM +1100, murray@river-styx.org wrote:
>> Hi Folks,
>>     Before I go too far, I am not on this list so please mail me direct
>> as
>> well as the list.
>>
>>     I've been playing around with upgrading ffmpeg and transcode in
>> pkgsrc-wip and I have come across something that I was hoping someone
>> could point me in the right direction for an answer.
>
> This is my version of the ffmpeg package, based on the version used
> by the vlc people.
>
> But I gave up on using vlc, because it has too many problems, compared to
> mplayer.
>
> Bernd
>
>

------=_20060127104807_37391
Content-Type: text/plain; name="buildlink3.mk"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="buildlink3.mk"

# $NetBSD: buildlink3.mk,v 1.2 2004/10/03 00:13:02 tv Exp $

BUILDLINK_DEPTH:=	${BUILDLINK_DEPTH}+
FFMPEG_BUILDLINK3_MK:=	${FFMPEG_BUILDLINK3_MK}+

.if !empty(BUILDLINK_DEPTH:M+)
BUILDLINK_DEPENDS+=	ffmpeg
.endif

BUILDLINK_PACKAGES:=	${BUILDLINK_PACKAGES:Nffmpeg}
BUILDLINK_PACKAGES+=	ffmpeg

.if !empty(FFMPEG_BUILDLINK3_MK:M+)
BUILDLINK_DEPENDS.ffmpeg+=	ffmpeg>=0.4.9.20051126
BUILDLINK_RECOMMENDED.ffmpeg+=	ffmpeg>=0.4.9.20051126
BUILDLINK_PKGSRCDIR.ffmpeg?=	../../multimedia/ffmpeg-devel
.endif	# FFMPEG_BUILDLINK3_MK

.include "../../mk/bsd.prefs.mk"

.if defined(PKG_OPTIONS.ffmpeg)
. if !empty(PKG_OPTIONS.ffmpeg:Ma52)
.  include "../../audio/liba52/buildlink3.mk"
FFMPEG_LIB_LINK+=	-la52
. endif
. if !empty(PKG_OPTIONS.ffmpeg:Mfaad2)
.  include "../../audio/faad2/buildlink3.mk"
FFMPEG_LIB_LINK+=	-lfaad
. endif
. if !empty(PKG_OPTIONS.ffmpeg:Mfaac)
.  include "../../audio/faac/buildlink3.mk"
FFMPEG_LIB_LINK+=	-lfaac
. endif
. if !empty(PKG_OPTIONS.ffmpeg:Mlame)
.  include "../../audio/lame/buildlink3.mk"
FFMPEG_LIB_LINK+=	-lmp3lame
. endif
. if !empty(PKG_OPTIONS.ffmpeg:Mvorbis)
.  include "../../audio/libvorbis/buildlink3.mk"
FFMPEG_LIB_LINK+=	-lvorbis
. endif
.endif

BUILDLINK_DEPTH:=     ${BUILDLINK_DEPTH:S/+$//}
------=_20060127104807_37391--