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 | |
---|
3 | PortSystem 1.0 |
---|
4 | PortGroup cxx11 1.1 |
---|
5 | PortGroup github 1.0 |
---|
6 | PortGroup compiler_blacklist_versions 1.0 |
---|
7 | PortGroup muniversal 1.0 |
---|
8 | |
---|
9 | github.setup mbunkus mkvtoolnix 38.0.0 release- |
---|
10 | revision 0 |
---|
11 | checksums rmd160 f9b3f7e7a5bcef6778307db4f1ecc736f4c9e72f \ |
---|
12 | sha256 0e1db5b5af6147dec245744a0d403120e53a44f6b81aad0d26c0f5c0e5515d00 \ |
---|
13 | size 7348600 |
---|
14 | |
---|
15 | categories multimedia |
---|
16 | platforms darwin |
---|
17 | maintainers {ryandesign @ryandesign} openmaintainer |
---|
18 | license GPL-2+ LGPL-2.1+ |
---|
19 | |
---|
20 | description Matroska media files manipulation tools. |
---|
21 | long_description mkvtoolnix will evolve to a set of tools to create, \ |
---|
22 | alter and inspect Matroska files under Linux and other \ |
---|
23 | Unices, just what the OGMtools do for the OGM format. |
---|
24 | homepage https://mkvtoolnix.download |
---|
25 | master_sites ${homepage}/sources/ |
---|
26 | use_xz yes |
---|
27 | |
---|
28 | set version_ruby 2.6 |
---|
29 | set version_ruby_mp [join [split $version_ruby "."] ""] |
---|
30 | |
---|
31 | depends_build port:ruby${version_ruby_mp} \ |
---|
32 | port:docbook-xsl-nons \ |
---|
33 | port:libxslt \ |
---|
34 | port:po4a |
---|
35 | |
---|
36 | depends_lib port:boost \ |
---|
37 | port:bzip2 \ |
---|
38 | port:expat \ |
---|
39 | port:flac \ |
---|
40 | port:gettext \ |
---|
41 | port:libebml \ |
---|
42 | port:libmagic \ |
---|
43 | port:libmatroska \ |
---|
44 | port:libogg \ |
---|
45 | port:libvorbis \ |
---|
46 | port:lzo2 \ |
---|
47 | port:pcre \ |
---|
48 | port:zlib \ |
---|
49 | port:pugixml \ |
---|
50 | port:cmark |
---|
51 | |
---|
52 | depends_run port:ruby${version_ruby_mp} |
---|
53 | |
---|
54 | post-patch { |
---|
55 | fs-traverse f ${worksrcpath} { |
---|
56 | set t [file tail ${f}] |
---|
57 | set e [file extension ${f}] |
---|
58 | if {${t} eq "Rakefile" || ${e} eq ".rb"} { |
---|
59 | reinplace -q -E "s|^#!/usr/bin/(env )?ruby|#!${prefix}/bin/ruby${version_ruby}|g" ${f} |
---|
60 | } |
---|
61 | } |
---|
62 | } |
---|
63 | |
---|
64 | # mkvtoolnix's configure tests for certain c++14 features. Xcode 6.2 (clang 600.0.57) |
---|
65 | # is known to fail. Xcode 7.2.1 (clang 700.1.81) is known to pass. Assume 700+ is OK. |
---|
66 | # Assume gcc 5+ is OK. |
---|
67 | compiler.fallback-append macports-clang-3.7 |
---|
68 | compiler.blacklist-append {clang < 700} *gcc-3.* *gcc-4.* |
---|
69 | |
---|
70 | set cxx_stdlibflags {} |
---|
71 | if {[string match *clang* ${configure.cxx}]} { |
---|
72 | set cxx_stdlibflags -stdlib=${configure.cxx_stdlib} |
---|
73 | } |
---|
74 | |
---|
75 | build.cmd rake${version_ruby} |
---|
76 | build.target default |
---|
77 | # disable silent rules |
---|
78 | build.args-append V=1 |
---|
79 | |
---|
80 | configure.args --mandir=${prefix}/share/man \ |
---|
81 | --with-boost=${prefix} \ |
---|
82 | --with-extra-libs=${prefix}/lib \ |
---|
83 | --with-extra-includes=${prefix}/include \ |
---|
84 | --with-xsltproc=${prefix}/bin/xsltproc \ |
---|
85 | --with-docbook-xsl-root=${prefix}/share/xsl/docbook-xsl-nons \ |
---|
86 | --with-po4a=${prefix}/bin/po4a \ |
---|
87 | --with-po4a-translate=${prefix}/bin/po4a-translate \ |
---|
88 | --disable-qt |
---|
89 | |
---|
90 | # https://gitlab.com/mbunkus/mkvtoolnix/issues/2485 |
---|
91 | configure.ldflags-append \ |
---|
92 | -framework CoreFoundation |
---|
93 | |
---|
94 | configure.ldflags-append ${cxx_stdlibflags} |
---|
95 | |
---|
96 | test.run yes |
---|
97 | test.cmd rake |
---|
98 | test.target tests:unit |
---|
99 | |
---|
100 | variant qtgui description {Build with the qt5 GUI} { |
---|
101 | PortGroup app 1.0 |
---|
102 | PortGroup qt5 1.0 |
---|
103 | |
---|
104 | app.name MKVToolNix |
---|
105 | app.executable mkvtoolnix-gui |
---|
106 | app.icon ${worksrcpath}/share/icons/256x256/mkvtoolnix-gui.png |
---|
107 | |
---|
108 | depends_build-append port:makeicns |
---|
109 | qt5.depends_component qtmultimedia |
---|
110 | configure.args-delete --disable-qt |
---|
111 | configure.args-append \ |
---|
112 | --enable-qt \ |
---|
113 | --with-qmake=${qt_dir}/bin/qmake \ |
---|
114 | --with-moc=${qt_dir}/bin/moc \ |
---|
115 | --with-uic=${qt_dir}/bin/uic \ |
---|
116 | --with-rcc=${qt_dir}/bin/rcc |
---|
117 | } |
---|
118 | |
---|
119 | default_variants +qtgui |
---|
120 | |
---|
121 | livecheck.type regex |
---|
122 | livecheck.url [lindex ${master_sites} 0] |
---|
123 | livecheck.regex ${name}-(\[0-9.\]+)${extract.suffix} |
---|