Ticket #53445: mlt.diff

File mlt.diff, 4.1 KB (added by RJVB (René Bertin), 7 years ago)
  • Portfile

    old new  
    11# -*- 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 145945 2016-02-22 08:53:45Z devans@macports.org $
    23
    34PortSystem          1.0
    45PortGroup           muniversal 1.0
    56
    67name                mlt
    78epoch               3
    8 version             6.4.1
     9version             6.4.1 ; revision 1
    910categories          multimedia
    10 maintainers         dennedy.org:dan gmail.com:rjvbertin openmaintainer
     11maintainers         gmail.com:rjvbertin dennedy.org:dan openmaintainer
    1112license             GPL-2+
    1213
    1314description         Open source multimedia framework - core libraries
     
    2728checksums           rmd160  647cdad41974b93c5745a358e1129f2ed5f6e577 \
    2829                    sha256  d3a992f3e67463e68630cb0b455d408a2a12f4da7a19e46807fa08a79f09b2b6
    2930
     31subport qt5-${name} {
     32    replaced_by     mlt-qt5
     33    PortGroup       obsolete 1.0
     34}
     35
    3036subport ${name}-qt5 {
    3137    description     ${description} - Qt5 version
    3238    long_description \
     
    3440}
    3541
    3642if {${subport} eq "${name}"} {
    37     conflicts       ${name}-qt5
     43    conflicts       ${name}-qt5 qt5-${name}
    3844    PortGroup       qt4 1.0
    3945} else {
    4046    conflicts       ${name}
    4147    PortGroup       qt5 1.0
    42     if {[info procs qt5.depends_component] eq ""} {
    43         # A procedure to indicate dependencies on Qt components that are not
    44         # included in the default dependency declared by the Qt5 PortGroup.
    45         # It allows to specify those dependencies without having to handle
    46         # the appropriate path-style declarations that work against every Qt5 port
    47         # (currently port:qt5, port:qt55, "soon" port:qt5-kde too.)
    48         # A complete version of this procedure will be provided by the Qt5 PG
    49         # after qt5-kde is introduced. Provide a simplified version in the meantime.
    50         proc qt5.depends_component {first args} {
    51             global os.major
    52             # join ${first} and (the optional) ${args}
    53             set args [linsert $args[set list {}] 0 ${first}]
    54             # select the Qt5 port prefix, depending on OS version and which Qt5 port is installed
    55             if {${os.major} == 11} {
    56                 set qt5pprefix  "qt55"
     48    if {[info procs qt5.active_version] eq ""} {
     49        proc qt5.active_version {} {
     50            global prefix
     51            if {[file exists ${prefix}/bin/pkg-config]} {
     52                set av [exec ${prefix}/bin/pkg-config --modversion Qt5Core]
     53                return ${av}
    5754            } else {
    58                 set qt5pprefix  "qt5"
    59             }
    60             foreach comp ${args} {
    61                 if {${comp} eq "qt5"} {
    62                     # in case one needs an explicit dependency on the Qt5 main port itself:
    63                     depends_lib-append port:${qt5pprefix}
    64                 } else {
    65                     set portname "${qt5pprefix}-${comp}"
    66                     depends_lib-append port:${portname}
    67                 }
     55                return 0.0.0
    6856            }
    6957        }
    7058    }
    7159
    7260    qt5.depends_component \
    7361                    qtsvg
     62    if {[vercmp [qt5.active_version] 5.7.0] >= 0} {
     63        configure.cxxflags-append \
     64                    -stdlib=libc++ \
     65                    -std=c++11
     66    }
    7467}
    7568
    7669depends_build-append port:git \
     
    108101configure.cflags-append     "-I${qt_includes_dir}"
    109102configure.ldflags-delete    "-L${prefix}/lib"
    110103
     104# make sure the build system actually sees our settings by amending the toplevel config.mak.
     105post-configure {
     106    set config.mak [open ${worksrcpath}/config.mak "a"]
     107    puts ${config.mak} "CC=${configure.cc}"
     108    puts ${config.mak} "CXX=${configure.cxx}"
     109    puts ${config.mak} "CFLAGS+=${configure.cflags}"
     110    puts ${config.mak} "CXXFLAGS+=${configure.cxxflags}"
     111    puts ${config.mak} "LDLAGS+=${configure.ldflags}"
     112    close ${config.mak}
     113}
     114
    111115build.args-append           CC="${configure.cc}" CXX="${configure.cxx}" CPP="${configure.cpp}"
    112116
    113117if {[variant_isset universal]} {