-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
172 lines (145 loc) · 5 KB
/
Makefile
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# $OpenBSD: Makefile,v 1.69 2011/03/29 20:01:43 edd Exp $
COMMENT= audio/video converter and streamer with bktr(4) support
V= 20110306
DISTNAME= ffmpeg-git-${V}
PKGNAME= ffmpeg-${V}
CATEGORIES= graphics multimedia
#MASTER_SITES= http://comstyle.com/source/ \
# http://gormsby.com/downloads/
MASTER_SITES= http://theunixzoo.co.uk/distfiles/
SHARED_LIBS= avcodec 15.0 \
avdevice 4.0 \
avfilter 2.0 \
avformat 14.0 \
avutil 8.0 \
postproc 14.0 \
swscale 3.0
HOMEPAGE= http://ffmpeg.mplayerhq.hu/
MAINTAINER= Brad Smith <[email protected]>
# LGPLv2.1 / GPLv2
PERMIT_PACKAGE_CDROM= patents
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
MODULES= gcc3
MODGCC3_ARCHES= sparc
WANTLIB= SDL X11 Xext Xfixes bz2 c faac gsm m mp3lame ogg \
orc-0.4 pthread schroedinger-1.0>=2 sndio speex theora \
theoradec theoraenc vorbis vorbisenc x264 z
BUILD_DEPENDS= textproc/texi2html
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
BUILD_DEPENDS+= devel/yasm
.endif
LIB_DEPENDS= archivers/bzip2 \
audio/faac \
audio/lame \
audio/libvorbis \
audio/speex \
audio/gsm \
devel/sdl \
multimedia/libtheora \
multimedia/schroedinger>=1.0.10 \
multimedia/x264
# does not compile with asm, we suspect binutils
.if ${MACHINE_ARCH:Mpowerpc}
CONFIGURE_ARGS += --disable-asm
.endif
.if ${MACHINE_ARCH:Marm}
# uses ARM EABI
CONFIGURE_ARGS+= --arch=generic
.endif
# inter-library dependencies for the current configuration
LIBavcodec_EXTRALIBS=-L${LOCALBASE}/lib -lfaac -lgsm -lm -lmp3lame -logg -lorc-0.4 -lschroedinger-1.0 -lspeex -ltheora -lvorbis -lvorbisenc -lx264 -lz -pthread -Wl,-rpath,${LOCALBASE}/lib
LIBavdevice_EXTRALIBS=-L${X11BASE}/lib -lX11 -lXext -lXfixes -lm -lsndio -Wl,-rpath,${LOCALBASE}/lib -Wl,-rpath,${X11BASE}/lib
LIBavfilter_EXTRALIBS=-lm
LIBavformat_EXTRALIBS=-L${LOCALBASE}/lib -lbz2 -lm -Wl,-rpath,${LOCALBASE}/lib
LIBavutil_EXTRALIBS=-lm
LIBpostproc_EXTRALIBS=-lm
LIBswscale_EXTRALIBS=-lm
# configure wants a directory it can execute files in
WRKTMP= ${WRKDIR}/tmp
USE_GMAKE= Yes
CONFIGURE_STYLE= simple
CONFIGURE_ARGS+= ${CONFIGURE_SHARED} \
--cc=${CC} \
--disable-armv5te \
--disable-armv6 \
--disable-armv6t2 \
--disable-armvfp \
--disable-debug \
--disable-indev=jack \
--disable-indev=oss \
--disable-iwmmxt \
--disable-neon \
--disable-optimizations \
--disable-outdev=oss \
--enable-gpl \
--enable-libfaac \
--enable-libgsm \
--enable-libmp3lame \
--enable-libschroedinger \
--enable-libspeex \
--enable-libtheora \
--enable-libvorbis \
--enable-libx264 \
--enable-nonfree \
--enable-postproc \
--enable-pthreads \
--enable-runtime-cpudetect \
--enable-x11grab \
--extra-cflags="-I${LOCALBASE}/include -I${X11BASE}/include" \
--extra-libs="-L${LOCALBASE}/lib -L${X11BASE}/lib" \
--mandir=${PREFIX}/man
CONFIGURE_ENV+= LIBavcodec_EXTRALIBS="${LIBavcodec_EXTRALIBS}" \
LIBavdevice_EXTRALIBS="${LIBavdevice_EXTRALIBS}" \
LIBavfilter_EXTRALIBS="${LIBavfilter_EXTRALIBS}" \
LIBavformat_EXTRALIBS="${LIBavformat_EXTRALIBS}" \
LIBavutil_EXTRALIBS="${LIBavutil_EXTRALIBS}" \
LIBpostproc_EXTRALIBS="${LIBpostproc_EXTRALIBS}" \
LIBswscale_EXTRALIBS="${LIBswscale_EXTRALIBS}" \
TMPDIR=${WRKTMP} \
CPPFLAGS="-I${X11BASE}/include"
VERSION_FLAGS= libavcodec_VERSION=$(LIBavcodec_VERSION) \
libavdevice_VERSION=$(LIBavdevice_VERSION) \
libavfilter_VERSION=$(LIBavfilter_VERSION) \
libavformat_VERSION=$(LIBavformat_VERSION) \
libavutil_VERSION=$(LIBavutil_VERSION) \
libpostproc_VERSION=$(LIBpostproc_VERSION) \
libswscale_VERSION=${LIBswscale_VERSION}
MAKE_ENV= V=1
MAKE_FLAGS= ${VERSION_FLAGS} \
LIBavcodec_EXTRALIBS="-lavutil ${LIBavcodec_EXTRALIBS}" \
LIBavdevice_EXTRALIBS="-lavcodec -lavformat -lavutil ${LIBavdevice_EXTRALIBS}" \
LIBavfilter_EXTRALIBS="-lavcodec -lavutil -lswscale ${LIBavfilter_EXTRALIBS}" \
LIBavformat_EXTRALIBS="-lavcodec -lavutil ${LIBavformat_EXTRALIBS}" \
LIBavutil_EXTRALIBS="${LIBavutil_EXTRALIBS}" \
LIBpostproc_EXTRALIBS="-lavutil ${LIBpostproc_EXTRALIBS}" \
LIBswscale_EXTRALIBS="-lavutil ${LIBswscale_EXTRALIBS}"
FAKE_FLAGS= ${VERSION_FLAGS} \
LDCONFIG=true
.ifdef DEBUG
CONFIGURE_ARGS+=--disable-stripping
.endif
ALL_TARGET= all tools/qt-faststart
# regression tests incompatible with libswscale
#REGRESS_TARGET= codectest
NO_REGRESS= Yes
HTML_DOCS= developer faq ffmpeg ffplay ffprobe ffserver \
general libavfilter
# When you are rolling your distfile, you need to get the version string
# from 'git describe --always' *before* you remove the .git directory.
MAKE_ENV += OBSD_VSTR=git-f4f4e12
post-extract:
@cp -f ${FILESDIR}/sndio_* ${WRKSRC}/libavdevice
pre-configure:
@mkdir -p ${WRKTMP}
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/ffmpeg
${INSTALL_PROGRAM} ${WRKBUILD}/tools/qt-faststart ${PREFIX}/bin
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/ffmpeg
.for doc in ${HTML_DOCS}
${INSTALL_DATA} ${WRKBUILD}/doc/${doc}.html ${PREFIX}/share/doc/ffmpeg
.endfor
${INSTALL_DATA} ${WRKBUILD}/doc/ffserver.conf \
${PREFIX}/share/examples/ffmpeg
.include <bsd.port.mk>