Ticket #63561: Portfile

File Portfile, 3.3 KB (added by johnrosshunt, 2 years ago)

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           meson 1.0
5PortGroup           muniversal 1.0
6PortGroup           compiler_blacklist_versions 1.0
7PortGroup           legacysupport 1.1
8
9# posix_memalign
10legacysupport.newest_darwin_requires_legacy 9
11
12name                dav1d
13# Please increase the revision of libheif, ffmpeg and ffmpeg-devel whenever
14# dav1d's version is updated.
15version             1.0.0
16revision            0
17categories          multimedia
18platforms           darwin
19license             BSD
20maintainers         {ctreleaven @ctreleaven} openmaintainer
21
22description         small and fast AV1 decoder
23long_description    dav1d is an AV1 decoder that is open-source, cross-platform and \
24                    focused on speed, size and correctness.
25
26homepage            https://www.videolan.org/projects/dav1d.html
27master_sites        https://code.videolan.org/videolan/dav1d/-/archive/${version}/
28distname            ${name}_${version}
29
30checksums           rmd160  7a4a3f9ffc2c1d40b8da7077648b8e6c0fd41f99 \
31                    sha256  0fec64e9931cdfef9936f24b0d70d8299cc8ce17dbe93380495656093b177cf8 \
32                    size    962475
33
34use_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
38if {${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
43if { ${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
49compiler.blacklist-append *gcc-3.* *gcc-4.*
50compiler.blacklist-append { clang < 700 } macports-clang-3.3 macports-clang-3.4
51
52configure.args-append \
53                    -Denable_tests=false
54
55variant test description {enable tests} {
56    configure.args-replace  -Denable_tests=false -Denable_tests=true
57    test.run                yes
58    test.target             test
59}
60
61if {![info exists universal_possible]} {
62    set universal_possible [expr {${os.universal_supported} && [llength ${configure.universal_archs}] >= 2}]
63}
64if {${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
79set docdir              ${prefix}/share/doc/${name}
80
81post-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
94livecheck.url       https://download.videolan.org/pub/videolan/${name}/
95livecheck.regex     {>([0-9.]+)/<}