forked from macports/macports-ports
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Portfile
243 lines (206 loc) · 9.12 KB
/
Portfile
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
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup cmake 1.1
PortGroup app 1.0
if {${os.platform} eq "darwin" && ${os.major} < 14} {
PortGroup qt4 1.0
} else {
PortGroup qt5 1.0
# qt5.min_version ?? # Project does not indicate
qt5.depends_component qttools
}
name avidemux
version 2.8.1
revision 0
categories multimedia
platforms macosx
license GPL-2
maintainers nomaintainer
homepage https://avidemux.sourceforge.net
description video editor designed for simple cutting, filtering and encoding tasks
long_description Avidemux is a free video editor designed for simple cutting, \
filtering and encoding tasks. It supports many file types, \
including AVI, DVD compatible MPEG files, MP4 and ASF, using \
a variety of codecs. Tasks can be automated using projects, \
job queue and powerful scripting capabilities.
master_sites sourceforge:project/avidemux/avidemux/${version}
distname ${name}_${version}
checksums rmd160 c4c3591c880eb54f52f3cbcec601363839c8f295 \
sha256 77d9bdca8683ce57c192b69d207cfab7cf92a7759ce0f63fa37b5c8e42ad3da2 \
size 26126065
patchfiles patch-admPlugins_VapourSynth.cmake.diff \
patch-cpuchecks.diff
# https://github.com/mean00/avidemux2/pull/500
patchfiles-append 0001-ADM_imageSave.cpp-add-missing-header.patch \
0002-ADM_coreUtils.h-fix-symbols-export.patch \
0003-Fix-missing-ADM_swap64.patch
# remove VERSION file from ffmpeg source, that conflicts with newer compilers
# that have a <version> header. The VERSION file has been removed in ffmpeg 6.0
# which will be used in the next release of avidemux
patchfiles-append patch-avidemux-remove-VERSION.diff
# fix c++11-narrowing error using upstream patch
# https://github.com/mean00/avidemux2/commit/65878cb39f3d9a2e51cb248cdab9724824f80558
patchfiles-append 65878cb39f3d9a2e51cb248cdab9724824f80558.patch
depends_build-append port:bash \
port:gmake \
port:pkgconfig \
port:yasm
depends_lib-append port:fontconfig \
port:freetype \
port:fribidi \
port:libass \
port:libmad \
port:zlib
default_variants +aac +gettext +lame +opus +sqlite +twolame +vorbis +vpx +x264 +x265 +xvid
# only build with one job (otherwise it fails in avidemux_core)
use_parallel_build no
# ffmpeg requires a C11 compiler, assume avidemux does too
compiler.c_standard 2011
compiler.cxx_standard 2011
cmake.set_cxx_standard yes
configure.cxxflags-append -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=1
configure.args-append -DCMAKE_C_COMPILER=${configure.cc} \
-DCMAKE_C_FLAGS="${configure.cflags}" \
-DCMAKE_CXX_COMPILER=${configure.cxx} \
-DCMAKE_CXX_FLAGS="${configure.cxxflags}" \
-DFAKEROOT=${destroot} \
-DAVIDEMUX_SOURCE_DIR=${worksrcpath}
# some default settings
configure.args-append -DGTK=OFF \
-DUSE_EXTERNAL_LIBASS=ON \
-DUSE_EXTERNAL_LIBMAD=ON
# disable most options, enable them in variants
configure.args-append -DAFTEN=OFF \
-DARTS=OFF \
-DDCAENC=OFF -DLIBDCA=OFF \
-DESD=OFF \
-DFAAC=OFF -DFAAD=OFF \
-DFONTCONFIG=ON -DFREETYPE2=ON \
-DFRIDIBI=ON \
-DGETTEXT=OFF \
-DJACK=OFF \
-DLAME=OFF \
-DLIBVORBIS=OFF -DVORBIS=OFF \
-DOPENCORE_AMRNB=OFF -DOPENCORE_AMRWB=OFF \
-DOPUS=OFF -DOPUS_ENCODER=OFF \
-DTWOLAME=OFF \
-DVAPOURSYNTH=OFF \
-DVPXDEC=OFF -DVPXENC=OFF\
-DX264=OFF \
-DX265=OFF \
-DXVID=OFF
if {${os.platform} eq "darwin" && ${os.major} < 14} {
configure.args-append -DENABLE_QT4=ON
} else {
configure.args-append -DENABLE_QT5=ON
configure.env-append QT5_DIR=${qt_dir} QTDIR=${qt_dir}
}
if {${configure.build_arch} in [list ppc ppc64]} {
configure.args-append -DASAN=OFF \
-DADM_CPU_ALTIVEC=ON
} else {
configure.args-append -DASAN=ON
}
# make bundled copy of ffmpeg build verbosely
# configure.env-append V=1
# build {
configure {
# mimic bootStrap.bash Process() behaviour
proc process {work src module build extra} {
# make build dir
file mkdir ${work}/${build}
# configure
configure.post_args ${extra} ${src}/${module}
configure.dir ${work}/${build}
command_exec configure
# build
build.dir ${work}/${build}
command_exec build
# install to destroot
destroot.dir ${work}/${build}
command_exec destroot
}
# build avidemux core
process ${workpath} ${worksrcpath} avidemux_core build_core ""
# build avidemux GTK UI
#process ${workpath} ${worksrcpath} avidemux/gtk build_gtk "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-framework,Cocoa"
# build avidemux QT UI
process ${workpath} ${worksrcpath} avidemux/qt4 build_qt4 ""
# build avidemux cli UI
process ${workpath} ${worksrcpath} avidemux/cli build_cli ""
# build plugins
process ${workpath} ${worksrcpath} avidemux_plugins build_pluginsCommon "-DPLUGIN_UI=ALL"
}
# build and destroot is handled above
build {}
destroot {}
variant aac description {Support for faac/faad audio codecs} {
depends_lib-append port:faac
depends_lib-append port:faad2
configure.args-replace -DFAAC=OFF -DFAAC=ON
configure.args-replace -DFAAD=OFF -DFAAD=ON
}
variant dts description {Support for DTS (libdca) audio codec} {
depends_lib-append port:libdca
configure.args-replace -DDCAENC=OFF -DDCAENC=ON
configure.args-replace -DLIBDCA=OFF -DLIBDCA=ON
}
variant esound description {Support for ESD audio device} {
depends_lib-append port:esound
configure.args-replace -DESD=OFF -DESD=ON
}
variant gettext description {Support for gettext} {
depends_lib-append port:gettext
configure.args-replace -DGETTEXT=OFF -DGETTEXT=ON
}
variant jack description {Support for Jack audio device} {
# Do not make a default until this bug is fixed:
# https://github.com/jackaudio/jack2/issues/950
depends_lib-append port:jack
configure.args-replace -DJACK=OFF -DJACK=ON
}
variant lame description {Support for LAME audio codec} {
depends_lib-append port:lame
configure.args-replace -DLAME=OFF -DLAME=ON
}
variant opus description {Support for Opus audio codec} {
depends_lib-append port:libopus
configure.args-replace -DOPUS=OFF -DOPUS=ON
configure.args-replace -DOPUS_ENCODER=OFF -DOPUS_ENCODER=ON
}
variant sqlite description {Support for SQLite3} {
depends_lib-append port:sqlite3
}
variant twolame description {Support for TwoLAME audio codec} {
depends_lib-append port:twolame
configure.args-replace -DTWOLAME=OFF -DTWOLAME=ON
}
variant vorbis description {Support for Vorbis audio codec} {
depends_lib-append port:libvorbis
configure.args-replace -DVORBIS=OFF -DVORBIS=ON
configure.args-replace -DLIBVORBIS=OFF -DLIBVORBIS=ON
}
variant vpx description {Support for VP8 video codec} {
depends_lib-append path:lib/pkgconfig/vpx.pc:libvpx
configure.args-replace -DVPXDEC=OFF -DVPXDEC=ON
configure.args-replace -DVPXENC=OFF -DVPXENC=ON
}
variant x264 description {Support for x264 video codec} {
depends_lib-append port:x264
configure.args-replace -DX264=OFF -DX264=ON
}
variant x265 description {Support for x265 video codec} {
depends_lib-append port:x265
configure.args-replace -DX265=OFF -DX265=ON
}
variant xvid description {Support for XviD MPEG-4 video codec} {
depends_lib-append port:XviD
configure.args-replace -DXVID=OFF -DXVID=ON
}
# .app stuff
app.name Avidemux
app.executable Avidemux2.8
app.use_launch_script yes
app.icon cmake/osx/avidemux.icns
livecheck.url http://www.fosshub.com/Avidemux.html
livecheck.regex "${name}_(\\d+(?:\\.\\d+)*)${extract.suffix}"