source: trunk/dports/multimedia/x264/Portfile

Last change on this file was 145586, checked in by devans@…, 20 months ago

x264: update to build 148 using stable snapshot as of 20160119, add variant +high10 to enable support for 10-bit encoding (#50584).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.4 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 145586 2016-02-10 16:16:16Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           muniversal 1.0
6PortGroup           xcodeversion 1.0
7
8name                x264
9version             20160119
10categories          multimedia
11license             GPL-2+
12platforms           darwin
13maintainers         devans openmaintainer
14description         x264 - a free h264/avc encoder
15long_description    x264 is a free library for encoding H264/AVC video streams. \
16                    The code is written by Laurent Aimar, Eric Petit(OS X), Min \
17                    Chen (vfw/nasm), Justin Clay(vfw), Måns Rullgård and Loren \
18                    Merritt from scratch. It is released under the terms of the \
19                    GPL license.
20homepage            http://www.videolan.org/x264.html
21master_sites        http://ftp.videolan.org/pub/videolan/x264/snapshots/
22
23dist_subdir         x264
24distname            ${name}-snapshot-${version}-2245-stable
25
26use_bzip2           yes
27
28checksums           rmd160  fb4c45164724421e71e9a78e23c0bb97346c841d \
29                    sha256  2861649be7e3da8ce4047b6b13dbe8506b403faaaa52aaf2d397972e23b3efd4
30
31minimum_xcodeversions {9 3.1}
32
33depends_build       port:yasm
34
35configure.args      --enable-pic \
36                    --enable-shared \
37                    --enable-static \
38                    --disable-avs \
39                    --disable-swscale \
40                    --disable-lavf \
41                    --disable-ffms \
42                    --disable-gpac \
43                    --disable-lsmash
44
45# as of this build (148) asm optimizations are believed to work with x86_64 Snow Leopard and up
46# please file a ticket if you have evidence to the contrary
47# i386 clang build issues remain which break i386 build when asm optimizations are enabled
48# assert configure option --disable-asm for all i386 builds
49# see https://mailman.videolan.org/pipermail/x264-devel/2014-February/010371.html, #42672.
50
51if {${os.platform} eq "darwin" && ${build_arch} ne "" && ![variant_isset universal]} {
52    if {${build_arch} eq "i386"} {
53        configure.args-append   --host=i686-apple-darwin${os.major} \
54                                --disable-asm
55    } else {
56        configure.args-append   --host=${build_arch}-apple-darwin${os.major}
57    }
58    configure.ldflags-append {*}${configure.cc_archflags}
59}
60
61foreach arch ${universal_archs} {
62    if {${arch} eq "i386"} {
63        set merger_configure_args(${arch}) "--host=i686-apple-darwin${os.major} --disable-asm"
64    } else {
65        set merger_configure_args(${arch}) --host=${arch}-apple-darwin${os.major}
66    }
67}
68
69configure.universal_args-delete --disable-dependency-tracking
70
71platform darwin 8 {
72    # https://trac.macports.org/ticket/24893
73    if {${build_arch} eq "i386" && ![variant_isset universal]} {
74        configure.cflags-append -msse2
75    }
76    set merger_configure_cflags(i386) -msse2
77}
78
79# sets its own optflags
80configure.optflags
81configure.cflags-append -I. -fno-common -read_only_relocs suppress
82
83destroot.args       DIR_INSTALL=${destroot}${prefix}
84
85build.target        default
86
87post-patch {
88    if {[string match "*clang*" ${configure.compiler}]} {
89        reinplace "s|-falign-loops=16||g" ${worksrcpath}/configure
90    }
91}
92
93variant high10 description {Set output bit depth to 10 instead of default 8} {
94    configure.args-append --bit-depth=10
95}
96
97livecheck.type      none
Note: See TracBrowser for help on using the repository browser.