Ticket #50972: mkvtoolnix-9.7.1.Portfile-v3

File mkvtoolnix-9.7.1.Portfile-v3, 3.4 KB (added by johnrosshunt, 7 years ago)

MKVToolNix 9.7.1 Portfile

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
3PortSystem          1.0
4PortGroup           cxx11 1.0
5PortGroup           github 1.0
6PortGroup           muniversal 1.0
7
8github.setup        mbunkus mkvtoolnix 9.7.1 release-
9categories          multimedia
10maintainers         ryandesign openmaintainer
11license             GPL-2+ LGPL-2.1+
12
13description         Matroska media files manipulation tools.
14long_description    mkvtoolnix will evolve to a set of tools to create, \
15                    alter and inspect Matroska files under Linux and other \
16                    Unices, just what the OGMtools do for the OGM format.
17homepage            http://www.bunkus.org/videotools/mkvtoolnix/
18platforms           darwin
19master_sites        https://mkvtoolnix.download/sources/
20use_xz              yes
21
22checksums           rmd160  d77acbf1fbfb6e7bba27e9d39a94432c98337882 \
23                    sha256  b2b8821e2d74df0f765c97f93ddd1dbfb062f3c22b969cfa04d1bb5cb638a88e
24
25set version_ruby    2.1
26set version_ruby_mp [join [split $version_ruby "."] ""]
27
28depends_build       port:pkgconfig \
29                    port:ruby${version_ruby_mp}
30
31depends_lib         port:boost \
32                    port:bzip2 \
33                    port:curl \
34                    port:expat \
35                    port:flac \
36                    port:gettext \
37                    port:libebml \
38                    port:libmagic \
39                    port:libmatroska \
40                    port:libogg \
41                    port:libvorbis \
42                    port:lzo2 \
43                    port:pcre \
44                    port:zlib \
45                    port:pugixml
46
47depends_run         port:ruby${version_ruby_mp}
48
49post-patch {
50    fs-traverse f ${worksrcpath} {
51        set t [file tail ${f}]
52        set e [file extension ${f}]
53        if {${t} eq "Rakefile" || ${t} eq "drake" || ${e} eq ".rb"} {
54            reinplace -E "s|^#!/usr/bin/(env )?ruby|#!${prefix}/bin/ruby${version_ruby}|g" ${f}
55        }
56    }
57}
58
59set cxx_stdlibflags {}
60if {[string match *clang* ${configure.cxx}]} {
61    set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
62}
63
64build.cmd           ./drake
65build.target        default
66build.args          -j${build.jobs}
67
68# disable silent rules
69build.args-append   V=1
70
71configure.args      --mandir=${prefix}/share/man \
72                    --with-boost=${prefix} \
73                    --with-extra-libs=${prefix}/lib \
74                    --with-extra-includes=${prefix}/include \
75                    --disable-qt
76
77configure.ldflags-append ${cxx_stdlibflags}
78
79variant qt5 description {Build with the qt5 GUI} {
80    PortGroup       app 1.0
81    PortGroup       qt5 1.0
82   
83    app.name        MKVToolNix
84    app.executable  ${worksrcpath}/src/mkvtoolnix-gui/mkvtoolnix-gui
85    app.icon        ${worksrcpath}/share/icons/256x256/mkvtoolnix-gui.png
86    app.create      yes
87
88    depends_build-append port:makeicns
89    depends_lib-append   port:qt5
90    configure.args-delete --disable-qt
91    configure.args-append \
92        --enable-qt \
93        --with-moc=${qt_dir}/bin/moc \
94        --with-uic=${qt_dir}/bin/uic \
95        --with-rcc=${qt_dir}/bin/rcc
96}
97
98variant doc description {Build documentation} {
99    depends_lib-append port:po4a port:pandoc
100}
101
102livecheck.type      regex
103livecheck.url       ${homepage}sources/
104livecheck.regex     ${name}-(\[0-9.\]+)${extract.suffix}