[SOLVED] Building avidemux-2.6.7 in Mac OS X Snow Leopard using Macports
Other *NIXThis forum is for the discussion of any UNIX platform that does not have its own forum. Examples would include HP-UX, IRIX, Darwin, Tru64 and OS X.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
# -*- 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
# $Id: Portfile 112717 2013-10-29 22:34:02Z devans@macports.org $
PortSystem 1.0
PortGroup cmake 1.0
PortGroup app 1.0
name avidemux
version 2.6.7
revision 1
categories multimedia
platforms macosx
license GPL-2
maintainers nomaintainer
homepage http://avidemux.sourceforge.net/
description Avidemux is a free video editor.
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 avidemux_${version}
checksums rmd160 42080542aea07f91aa3e867f1c87b89dd6017910 \
sha256 d28202273d23be85c748c12d6e4df5e013bb861ea52b9bac7e0f90ba3d23249f
patchfiles patch-cmake-ffmpeg_make.sh.cmake.diff \
myOwnMenu.h.diff
depends_build-append port:pkgconfig \
port:yasm
depends_lib-append port:qt4-mac
default_variants +aac +gettext +lame +sqlite +twolame +x264
# no automatic configure step, everything is done inside build
use_configure no
# only build with one job (otherwise it fails in avidemux_core)
use_parallel_build no
configure.args-append -DCMAKE_C_COMPILER=${configure.cc} \
-DCMAKE_C_FLAGS=${configure.cflags} \
-DCMAKE_CXX_COMPILER=${configure.cxx} \
-DCMAKE_CXX_FLAGS=${configure.cxxflags} \
-DFAKEROOT=${workpath}/destroot \
-DAVIDEMUX_SOURCE_DIR=${worksrcpath} \
-G \"Unix Makefiles\"
# some default settings
configure.args-append -DSDL=OFF \
-DGTK=OFF -DQT4=ON
# disable all options, enable them in variants
configure.args-append -DFONTCONFIG=OFF -DFREETYPE2=OFF \
-DFRIDIBI=OFF \
-DGETTEXT=OFF \
-DALSA=OFF \
-DARTS=OFF \
-DESD=OFF \
-DJACK=OFF \
-DOSS=OFF \
-DPULSEAUDIOSIMPLE=OFF \
-DAFTEN=OFF \
-DDCAENC=OFF -DLIBDCA=OFF \
-DFAAC=OFF -DFAAD=OFF \
-DLAME=OFF \
-DLIBVORBIS=OFF -DVORBIS=OFF \
-DOPENCORE_AMRNB=OFF -DOPENCORE_AMRWB=OFF \
-DTWOLAME=OFF \
-DVPXDEC=OFF \
-DX264=OFF \
-DXVID=OFF
build {
# 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 common plugins
process ${workpath} ${worksrcpath} avidemux_plugins build_pluginsCommon "-DPLUGIN_UI=COMMON -DCMAKE_CXX_COMPILER=${configure.cxx}"
# build gtk plugins
#process ${workpath} ${worksrcpath} avidemux_plugins build_pluginsGtk "-DPLUGIN_UI=GTK"
# build QT plugins
process ${workpath} ${worksrcpath} avidemux_plugins build_pluginsQt4 "-DPLUGIN_UI=QT4"
# build cli plugins
process ${workpath} ${worksrcpath} avidemux_plugins build_pluginsCli "-DPLUGIN_UI=CLI"
}
# destroot is handled by build
destroot {}
variant aac description {Support for faac/faad audio codecs} {
depends_lib-append port:faac
depends_lib-append port:faad2
configure.args-strsed s/-DFAAC=OFF/-DFAAC=ON/
configure.args-strsed s/-DFAAD=OFF/-DFAAD=ON/
}
variant amr description {Support for AMR speech audio codec} {
depends_lib-append port:opencore-amr
configure.args-strsed s/-DOPENCORE_AMRNB=OFF/-DOPENCORE_AMRNB=ON/
configure.args-strsed s/-DOPENCORE_AMRWB=OFF/-DOPENCORE_AMRWB=ON/
}
variant dts description {Support for DTS (libdca) audio codec} {
depends_lib-append port:libdca
configure.args-strsed s/-DDCAENC=OFF/-DDCAENC=ON/
configure.args-strsed s/-DLIBDCA=OFF/-DLIBDCA=ON/
}
variant esound description {Support for ESD audio device} {
depends_lib-append port:esound
configure.args-strsed s/-DESD=OFF/-DESD=ON/
}
variant fribidi description {Support for FriBidi} {
depends_lib-append port:fribidi
configure.args-strsed s/-DFRIDIBI=OFF/-DFRIDIBI=ON/
}
variant gettext description {Support for gettext} {
depends_lib-append port:gettext
configure.args-strsed s/-DGETTEXT=OFF/-DGETTEXT=ON/
}
variant jack description {Support for Jack audio device} {
depends_lib-append port:jack
configure.args-strsed s/-DJACK=OFF/-DJACK=ON/
}
variant lame description {Support for LAME audio codec} {
depends_lib-append port:lame
configure.args-strsed s/-DLAME=OFF/-DLAME=ON/
}
variant sqlite description {Support for SQLite3} {
depends_lib-append port:sqlite3
}
variant truetype description {Support for FreeType2} {
depends_lib-append port:freetype
depends_lib-append port:fontconfig
configure.args-strsed s/-DFREETYPE2=OFF/-DFREETYPE2=ON/
configure.args-strsed s/-DFONTCONFIG=OFF/-DFONTCONFIG=ON/
}
variant twolame description {Support for TwoLAME audio codec} {
depends_lib-append port:twolame
configure.args-strsed s/-DTWOLAME=OFF/-DTWOLAME=ON/
}
variant vorbis description {Support for Vorbis audio codec} {
depends_lib-append port:libvorbis
configure.args-strsed s/-DVORBIS=OFF/-DVORBIS=ON/
configure.args-strsed s/-DLIBVORBIS=OFF/-DLIBVORBIS=ON/
}
variant vpx description {Support for VP8 video codec} {
depends_lib-append port:libvpx
configure.args-strsed s/-DVPXDEC=OFF/-DVPXDEC=ON/
}
variant x264 description {Support for x264 video codec} {
depends_lib-append port:x264
configure.args-strsed s/-DX264=OFF/-DX264=ON/
}
variant xvid description {Support for XviD MPEG-4 video codec} {
depends_lib-append port:XviD
configure.args-strsed s/-DXVID=OFF/-DXVID=ON/
}
# .app stuff
app.name Avidemux-2.6.7
app.executable avidemux
app.icon avidemux_icon.png
Note that I added a patch that changes some shortcuts in order to be able to copy timestamps out of avidemux without excessive right-clicking. If you don't want that, delete the reference to myOwnMenu.h.diff in the "patchfiles" section. If you want the patch, paste the following into /Users/ports/multimedia/avidemux/files/myOwnMenu.h.diff:
This will deactivate (but not delete) your existing port; it is possible to rename the local repository, but then fetching may not work; download avidemux_2.6.7.tar.gz manually and put it in /opt/local/var/macports/distfiles/<avidemux-renamed>.
6. Install:
Code:
sudo port -v install avidemux
7. Replace the link in /Applications/MacPorts/Avidemux-2.6.7.app/Contents/MacOS with an executable file that says:
Code:
#!/bin/sh
/opt/local/bin/avidemux
This will open avidemux correctly, with plugins and without a green Terminal.
Can't find the post either; maybe I misplaced it, or it got disapproved (it would be time-consuming to check anyway).
So I'm posting the additions, including a new one, here, cross-posting be damned.
Edit: I added some cosmetic patches to fix minor interface errors. The first four are trivial and fix typos. The seekablePreview.ui.diff fixes an error in the display of the effects preview window.
Edit: I added a workaround for the incomplete video display in the main video. This patch (besides some cosmetic changes) simply opens a large enough default window to open widescreen PAL video (which is probably the largest you'll get) without vertical resizing. That's a workaround, not a fix; for a fix I'd have to correct the display aspect ratio; I don't know how to do that (and it's probably a Qt issue, not an avidemux issue). If you want to use this patch, look at the result in Qt Designer first and see if you agree. I'm not familiar with Qt Designer, and not all my changes may be functional. The interface behaves in ways that I don't understand.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.