summaryrefslogtreecommitdiff
path: root/multimedia/ffmpeg/Makefile
blob: ac88ad299ecd2a43d41c38ba34d7067f84724e5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# $NetBSD: Makefile,v 1.45 2008/12/02 19:40:43 ahoka Exp $

DISTNAME=	ffmpeg-${DISTVERSION}
PKGNAME=	ffmpeg-${DISTVERSION:S/-//g}
PKGREVISION=	5
CATEGORIES=	multimedia
MASTER_SITES=	${MASTER_SITE_FREEBSD}
EXTRACT_SUFX=	.tar.bz2

MAINTAINER=	ahoka@NetBSD.org
HOMEPAGE=	http://ffmpeg.mplayerhq.hu/
COMMENT=	MPEG decoding, encoding and streaming software

DISTVERSION=	2008-07-27
PKG_DESTDIR_SUPPORT=	user-destdir

HAS_CONFIGURE=	YES
USE_LIBTOOL=	YES
USE_TOOLS+=	gmake texi2html pod2man

REPLACE_PERL+=	doc/texi2pod.pl

SUBST_CLASSES+=		conf
SUBST_STAGE.conf=	post-patch
SUBST_FILES.conf=	ffserver.c
SUBST_SED.conf=		-e 's,/etc/ffserver.conf,${PKG_SYSCONFDIR}/ffserver.conf,g'
SUBST_MESSAGE.conf=	Fixing configuration path.

CONFLICTS+=	ffmpeg-devel-[0-9]*

PLIST_SRC+=	${PKGDIR}/PLIST

CONF_FILES+=	${PREFIX}/share/examples/ffmpeg/ffserver.conf \
		${PKG_SYSCONFDIR}/ffserver.conf

MAKE_ENV+=	EXTRA_LIBS=${LIBGETOPT:Q}
# LOCALBASE=${LOCALBASE:Q}

# Let's not put garbage into /tmp
CONFIGURE_ENV+=		TMPDIR=${WRKDIR:Q}

CONFIGURE_ARGS+=	--mandir=${PREFIX}/${PKGMANDIR} \
			--cc=${CC:Q} \
			--prefix=${PREFIX:Q} \
			--disable-debug \
			--disable-vhook \
			--enable-avfilter \
			--enable-gpl \
			--enable-postproc \
			--enable-pthreads \
			--enable-shared \
			--enable-swscale \
			--enable-libvorbis \
			--enable-libmp3lame \
			--disable-stripping

# causes complaining about being miscompiled
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
CONFIGURE_ARGS+=	--disable-mmx \
			--disable-mmx2 \
			--disable-ssse3
.endif

INSTALLATION_DIRS=	lib share/examples/ffmpeg share/doc/ffmpeg

.include "options.mk"

post-install:
	${INSTALL_DATA} ${WRKSRC}/libavcodec/apiexample.c \
		${DESTDIR}${PREFIX}/share/doc/ffmpeg
	${INSTALL_DATA} ${WRKSRC}/README ${WRKSRC}/doc/TODO \
		${DESTDIR}${PREFIX}/share/doc/ffmpeg
	${INSTALL_DATA} ${WRKSRC}/doc/*.txt ${DESTDIR}${PREFIX}/share/doc/ffmpeg
	${INSTALL_DATA} ${WRKSRC}/doc/ffserver.conf \
		${DESTDIR}${PREFIX}/share/examples/ffmpeg

.include "../../audio/lame/buildlink3.mk"
.include "../../audio/libvorbis/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../devel/libgetopt/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"