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 meson 1.0 |
---|
5 | PortGroup muniversal 1.0 |
---|
6 | PortGroup compiler_blacklist_versions 1.0 |
---|
7 | PortGroup legacysupport 1.1 |
---|
8 | |
---|
9 | # posix_memalign |
---|
10 | legacysupport.newest_darwin_requires_legacy 9 |
---|
11 | |
---|
12 | name dav1d |
---|
13 | # Please increase the revision of libheif, ffmpeg and ffmpeg-devel whenever |
---|
14 | # dav1d's version is updated. |
---|
15 | version 1.0.0 |
---|
16 | revision 0 |
---|
17 | categories multimedia |
---|
18 | platforms darwin |
---|
19 | license BSD |
---|
20 | maintainers {ctreleaven @ctreleaven} openmaintainer |
---|
21 | |
---|
22 | description small and fast AV1 decoder |
---|
23 | long_description dav1d is an AV1 decoder that is open-source, cross-platform and \ |
---|
24 | focused on speed, size and correctness. |
---|
25 | |
---|
26 | homepage https://www.videolan.org/projects/dav1d.html |
---|
27 | master_sites https://code.videolan.org/videolan/dav1d/-/archive/${version}/ |
---|
28 | distname ${name}_${version} |
---|
29 | |
---|
30 | checksums rmd160 7a4a3f9ffc2c1d40b8da7077648b8e6c0fd41f99 \ |
---|
31 | sha256 0fec64e9931cdfef9936f24b0d70d8299cc8ce17dbe93380495656093b177cf8 \ |
---|
32 | size 962475 |
---|
33 | |
---|
34 | use_bzip2 yes |
---|
35 | |
---|
36 | # see https://trac.macports.org/ticket/62618 |
---|
37 | # patch can be applied always, but limit to < darwin 10 so no chance of troubles |
---|
38 | if {${os.platform} eq "darwin" && ${os.major} < 10} { |
---|
39 | patchfiles-append patch-dav1d-workaround-no-pthread-setname-Leopard.diff |
---|
40 | } |
---|
41 | |
---|
42 | # nasm is not needed on arm64 platforms |
---|
43 | if { ${build_arch} in "i386 x86_64" || [variant_isset universal] } { |
---|
44 | depends_build-append port:nasm |
---|
45 | } |
---|
46 | |
---|
47 | # workaround meson change that causes configure to fail on older OS X versions |
---|
48 | # see https://github.com/mesonbuild/meson/issues/8307 |
---|
49 | compiler.blacklist-append *gcc-3.* *gcc-4.* |
---|
50 | compiler.blacklist-append { clang < 700 } macports-clang-3.3 macports-clang-3.4 |
---|
51 | |
---|
52 | configure.args-append \ |
---|
53 | -Denable_tests=false |
---|
54 | |
---|
55 | variant test description {enable tests} { |
---|
56 | configure.args-replace -Denable_tests=false -Denable_tests=true |
---|
57 | test.run yes |
---|
58 | test.target test |
---|
59 | } |
---|
60 | |
---|
61 | if {![info exists universal_possible]} { |
---|
62 | set universal_possible [expr {${os.universal_supported} && [llength ${configure.universal_archs}] >= 2}] |
---|
63 | } |
---|
64 | if {${universal_possible} && [variant_isset universal]} { |
---|
65 | foreach my_arch {ppc ppc64 i386 x86_64 arm64} { |
---|
66 | # strip the automatic setting of host, meson does not accept |
---|
67 | set merger_host(${my_arch}) "" |
---|
68 | } |
---|
69 | lappend merger_configure_env(i386) \ |
---|
70 | LDFLAGS=-Wl,-read_only_relocs,suppress,-no_compact_unwind |
---|
71 | } elseif {${configure.build_arch} eq "i386"} { |
---|
72 | configure.env-append \ |
---|
73 | LDFLAGS=-Wl,-read_only_relocs,suppress,-no_compact_unwind |
---|
74 | } |
---|
75 | |
---|
76 | # developer docs are automatically built if doxygen and dot (graphviz) are present |
---|
77 | # but are not installed |
---|
78 | |
---|
79 | set docdir ${prefix}/share/doc/${name} |
---|
80 | |
---|
81 | post-destroot { |
---|
82 | xinstall -m 0755 -d ${destroot}${docdir} |
---|
83 | |
---|
84 | xinstall -m 0644 -W ${worksrcpath} \ |
---|
85 | CONTRIBUTING.md \ |
---|
86 | COPYING \ |
---|
87 | doc/dav1d_logo.png \ |
---|
88 | NEWS \ |
---|
89 | README.md \ |
---|
90 | THANKS.md \ |
---|
91 | ${destroot}${docdir} |
---|
92 | } |
---|
93 | |
---|
94 | livecheck.url https://download.videolan.org/pub/videolan/${name}/ |
---|
95 | livecheck.regex {>([0-9.]+)/<} |
---|