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

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

x264: reformat, white space only.

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