source: trunk/dports/multimedia/avidemux/Portfile

Last change on this file was 145589, checked in by devans@…, 20 months ago

dependents of x264: increment revision to rebuild with x264 build 148.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 7.5 KB
Line 
1# -*- 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
2# $Id: Portfile 145589 2016-02-10 16:36:25Z ryandesign@macports.org $
3
4PortSystem                  1.0
5PortGroup                   cmake 1.0
6PortGroup                   app 1.0
7PortGroup                   qt4 1.0
8
9name                        avidemux
10version                     2.6.10
11revision                    1
12categories                  multimedia
13platforms                   macosx
14license                     GPL-2
15maintainers                 nomaintainer
16homepage                    http://avidemux.sourceforge.net/
17
18description                 Avidemux is a free video editor.
19long_description            Avidemux is a free video editor designed for simple cutting, \
20                            filtering and encoding tasks. It supports many file types, \
21                            including AVI, DVD compatible MPEG files, MP4 and ASF, using \
22                            a variety of codecs. Tasks can be automated using projects, \
23                            job queue and powerful scripting capabilities.
24
25master_sites                sourceforge:project/avidemux/avidemux/${version}
26distname                    ${name}_${version}
27
28checksums                   rmd160  5a4318dce19efffe85f7e8de8ac33fc2795a4399 \
29                            sha256  176c2482a0656f81e307f1505e6dfcdab086ee73e7de363617b884c5d7205aed
30
31patchfiles                  patch-cmake-ffmpeg_make.sh.cmake.diff
32
33depends_build-append        port:yasm
34
35default_variants            +aac +gettext +lame +sqlite +twolame +x264
36
37# do VPATH (out of source tree) build
38cmake.out_of_source yes
39
40# no automatic configure step, everything is done inside build
41use_configure               no
42# only build with one job (otherwise it fails in avidemux_core)
43use_parallel_build          no
44
45configure.args-append       -DCMAKE_C_COMPILER=${configure.cc} \
46                            -DCMAKE_C_FLAGS=${configure.cflags} \
47                            -DCMAKE_CXX_COMPILER=${configure.cxx} \
48                            -DCMAKE_CXX_FLAGS=${configure.cxxflags} \
49                            -DFAKEROOT=${workpath}/destroot \
50                            -DAVIDEMUX_SOURCE_DIR=${worksrcpath} \
51                            -G \"Unix Makefiles\"
52
53# some default settings
54configure.args-append       -DSDL=OFF \
55                            -DGTK=OFF -DQT4=ON
56                           
57# disable all options, enable them in variants
58configure.args-append       -DFONTCONFIG=OFF -DFREETYPE2=OFF \
59                            -DFRIDIBI=OFF \
60                            -DGETTEXT=OFF \
61                            -DALSA=OFF \
62                            -DARTS=OFF \
63                            -DESD=OFF \
64                            -DJACK=OFF \
65                            -DOSS=OFF \
66                            -DPULSEAUDIOSIMPLE=OFF \
67                            -DAFTEN=OFF \
68                            -DDCAENC=OFF -DLIBDCA=OFF \
69                            -DFAAC=OFF -DFAAD=OFF \
70                            -DLAME=OFF \
71                            -DLIBVORBIS=OFF -DVORBIS=OFF \
72                            -DOPENCORE_AMRNB=OFF -DOPENCORE_AMRWB=OFF \
73                            -DTWOLAME=OFF \
74                            -DVPXDEC=OFF \
75                            -DX264=OFF \
76                            -DXVID=OFF
77
78build {
79    # mimic bootStrap.bash Process() behaviour
80    proc process {work src module build extra} {
81        # make build dir
82        file mkdir ${work}/${build}
83   
84        # configure
85        configure.post_args     ${extra} ${src}/${module}
86        configure.dir           ${work}/${build}
87        command_exec configure
88       
89        # build
90        build.dir               ${work}/${build}
91        command_exec build
92       
93        # install to destroot
94        destroot.dir            ${work}/${build}
95        command_exec destroot
96    }
97
98    # build avidemux core
99    process ${workpath} ${worksrcpath} avidemux_core build_core ""
100    # build avidemux GTK UI
101    #process ${workpath} ${worksrcpath} avidemux/gtk build_gtk "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-framework,Cocoa"
102    # build avidemux QT UI
103    process ${workpath} ${worksrcpath} avidemux/qt4 build_qt4 ""
104    # build avidemux cli UI
105    process ${workpath} ${worksrcpath} avidemux/cli build_cli ""
106    # build common plugins
107    process ${workpath} ${worksrcpath} avidemux_plugins build_pluginsCommon "-DPLUGIN_UI=COMMON -DCMAKE_CXX_COMPILER=${configure.cxx}"
108    # build gtk plugins
109    #process ${workpath} ${worksrcpath} avidemux_plugins build_pluginsGtk "-DPLUGIN_UI=GTK"
110    # build QT plugins
111    process ${workpath} ${worksrcpath} avidemux_plugins build_pluginsQt4 "-DPLUGIN_UI=QT4"
112    # build cli plugins
113    process ${workpath} ${worksrcpath} avidemux_plugins build_pluginsCli "-DPLUGIN_UI=CLI"
114}
115
116# destroot is handled by build
117destroot {}
118
119variant aac description {Support for faac/faad audio codecs} {
120    depends_lib-append  port:faac
121    depends_lib-append  port:faad2
122    configure.args-strsed s/-DFAAC=OFF/-DFAAC=ON/
123    configure.args-strsed s/-DFAAD=OFF/-DFAAD=ON/
124}
125variant amr description {Support for AMR speech audio codec} {
126    depends_lib-append  port:opencore-amr
127    configure.args-strsed s/-DOPENCORE_AMRNB=OFF/-DOPENCORE_AMRNB=ON/
128    configure.args-strsed s/-DOPENCORE_AMRWB=OFF/-DOPENCORE_AMRWB=ON/
129}
130variant dts description {Support for DTS (libdca) audio codec} {
131    depends_lib-append  port:libdca
132    configure.args-strsed s/-DDCAENC=OFF/-DDCAENC=ON/
133    configure.args-strsed s/-DLIBDCA=OFF/-DLIBDCA=ON/
134}
135variant esound description {Support for ESD audio device} {
136    depends_lib-append  port:esound
137    configure.args-strsed s/-DESD=OFF/-DESD=ON/
138}
139variant fribidi description {Support for FriBidi} {
140    depends_lib-append  port:fribidi
141    configure.args-strsed s/-DFRIDIBI=OFF/-DFRIDIBI=ON/
142}
143variant gettext description {Support for gettext} {
144    depends_lib-append  port:gettext
145    configure.args-strsed s/-DGETTEXT=OFF/-DGETTEXT=ON/
146}
147variant jack description {Support for Jack audio device} {
148    depends_lib-append  port:jack
149    configure.args-strsed s/-DJACK=OFF/-DJACK=ON/
150}
151variant lame description {Support for LAME audio codec} {
152    depends_lib-append  port:lame
153    configure.args-strsed s/-DLAME=OFF/-DLAME=ON/
154}
155variant sqlite description {Support for SQLite3} {
156    depends_lib-append  port:sqlite3
157}
158variant truetype description {Support for FreeType2} {
159    depends_lib-append  port:freetype
160    depends_lib-append  port:fontconfig
161    configure.args-strsed s/-DFREETYPE2=OFF/-DFREETYPE2=ON/
162    configure.args-strsed s/-DFONTCONFIG=OFF/-DFONTCONFIG=ON/
163}
164variant twolame description {Support for TwoLAME audio codec} {
165    depends_lib-append  port:twolame
166    configure.args-strsed s/-DTWOLAME=OFF/-DTWOLAME=ON/
167}
168variant vorbis description {Support for Vorbis audio codec} {
169    depends_lib-append  port:libvorbis
170    configure.args-strsed s/-DVORBIS=OFF/-DVORBIS=ON/
171    configure.args-strsed s/-DLIBVORBIS=OFF/-DLIBVORBIS=ON/
172}
173variant vpx description {Support for VP8 video codec} {
174# libvpx is static only so can be considered a build dependency (#47934)
175    depends_build-append port:libvpx
176    configure.args-strsed s/-DVPXDEC=OFF/-DVPXDEC=ON/
177}
178variant x264 description {Support for x264 video codec} {
179    depends_lib-append  port:x264
180    configure.args-strsed s/-DX264=OFF/-DX264=ON/
181}
182variant xvid description {Support for XviD MPEG-4 video codec} {
183    depends_lib-append  port:XviD
184    configure.args-strsed s/-DXVID=OFF/-DXVID=ON/
185}
186
187# .app stuff
188app.name        Avidemux
189app.executable  avidemux
190app.icon        avidemux_icon.png
Note: See TracBrowser for help on using the repository browser.