source: trunk/dports/multimedia/x264/Portfile @ 134841

Last change on this file since 134841 was 134841, checked in by devans@…, 5 years ago

x264: use {*} to append configure.cc_archflags one by one.

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