source: trunk/dports/multimedia/libvpx/Portfile

Last change on this file was 137267, checked in by ryandesign@…, 2 years ago

libvpx: fix configure failure if universal_archs does not contain build_arch (#47988)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.9 KB
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# $Id: Portfile 137267 2015-06-07 23:05:53Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           compiler_blacklist_versions 1.0
6PortGroup           muniversal 1.0
7
8# Since libvpx installs a static library only, increase the revision of
9# dependents when updating libvpx to a new version so they'll be rebuilt.
10name                libvpx
11version             1.4.0
12categories          multimedia
13maintainers         devans openmaintainer
14platforms           darwin
15license             Permissive
16
17description         WebM VP8/VP9 Codec SDK
18long_description    The WebM VP8/VP9 codecs are being developed \
19                    specifically to meet the demand for the consumption \
20                    of video over the Internet, including professionally \
21                    and amateur produced video-on-demand and conversational \
22                    video content. VP9 is an evolution of the VP8 video \
23                    codec and includes a number of enhancements and new \
24                    coding tools that have been added to improve coding efficiency. \
25                    The VP9 encoder in this release is not, as yet, feature complete.
26
27homepage            http://webmproject.org
28master_sites        http://storage.googleapis.com/downloads.webmproject.org/releases/webm/
29use_bzip2           yes
30
31checksums           rmd160  272b1a9f1687a80337d79ccbada2a344c96d1bf1 \
32                    sha256  f582d9b2d60a592a4a3d8c32965ca2d2167e9ade38c6c30bac8801ff66a118e4
33
34if {[string match "*86*" [get_canonical_archs]]} {
35    depends_build-append port:yasm
36}
37
38patchfiles          patch-build-make-configure.sh.diff \
39                    patch-configure.diff \
40                    patch-Makefile.diff
41
42# clang 425.0.28 with libvpx-1.4.0:
43# vp9/common/x86/vp9_subpixel_8t_intrin_avx2.c:77:16: error: assigning to '__m256i' from incompatible type 'int'
44#  filtersReg32 = MM256_BROADCASTSI128_SI256(filtersReg);
45#               ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46compiler.blacklist  {clang < 500}
47
48# As of 1.3.0: doesn't handle shared libraries or debug properly on darwin;
49# doesn't install docs or examples correctly, so disable them.
50configure.args      --enable-vp8 \
51                    --enable-vp9 \
52                    --enable-internal-stats \
53                    --enable-pic \
54                    --enable-postproc \
55                    --enable-multithread \
56                    --enable-runtime-cpu-detect \
57                    --disable-install-docs \
58                    --disable-debug-libs \
59                    --disable-examples \
60                    --disable-unit-tests
61
62configure.env       LD="${configure.cc}"
63
64# add in when docs are installed correctly
65#variant docs description {Build documentation} {
66#    depends_build-append path:bin/php:php5 port:doxygen
67#    configure.args-delete --disable-install-docs
68#    configure.args-append --enable-install-docs
69#}
70
71platform darwin 8 {
72    # Tiger's make 3.80 experiences "virtual memory exhausted" during destroot
73    depends_build-append    port:gmake
74    build.cmd               ${prefix}/bin/gmake
75}
76
77build.target
78build.args          verbose=1
79
80destroot.args       verbose=1
81
82# Build fix for MacPorts clang-3.5 and later:
83#
84# This is an intentional change to Clang. It now parses the assembly output by default even when emitting assembly so that the diagnostics are consistent between "clang -c" and "clang -S".
85# The solution is either to pass -fno-integrated-as to the compiler, or change the assembly produced (& probably the script that processes it) so that it's valid. Note that commenting out the line won't work: comments get stripped by the same process.
86# Current Xcode versions of clang > 602 corresponding to Xcode 6.3 or greater also need this fix
87
88if {[string match "macports-clang-3.\[5-9\]" ${configure.compiler}] ||
89    (${configure.compiler} eq "clang" && [compiler_blacklist_versions._get_compiler_version ${configure.compiler}] > 602)} {
90        build.args-append CFLAGS_S=-fno-integrated-as
91}
92
93configure.universal_args-delete --disable-dependency-tracking
94
95set my_targets(ppc)     ppc32
96set my_targets(ppc64)   ppc64
97set my_targets(i386)    x86
98set my_targets(x86_64)  x86_64
99
100# We must specify the target, otherwise the configure script will guess,
101# and that may not match what the user requested in macports.conf.
102foreach my_arch {ppc ppc64 i386 x86_64} {
103    set merger_host(${my_arch}) ""
104    if {[info exists my_targets(${my_arch})]} {
105        set merger_configure_args(${my_arch}) --target=$my_targets(${my_arch})-${os.platform}-gcc
106    }
107}
108if {![variant_isset universal]} {
109    if {[info exists merger_configure_args(${build_arch})]} {
110        configure.args-append $merger_configure_args(${build_arch})
111    } else {
112        configure.args-append --target=${os.arch}-${os.platform}-gcc
113    }
114}
115
116livecheck.type  regex
117livecheck.url   http://downloads.webmproject.org/releases/webm/index.html
118livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
Note: See TracBrowser for help on using the repository browser.