Ticket #25320: qt4-mac-Portfile.diff

File qt4-mac-Portfile.diff, 3.2 KB (added by michaelld (Michael Dickens), 14 years ago)

Patch for qt4-mac 4.6.3_0 Portfile that uses compiler.cpath and compiler.library_path.

  • (a) Portfile_orig vs. (b) Portfile

    a b  
    5959set dirname qt4-mac
    6060set qt_dir ${prefix}/libexec/${dirname}
    6161
     62#  use compiler.cflags and compiler.library_flags, as per
     63#  http://trac.macports.org/ticket/25321 for all -I and -L entries,
     64#  so-as to avoid conflicts with already-installed headers and
     65#  libraries (giving preference to internal-to-this-port first)
     66#
    6267#  CPATH is used instead of -I to avoid conflicts with other ports.
    6368#  See http://trac.macports.org/ticket/15219 and http://trac.macports.org/ticket/18723.
    6469#
     
    7075#
    7176configure.args                                            \
    7277    -v                                                    \
    73     -debug-and-release                                    \
     78    -release                                              \
    7479    -confirm-license                                      \
    7580    -opensource                                           \
    7681    -prefix          ${qt_dir}                            \
     
    8186    -system-sqlite                                        \
    8287    -openssl-linked                                       \
    8388    -dbus-linked                                          \
    84     -L${prefix}/lib                                       \
    8589    -arch            \"${build_arch}\"
    8690
    87 lappend cpath        ${prefix}/include
    88 lappend library_path ${prefix}/lib
    89 
    90 pre-configure {
    91     configure.env-append \
    92         CPATH=[join ${cpath} :] \
    93         LIBRARY_PATH=[join ${library_path} :]
    94 }
    95 
    96 pre-build {
    97     build.env-append \
    98         CPATH=[join ${cpath} :] \
    99         LIBRARY_PATH=[join ${library_path} :]
    100 }
    101 
    10291# Stop configure script from searching for SQL Drivers
    10392#    not available from MacPorts.
    10493foreach driver {db2 ibase oci tds} {
     
    126115
    127116variant mysql description {Enable MySQL SQL Driver} {
    128117    depends_lib-append path:lib/mysql5:mysql5
    129 
    130     lappend cpath        ${prefix}/include/mysql5/mysql
    131     lappend library_path ${prefix}/lib/mysql5/mysql
    132 
     118    # reverse the search paths, such that the defaults are searched last
     119    compiler.cpath ${prefix}/include/mysql5/mysql:${compiler.cpath}
     120    compiler.library_path ${prefix}/lib/mysql5/mysql:${compiler.library_path}
    133121    configure.args-delete -no-sql-mysql
    134122}
    135123
     
    140128
    141129variant psql description {Enable PostgreSQL SQL Driver} {
    142130    depends_lib-append port:postgresql83
    143 
    144     lappend cpath        ${prefix}/include/postgresql83
    145     lappend library_path ${prefix}/lib/postgresql83
    146 
     131    # reverse the search paths, such that the defaults are searched last
     132    compiler.cpath ${prefix}/include/postgresql83:${compiler.cpath}
     133    compiler.library_path ${prefix}/lib/postgresql83:${compiler.library_path}
    147134    configure.args-delete -no-sql-psql
    148135}
    149136
     
    152139    configure.args-delete -no-sql-sqlite2
    153140}
    154141
     142variant debug conflicts combined description {Compile and Link with Debugging} {
     143    configure.args-delete -release
     144    configure.args-append -debug
     145}
     146
     147variant combined conflicts debug description {Compile and Link with and without Debugging} {
     148    configure.args-delete -release
     149    configure.args-append -debug-and-release
     150}
     151
    155152build.target        first
    156153use_parallel_build  yes
    157154