blob: b9b25f5fe44402ac65dd95b587ee16d125912c26 (
plain) (
blame)
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
|
# New ports collection makefile for: avidemux2
# Date created: 16 April 2003
# Whom: Anish Mistry
# with help from mean
# $FreeBSD$
#
PORTNAME= avidemux2
PORTVERSION= 2.4.4
CATEGORIES= multimedia
MASTER_SITES= ${MASTER_SITE_BERLIOS} \
${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= avidemux
DISTNAME= avidemux_${PORTVERSION}
MAINTAINER= amistry@am-productions.biz
COMMENT= Simple GUI based video editor
LIB_DEPENDS= mp3lame.0:${PORTSDIR}/audio/lame \
mad.2:${PORTSDIR}/audio/libmad \
a52.0:${PORTSDIR}/audio/liba52 \
png.5:${PORTSDIR}/graphics/png \
execinfo.1:${PORTSDIR}/devel/libexecinfo
CONFLICTS= avidemux2-2.[0-35-9].*
# Necessary for CMake to find libs
CFLAGS+= -I${LOCALBASE}/include -L${LOCALBASE}/lib
CXXFLAGS+= -I${LOCALBASE}/include -L${LOCALBASE}/lib
USE_GNOME= libxml2
USE_QT_VER= 4
QT_COMPONENTS=
USE_ICONV= yes
WANT_SDL= yes
USE_CMAKE= yes
CMAKE_USE_PTHREAD=yes
CMAKE_ARGS+= -DTHREADS_HAVE_PTHREAD_ARG:STRING="${PTHREAD_LIBS}"
OPTIONS= GTK "GTK+ GUI" on \
QT4 "QT4 GUI (Experimental)" off \
FREETYPE "TrueType font rendering engine" on \
FONTCONFIG "Font configuration API for X" on \
OSS "OSS audio device" on \
ESD "ESOUND audio device" off \
JACK "JACK audio device" off \
PULSE "PULSE audio device" off \
XVIDEO "X Video Extension library" on \
FAAC "FAAC (mpeg4/aac encoder)" on \
FAAD "FAAD (mpeg4/aac decoder)" on \
X264 "H.264 encoding" on \
XVID "Xvid video" on \
SDL "SDL audio/video framework" on \
DCA "DTS Coherent Acoustics decoder" on \
AMRNB "3GPP AMR Speech Codec" on \
VORBIS "OGG/Vorbis audio support" on \
SAMPLERATE "Sample Rate Converter for audio" on \
NLS "Native languages support" on \
OPTIMIZED_CFLAGS "build with -O3 for lavcodec" off
.include <bsd.port.pre.mk>
# Package server cannot distribute these
.if defined(PACKAGE_BUILDING)
WITHOUT_LAME= yes
WITHOUT_FAAC= yes
WITHOUT_AMRNB= yes
.endif
# We haven't ALSA(Never) & Aften(Yet) on FreeBSD
CMAKE_ARGS+= -DNO_ARTS=1 -DNO_ALSA=1 -DNO_Aften=1
.if !defined(WITH_GTK) && !defined(WITH_QT4)
CMAKE_ARGS+= -DNO_X11=1 -DNO_GTK=1 -DNO_QT4=1
.endif
.if defined(WITHOUT_GTK)
CMAKE_ARGS+= -DNO_GTK=1
PLIST_SUB+= GTK="@comment "
.else
USE_GNOME+= gnomeprefix gnomehack gtk20
PLIST_SUB+= GTK=""
.endif
.if defined(WITHOUT_QT4)
CMAKE_ARGS+= -DNO_QT4=1
PLIST_SUB+= QT4="@comment "
.else
QT_COMPONENTS= qmake_build moc_build rcc_build uic_build linguist_build gui
PLIST_SUB+= QT4=""
.endif
.if defined(WITH_GTK) || defined(WITH_QT4)
USE_GNOME+= libxslt desktopfileutils
.endif
.if defined(WITHOUT_OSS)
CMAKE_ARGS+= -DNO_OSS=1
.endif
.if defined(WITHOUT_ESD)
CMAKE_ARGS+= -DNO_Esd=1
.else
USE_GNOME+= esound
.endif
.if defined(WITHOUT_JACK)
CMAKE_ARGS+= -DNO_Jack=1
.else
LIB_DEPENDS+= jack.0:${PORTSDIR}/audio/jack
.endif
.if defined(WITHOUT_PULSE)
CMAKE_ARGS+= -DNO_PULSE_SIMPLE=1
.else
LIB_DEPENDS+= pulse.0:${PORTSDIR}/audio/pulseaudio
.endif
.if defined(WITHOUT_FREETYPE)
CMAKE_ARGS+= -DNO_FREETYPE=1
.else
LIB_DEPENDS+= freetype.9:${PORTSDIR}/print/freetype2
.endif
.if defined(WITHOUT_FONTCONFIG)
CMAKE_ARGS+= -DNO_FontConfig=1
.else
LIB_DEPENDS+= fontconfig.1:${PORTSDIR}/x11-fonts/fontconfig
.endif
.if defined(WITHOUT_SAMPLERATE)
CMAKE_ARGS+= -DNO_libsamplerate=1
.else
LIB_DEPENDS+= samplerate.1:${PORTSDIR}/audio/libsamplerate
.endif
.if defined(WITHOUT_XVIDEO)
CMAKE_ARGS+= -DNO_XV=1
.else
LIB_DEPENDS+= Xv.1:${PORTSDIR}/x11/libXv
.endif
.if defined(WITHOUT_FAAC)
CMAKE_ARGS+= -DNO_FAAC=1
.else
LIB_DEPENDS+= faac.0:${PORTSDIR}/audio/faac
.endif
.if defined(WITHOUT_FAAD)
CMAKE_ARGS+= -DNO_FAAD=1 -DNO_NeAAC=1
.else
LIB_DEPENDS+= faad.2:${PORTSDIR}/audio/faad
.endif
.if defined(WITHOUT_X264)
CMAKE_ARGS+= -DNO_x264=1
.else
LIB_DEPENDS+= x264.65:${PORTSDIR}/multimedia/x264
.endif
.if defined(WITHOUT_XVID)
CMAKE_ARGS+= -DNO_Xvid=1
.else
LIB_DEPENDS+= xvidcore.4:${PORTSDIR}/multimedia/xvid
.endif
.if defined(WITHOUT_SDL)
CMAKE_ARGS+= -DNO_SDL=1
.else
USE_SDL= sdl
.endif
.if defined(WITHOUT_VORBIS)
CMAKE_ARGS+= -DNO_Vorbis=1
.else
LIB_DEPENDS+= vorbis.4:${PORTSDIR}/audio/libvorbis
.endif
.if defined(WITHOUT_DCA)
CMAKE_ARGS+= -DNO_libdca=1
.else
LIB_DEPENDS+= dca.0:${PORTSDIR}/multimedia/libdca
.endif
.if defined(WITHOUT_AMRNB)
CMAKE_ARGS+= -DNO_AMRNB=1
.else
LIB_DEPENDS+= amrnb.3:${PORTSDIR}/audio/libamrnb
.endif
.if defined(WITHOUT_NLS)
CMAKE_ARGS+= -DNO_NLS=1
PLIST_SUB+= NLS="@comment " QT_NLS="@comment "
.else
USE_GETTEXT= yes
PLIST_SUB+= NLS=""
. if !defined(WITH_QT4)
PLIST_SUB+= QT_NLS="@comment "
. else
PLIST_SUB+= QT_NLS=""
. endif
.endif
.if ${ARCH} == "sparc64"
BROKEN= Does not compile on sparc64
.endif
post-extract:
@${REINPLACE_CMD} -e 's/[[:cntrl:]]*$$//' \
${WRKSRC}/avidemux/ADM_libraries/ADM_mplex/ADM_mplexout.cpp
post-patch:
@${REINPLACE_CMD} 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/*/*/Makefile
@${CP} ${FILESDIR}/execinfo.cpp ${WRKSRC}/cmake_compile_check/
@${REINPLACE_CMD} "s|%%DATADIR%%|${DATADIR}|g" \
${WRKSRC}/avidemux/ADM_userInterfaces/ADM_QT4/ui_support.cpp \
${WRKSRC}/cmake/Ts.cmake
.if !defined(WITH_OPTIMIZED_CFLAGS)
@${REINPLACE_CMD} "s|-O3|${CFLAGS}|g" ${WRKSRC}/avidemux/ADM_libraries/ADM_lavcodec/Makefile.am
.endif
post-install:
.if defined(WITH_GTK) || defined(WITH_QT4)
@${MKDIR} "${DATADIR}"
${INSTALL_DATA} "${WRKSRC}/avidemux_icon.png" "${DATADIR}/${PORTNAME}.png"
@${ECHO_CMD} "${DATADIR_REL}/${PORTNAME}.png" >> ${TMPPLIST}
@${ECHO_CMD} "@unexec ${RMDIR} %D/${DATADIR_REL} 2>/dev/null || ${TRUE}" >> ${TMPPLIST}
@${MKDIR} "${DESKTOPDIR}"
@${ECHO_CMD} "@cwd ${DESKTOPDIR}" >> ${TMPPLIST}
.if defined(WITH_GTK)
@${SED} -e "s|%%PREFIX%%|${PREFIX}|g" -e "s|%%DATADIR%%|${DATADIR}|g" \
-e "s|%%NAME%%|${PORTNAME}|g" -e "s|%%API%%|gtk|g" \
< ${FILESDIR}/avidemux2.desktop.in > ${WRKDIR}/${PORTNAME}.desktop
${INSTALL_DATA} "${WRKDIR}/${PORTNAME}.desktop" "${DESKTOPDIR}"
@${ECHO_CMD} "${PORTNAME}.desktop" >> ${TMPPLIST}
.endif
.if defined(WITH_QT4)
@${SED} -e "s|%%PREFIX%%|${PREFIX}|g" -e "s|%%DATADIR%%|${DATADIR}|g" \
-e "s|%%NAME%%|${PORTNAME}|g" -e "s|%%API%%|qt4|g" \
< ${FILESDIR}/avidemux2.desktop.in > ${WRKDIR}/${PORTNAME}_qt4.desktop
${INSTALL_DATA} "${WRKDIR}/${PORTNAME}_qt4.desktop" "${DESKTOPDIR}"
@${ECHO_CMD} "${PORTNAME}_qt4.desktop" >> ${TMPPLIST}
.endif
@${ECHO_CMD} "@cwd ${PREFIX}" >> ${TMPPLIST}
@${ECHO_CMD} "@unexec ${RMDIR} ${DESKTOPDIR} 2>/dev/null || true" >> ${TMPPLIST}
@${ECHO_CMD} "@exec %D/bin/update-desktop-database 2>/dev/null || ${TRUE}" >> ${TMPPLIST}
@${ECHO_CMD} "@unexec %D/bin/update-desktop-database 2>/dev/null || ${TRUE}" >> ${TMPPLIST}
-update-desktop-database
.endif
.include <bsd.port.post.mk>
|