blob: f6e53bc7db41dead667b79bbf0a3297cf23b22c2 (
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
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
|
# $FreeBSD$
PORTREVISION?= 2
AVIDEMUX_VERSION= 2.6.11
MASTER_SITES= \
SF/avidemux/avidemux/${PORTVERSION}
DISTNAME= avidemux_${PORTVERSION}
BUILD_DEPENDS+= yasm:devel/yasm \
bash:shells/bash
LIB_DEPENDS+= libmad.so:audio/libmad \
libdca.so:multimedia/libdca \
libpng.so:graphics/png
LICENSE= GPLv2
USE_GNOME= libxml2
USE_QT4= # empty
OPTIONS_FILE= ${PORT_DBDIR}/${OPTIONS_NAME:C/-.*//}/options
USES= cmake:outsource pkgconfig iconv gmake compiler:features sqlite
USES+= dos2unix execinfo
DOS2UNIX_FILES= cmake/admCheckMiscLibs.cmake
CMAKE_ARGS+= -DGNUMAKE_EXECUTABLE=gmake
CMAKE_ARGS+= -DAVIDEMUX_PACKAGER=none
CMAKE_ARGS+= -DQT5:BOOL=OFF
CXXFLAGS+= -I${LOCALBASE}/include
MAKE_JOBS_UNSAFE= yes
BUILD_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils
CONFIGURE_ENV+= COMPILER_PATH=${LOCALBASE}/bin
MAKE_ENV+= COMPILER_PATH=${LOCALBASE}/bin
OPTIONS_DEFINE= QT4 CLI FREETYPE FONTCONFIG OSS ESOUND JACK \
PULSEAUDIO XVIDEO FAAC FRIBIDI OPUS TWOLAME \
FAAD X264 X265 VPX XVID SDL AMR VORBIS NLS LAME VAAPI VDPAU
OPTIONS_DEFAULT= QT4 FREETYPE FONTCONFIG OSS XVIDEO VPX XVID \
SDL FAAD VDPAU VORBIS
OPTIONS_SUB= yes
CLI_DESC= Build CLI tool
FRIBIDI_CMAKE_OFF= -DFRIDIBI:BOOL=OFF
FRIBIDI_LIB_DEPENDS= libfribidi.so:converters/fribidi
OPUS_CMAKE_OFF= -DOPUS:BOOL=OFF
OPUS_LIB_DEPENDS= libopus.so:audio/opus
TWOLAME_CMAKE_OFF= -DTWOLAME:BOOL=OFF
TWOLAME_LIB_DEPENDS= libtwolame.so:audio/twolame
.if !defined(PACKAGE_BUILDING)
OPTIONS_DEFAULT+= LAME FAAC AMR X264
.endif
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MNLS}
USES+= gettext
PLIST_SUB+= NLS=""
. if ${PORT_OPTIONS:MQT4}
PLIST_SUB+= QT_NLS=""
. else
PLIST_SUB+= QT_NLS="@comment "
. endif
.else
CMAKE_ARGS+= -DNO_NLS:BOOL=ON
PLIST_SUB+= NLS="@comment " QT_NLS="@comment "
.endif
# for libexecinfo: (so that __builtin_frame_address() finds the top
# of the stack)
.if ${ARCH} == "amd64"
CFLAGS+= -fno-omit-frame-pointer
#MAKE_ENV+= ARCH=x86_64
#CONFIGURE_ENV+= ARCH=x86_64
.endif
.if !exists(/usr/lib/libexecinfo.so)
CMAKE_ARGS+= -DLIBEXECINFO_INCLUDE_DIR=${LOCALBASE}/include
CMAKE_ARGS+= -DLIBEXECINFO_LIBRARY_DIR=${LOCALBASE}/lib/libexecinfo.so
.else
CMAKE_ARGS+= -DLIBEXECINFO_INCLUDE_DIR=/usr/include
CMAKE_ARGS+= -DLIBEXECINFO_LIBRARY_DIR=-lexecinfo
.endif
# We haven't ALSA(Never) & Aften(Yet) on FreeBSD
CMAKE_ARGS+= -DARTS:BOOL=OFF -DALSA:BOOL=OFF -DAFTEN:BOOL=OFF
.if empty(PORT_OPTIONS:MGTK3) && empty(PORT_OPTIONS:MQT4)
CMAKE_ARGS+= -DX11:BOOL=OFF
.else
USE_GNOME+= libxslt
.endif
.if ${PORT_OPTIONS:MGTK3}
USE_GNOME+= gnomeprefix gtk30
PLIST_SUB+= GTK=""
.else
CMAKE_ARGS+= -DGTK:BOOL=OFF
PLIST_SUB+= GTK="@comment "
.endif
.if ${PORT_OPTIONS:MQT4}
CMAKE_ARGS+= -DLRELEASE_EXECUTABLE=${LOCALBASE}/bin/lrelease-qt4
USE_QT4= qmake_build moc_build rcc_build uic_build linguist_build gui
PLIST_SUB+= QT4=""
.else
CMAKE_ARGS+= -DQT4:BOOL=OFF
PLIST_SUB+= QT4="@comment "
.endif
.if ${PORT_OPTIONS:MCLI}
PLIST_SUB+= CLI=""
.else
PLIST_SUB+= CLI="@comment "
.endif
.if ${PORT_OPTIONS:MOSS}
CMAKE_ARGS+= -DOSS_SUPPORT:BOOL=ON
.else
CMAKE_ARGS+= -DOSS_SUPPORT:BOOL=OFF
.endif
.if ${PORT_OPTIONS:MESOUND}
USE_GNOME+= esound
PLIST_SUB+= ESD=""
.else
CMAKE_ARGS+= -DESD:BOOL=OFF
PLIST_SUB+= ESD="@comment "
.endif
.if ${PORT_OPTIONS:MJACK}
LIB_DEPENDS+= libjack.so:audio/jack
PLIST_SUB+= JACK=""
.else
CMAKE_ARGS+= -DJACK:BOOL=OFF
PLIST_SUB+= JACK="@comment "
.endif
.if ${PORT_OPTIONS:MPULSEAUDIO}
LIB_DEPENDS+= libpulse.so:audio/pulseaudio
PLIST_SUB+= PULSE=""
.else
CMAKE_ARGS+= -DPULSEAUDIOSIMPLE:BOOL=OFF
PLIST_SUB+= PULSE="@comment "
.endif
.if ${PORT_OPTIONS:MFREETYPE}
LIB_DEPENDS+= libfreetype.so:print/freetype2
PLIST_SUB+= FREETYPE=""
.else
CMAKE_ARGS+= -DFREETYPE2:BOOL=OFF
PLIST_SUB+= FREETYPE="@comment "
.endif
.if ${PORT_OPTIONS:MFONTCONFIG}
LIB_DEPENDS+= libfontconfig.so:x11-fonts/fontconfig
.else
CMAKE_ARGS+= -DFONTCONFIG:BOOL=OFF
.endif
.if ${PORT_OPTIONS:MXVIDEO}
#LIB_DEPENDS+= Xv:x11/libXv
USE_XORG+= xv
.else
CMAKE_ARGS+= -DXVIDEO:BOOL=OFF
.endif
.if ${PORT_OPTIONS:MFAAC}
LIB_DEPENDS+= libfaac.so:audio/faac
PLIST_SUB+= FAAC=""
.else
CMAKE_ARGS+= -DFAAC:BOOL=OFF
PLIST_SUB+= FAAC="@comment "
.endif
.if ${PORT_OPTIONS:MLAME}
LIB_DEPENDS+= libmp3lame.so:audio/lame
PLIST_SUB+= LAME=""
.else
CMAKE_ARGS+= -DLAME:BOOL=OFF
PLIST_SUB+= LAME="@comment "
.endif
.if ${PORT_OPTIONS:MFAAD}
LIB_DEPENDS+= libfaad.so:audio/faad
PLIST_SUB+= FAAD=""
.else
CMAKE_ARGS+= -DFAAD:BOOL=OFF -DNeAAC:BOOL=OFF
PLIST_SUB+= FAAD="@comment "
.endif
.if ${PORT_OPTIONS:MX264}
LIB_DEPENDS+= libx264.so:multimedia/libx264
PLIST_SUB+= X264=""
.else
CMAKE_ARGS+= -DX264:BOOL=OFF
PLIST_SUB+= X264="@comment "
.endif
.if ${PORT_OPTIONS:MX265}
LIB_DEPENDS+= libx265.so:multimedia/x265
PLIST_SUB+= X265=""
.else
CMAKE_ARGS+= -DX265:BOOL=OFF
PLIST_SUB+= X265="@comment "
.endif
.if ${PORT_OPTIONS:MVPX}
LIB_DEPENDS+= libvpx.so:multimedia/libvpx
PLIST_SUB+= VPX=""
.else
CMAKE_ARGS+= -DVPXDEC:BOOL=OFF
PLIST_SUB+= VPX="@comment "
.endif
.if ${PORT_OPTIONS:MXVID}
LIB_DEPENDS+= libxvidcore.so:multimedia/xvid
PLIST_SUB+= XVID=""
.else
CMAKE_ARGS+= -DXVID:BOOL=OFF
PLIST_SUB+= XVID="@comment "
.endif
.if ${PORT_OPTIONS:MSDL}
USE_SDL= sdl
PLIST_SUB+= SDL=""
.else
CMAKE_ARGS+= -DSDL:BOOL=OFF
PLIST_SUB+= SDL="@comment "
.endif
.if ${PORT_OPTIONS:MVAAPI}
LIB_DEPENDS+= libva.so:multimedia/libva
PLIST_SUB+= VAAPI=""
.else
CMAKE_ARGS+= -DVAAPI:BOOL=OFF -DLIBVA:BOOL=OFF
PLIST_SUB+= VAAPI="@comment "
.endif
.if ${PORT_OPTIONS:MVDPAU}
LIB_DEPENDS+= libvdpau.so:multimedia/libvdpau
PLIST_SUB+= VDPAU=""
.else
CMAKE_ARGS+= -DVDPAU:BOOL=OFF
PLIST_SUB+= VDPAU="@comment "
.endif
.if ${PORT_OPTIONS:MVORBIS}
LIB_DEPENDS+= libvorbis.so:audio/libvorbis
PLIST_SUB+= VORBIS=""
.else
CMAKE_ARGS+= -DLIBVORBIS:BOOL=OFF -DVORBIS:BOOL=OFF
PLIST_SUB+= VORBIS="@comment "
.endif
.if ${PORT_OPTIONS:MAMR}
LIB_DEPENDS+= libopencore-amrnb.so:audio/opencore-amr
PLIST_SUB+= AMRNB=""
PLIST_SUB+= AMRWB=""
.else
CMAKE_ARGS+= -DOPENCORE_AMRNB:BOOL=OFF
PLIST_SUB+= AMRNB="@comment "
CMAKE_ARGS+= -DOPENCORE_AMRWB:BOOL=OFF
PLIST_SUB+= AMRWB="@comment "
.endif
.include <bsd.port.pre.mk>
# is this kosher? the result seems to run tho... (see ports/185997)
.if $(COMPILER_FEATURES:Mlibc++)
LDFLAGS+= -lc++
.endif
#.if ${COMPILER_TYPE} == clang
USE_GCC= yes
#.endif
.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
BROKEN= Does not compile on ia64, powerpc, or sparc64
.endif
post-patch:
@${MKDIR} ${CONFIGURE_WRKSRC}/config
@${LN} -s ${LOCALBASE}/include/iconv.h ${CONFIGURE_WRKSRC}/config
@${REINPLACE_CMD} 's|-ldl||' ${WRKSRC}/avidemux_core/CMakeLists.txt
post-configure-common:
@${FIND} ${CONFIGURE_WRKSRC} -name link.txt -print0 | \
${XARGS} -0 ${REINPLACE_CMD} 's|-ldl||g'
|