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 99186 2012-10-29 06:17:44Z jeremyhu@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | # https://bugzilla.gnome.org/show_bug.cgi?id=636134 |
---|
7 | PortGroup muniversal 1.0 |
---|
8 | |
---|
9 | name gst-libav |
---|
10 | version 1.0.5 |
---|
11 | description This is gst-libav, a set of plug-ins for GStreamer. |
---|
12 | long_description ${description} |
---|
13 | maintainers rmstonecipher openmaintainer |
---|
14 | categories gnome |
---|
15 | license GPL-2+ |
---|
16 | platforms darwin |
---|
17 | homepage http://www.gnome.org/ |
---|
18 | master_sites http://gstreamer.freedesktop.org/src/${name}/ |
---|
19 | |
---|
20 | checksums md5 00011aa062ce734ba86da499f800269e \ |
---|
21 | sha1 7c186f82743cca7fb8fc78848d4e79c1d3bcd5e4 \ |
---|
22 | rmd160 b9e67e0064d489553b3d3f012bce72421e51b380 |
---|
23 | |
---|
24 | patchfiles patch-gst-libs_ext_libav_configure.diff |
---|
25 | |
---|
26 | post-patch { |
---|
27 | reinplace "s|%%CONFIGURE.CC%%|${configure.cc}|g" ${worksrcpath}/gst-libs/ext/libav/configure |
---|
28 | } |
---|
29 | |
---|
30 | depends_build port:pkgconfig |
---|
31 | |
---|
32 | depends_lib port:gst-plugins-base |
---|
33 | |
---|
34 | use_xz yes |
---|
35 | |
---|
36 | use_autoreconf yes |
---|
37 | autoreconf.args -fvi |
---|
38 | |
---|
39 | # This will cause the installed libav headers to be used, remove it. |
---|
40 | configure.cppflags-delete -I${prefix}/include |
---|
41 | |
---|
42 | if {[variant_isset universal]} { |
---|
43 | set merger_host(x86_64) x86_64-apple-${os.platform}${os.major} |
---|
44 | set merger_host(i386) i686-apple-${os.platform}${os.major} |
---|
45 | set merger_host(ppc64) powerpc64-apple-${os.platform}${os.major} |
---|
46 | set merger_host(ppc) powerpc-apple-${os.platform}${os.major} |
---|
47 | set merger_configure_args(x86_64) "--build=x86_64-apple-${os.platform}${os.major} --with-libav-extra-configure=\"--cc=${configure.cc} --arch=x86_64\"" |
---|
48 | set merger_configure_args(ppc) "--build=powerpc-apple-${os.platform}${os.major} --with-libav-extra-configure=\"--cc=${configure.cc} --arch=ppc\"" |
---|
49 | set merger_configure_args(ppc64) "--build=powerpc64-apple-${os.platform}${os.major} --with-libav-extra-configure=\"--cc=${configure.cc} --arch=ppc64\"" |
---|
50 | |
---|
51 | if {[string match "*gcc-4.2" ${configure.compiler}] && [lsearch ${universal_archs} i386] != -1} { |
---|
52 | if {[vercmp ${xcodeversion} 3.2] >= 0} { |
---|
53 | set merger_configure_compiler(i386) clang |
---|
54 | set merger_configure_args(i386) "--build=i686-apple-${os.platform}${os.major} --with-libav-extra-configure=\"--cc=[portconfigure::find_developer_tool clang] --arch=i686\"" |
---|
55 | } else { |
---|
56 | # i386 in +universal needs MacPorts base 2.1 on Leopard |
---|
57 | depends_build port:clang-3.0 |
---|
58 | depends_skip_archcheck-append clang-3.0 |
---|
59 | |
---|
60 | set merger_configure_compiler(i386) macports-clang-3.0 |
---|
61 | |
---|
62 | set merger_configure_args(i386) "--build=i686-apple-${os.platform}${os.major} --with-libav-extra-configure=\"--cc=${prefix}/bin/clang-mp-3.0 --arch=i686\"" |
---|
63 | } |
---|
64 | } else { |
---|
65 | set merger_configure_args(i386) "--build=i686-apple-${os.platform}${os.major} --with-libav-extra-configure=\"--cc=${configure.cc} --arch=i686\"" |
---|
66 | } |
---|
67 | } elseif {${build_arch} == "i386"} { |
---|
68 | if {${configure.compiler} == "gcc-4.2"} { |
---|
69 | if {[vercmp ${xcodeversion} 3.2] >= 0} { |
---|
70 | configure.compiler clang |
---|
71 | } else { |
---|
72 | depends_build port:clang-3.0 |
---|
73 | depends_skip_archcheck-append clang-3.0 |
---|
74 | |
---|
75 | # FIXME: Use macports-clang-3.0 once 2.1 is out |
---|
76 | configure.cc ${prefix}/bin/clang-mp-3.0 |
---|
77 | } |
---|
78 | } |
---|
79 | configure.args-append \ |
---|
80 | --host=i686-apple-${os.platform}${os.major} \ |
---|
81 | --build=i686-apple-${os.platform}${os.major} \ |
---|
82 | --with-libav-extra-configure="--cc=${configure.cc} --arch=i686" |
---|
83 | } else { |
---|
84 | configure.args-append \ |
---|
85 | --host=${os.arch}-apple-${os.platform}${os.major} \ |
---|
86 | --build=${os.arch}-apple-${os.platform}${os.major} \ |
---|
87 | --with-libav-extra-configure="--cc=${configure.cc} --arch=${os.arch}" |
---|
88 | } |
---|
89 | |
---|
90 | # |
---|
91 | # embedded libav code requires gmake 3.81 to build properly |
---|
92 | # |
---|
93 | platform darwin 8 { |
---|
94 | depends_build-append port:gmake |
---|
95 | depends_skip_archcheck-append gmake |
---|
96 | |
---|
97 | build.cmd gmake |
---|
98 | destroot.cmd gmake |
---|
99 | } |
---|
100 | |
---|
101 | livecheck.type regex |
---|
102 | livecheck.url http://gstreamer.freedesktop.org/src/${name}/ |
---|
103 | livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}" |
---|