New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Changeset 82207


Ignore:
Timestamp:
08/10/11 07:04:45 (4 years ago)
Author:
michaelld@…
Message:

qt4-mac-devel: Update to version 4.8.0-beta1. Address ticket #30278. Move to openmaintainer. Remove unnecessary files.

Location:
trunk/dports/aqua/qt4-mac-devel
Files:
4 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/aqua/qt4-mac-devel/Portfile

    r79113 r82207  
    33 
    44PortSystem          1.0 
    5 PortGroup           select 1.0 
    6  
    7 set select_group    qt4 
    8 set select_branch   mac-devel 
    9 set select_port     ${select_group}_select 
    10 set select_name     ${select_group}-${select_branch} 
    11  
    12 name                ${select_name} 
     5 
     6# use the qt4 group; set 'building_qt4' so that the portgroup 
     7# does not include certain parts 
     8set building_qt4    1 
     9PortGroup           qt4 1.0 
     10 
     11name                qt4-mac-devel 
    1312conflicts           qt3 qt3-mac qt4-mac 
    14 version             4.7.0-beta2 
    15 revision            3 
     13set ver_nums        4.8.0 
     14set branch          beta1 
     15version             ${ver_nums}-${branch} 
    1616categories          aqua 
    1717platforms           macosx 
    18 maintainers         michaelld 
     18maintainers         michaelld openmaintainer 
    1919 
    2020homepage            http://qt.nokia.com/ 
    21 description         Qt Tool Kit (Native Aqua Version) 
    22 long_description    \ 
    23     Qt is a cross-platform application and UI framework for writing \ 
    24     cross-platform GUI applications. This port is for Qt version 4 \ 
    25     using the native Aqua UI. For X11 UI versions, see qt3-x11 or \ 
    26     qt4-x11\[-devel\]. 
     21description         Qt Tool Kit 
     22long_description    Qt Tool Kit: A cross-platform framework \ 
     23                    (headers, data, and libraries) for writing \ 
     24                    cross-platform GUI-based applications. 
    2725 
    2826master_sites        trolltech 
    2927distname            qt-everywhere-opensource-src-${version} 
    30 checksums           md5     1449443c2d33ab9fefbd37b7104d0cdf \ 
    31                     sha1    7906280feafd7c4bb4a9653e4f5988dcd3be9b54 \ 
    32                     rmd160  029f0c37fdbb3c36ecffc1e77da403607a055a39 
    33  
    34 depends_build       port:pkgconfig 
    35  
    36 depends_lib         port:zlib port:dbus port:openssl port:sqlite3 \ 
    37                     port:tiff port:libpng port:libmng port:jpeg \ 
    38                     port:${select_port} 
    39  
    40 # Test for Precompiled-headers support requires a C++ compiler, 
     28checksums           md5     b6d9da4c89cda9c555b9944f883e937a \ 
     29                    sha1    e00cb75980739b35d3fa32e9d255ef80f501a512 \ 
     30                    rmd160  e87a7e200b1fa1cab7f8e4ac81a35f8a2457bf31 
     31 
     32worksrcdir          qt-everywhere-opensource-src-${ver_nums} 
     33 
     34depends_lib-append  port:zlib port:dbus port:openssl port:sqlite3 \ 
     35                    port:tiff port:libpng port:libmng port:jpeg 
     36 
     37# (0) Fix the testing script to properly handle both +universal as 
     38# well as the native arch for both CXX and CC compiling; also make 
     39# sure it does not create a Mac app bundle. 
     40patchfiles-append   patch-config.tests_unix_compile.test.diff 
     41 
     42# (1) Test for Precompiled-headers support requires a C++ compiler, 
    4143# but configure calls it, by default, with a C compiler. 
    42 patchfiles          patch-precomp.test.diff 
     44patchfiles-append   patch-precomp.test.diff 
     45 
     46# (2) Tweak various scripts to allow easy replacement of 
     47# MACOSX_DEPLOYMENT_TARGET: build for just the user's current OS. 
     48patchfiles-append   patch-macosx-deployment-target.diff 
     49 
     50# (3) Tweak the configure script to allow easy replacement of arch 
     51# type(s).  The location of this patch is dependent on patch (2), but 
     52# 'patch' should be able to figure it out. 
     53patchfiles-append   patch-configure-arch.diff 
     54 
     55# (4) Tweak Qt spec files: 
     56# (4a) Place the -I path for local moc-created headers -before- 
     57# all other -I paths. 
     58patchfiles-append   patch-mkspecs-features-moc.prf.diff 
     59 
     60# (4b) Remove Qt's LIBDIR and INCDIR from various Qmake internal 
     61# variables, since they are already included in the user-supplied 
     62# LIBS and INCLUDEPATH. 
     63patchfiles-append   patch-mkspecs-features-qt.prf.diff 
     64 
     65# (4c) Change placement of Qt's LIBDIR and INCDIR, to always be after 
     66# those supplied by the user's QMake (.pro) files.  By the time QMake 
     67# gets to the patched function, it is creating the Makefile parts to 
     68# find Qt's headers and libraries, so moving these paths to this 
     69# location should always work. 
     70patchfiles-append   patch-mkspecs-features-qt_functions.prf.diff 
     71 
     72# (4d) Add "absolute_library_soname" to the default CONFIG variables, 
     73# so that when a DYLIB is created, if "target.path" is set for it then 
     74# that path is prepended to its "install_name". 
     75patchfiles-append   patch-mkspecs-macx-g++-qmake.prf.diff 
     76 
     77# (4e) allow use of 'ccache' via "qmake && make CCACHE=ccache", in mac 
     78# only; this patch requires that (2) already be in place. 
     79patchfiles-append   patch-mkspecs_common_mac.conf.diff 
     80 
     81# (4f) Changed the GNU C++ configuration to allow easy replacement of 
     82# the hard-coded compilers "gcc" and "g++". 
     83patchfiles-append   patch-mkspecs_common_g++-base.conf.diff 
     84 
     85# (5) fix the corewlan qmake file to use non-standard Developer SDK 
     86# location under 10.6, e.g., for some developers doing both iOS and 
     87# OSX.  This patch does not change behavior for 10.4 or 10.5. 
     88# Also include fix to use the correct SDK. 
     89patchfiles-append   patch-src-plugins-bearer-corewlan-corewlan.pro.diff 
     90 
     91# find a way to specify the OS MINOR version. 
     92global MINOR 
     93set MINOR "" 
     94 
     95# hopefully the macosx_deployment_target exists and is set by now.  if 
     96# not, last resort (which is not desirable) is to use the os.version. 
     97if {${macosx_deployment_target} == ""} { 
     98    set MINOR [lindex [split ${macosx_deployment_target} "."] 1] 
     99} else { 
     100    set MINOR [expr [lindex [split ${os.version} "."] 0] - 4] 
     101} 
    43102 
    44103post-patch { 
    45     # correct phonon version info. 
    46     # (1) retrieve the correct info (minor, patch) 
    47     set phonon_major_version \ 
    48         [exec grep "set\[^\\$\]*PHONON_LIB_MAJOR_VERSION" \ 
    49              ${worksrcpath}/src/3rdparty/phonon/CMakeLists.txt | \ 
    50              grep set | tr -dc '\[0-9\]'] 
    51     set phonon_minor_version \ 
    52         [exec grep "set\[^\\$\]*PHONON_LIB_MINOR_VERSION" \ 
    53              ${worksrcpath}/src/3rdparty/phonon/CMakeLists.txt | \ 
    54              grep set | tr -dc '\[0-9\]'] 
    55     set phonon_patch_version \ 
    56         [exec grep "set\[^\\$\]*PHONON_LIB_PATCH_VERSION" \ 
    57              ${worksrcpath}/src/3rdparty/phonon/CMakeLists.txt | \ 
    58              grep set | tr -dc '\[0-9\]'] 
    59  
    60     # (2) correct that which Qt uses 
    61     # (a) in src/phonon/phonon.pro 
    62     # (there has GOT to be a better way :) 
    63     reinplace "/PHONON_MINOR_VERSION =/s@\\(\[^0-9\]*\\)\[0-9\]*\\(\[^0-9\]*\\)@\\1${phonon_minor_version}\\2@" \ 
    64         ${worksrcpath}/src/phonon/phonon.pro 
    65     reinplace "/PHONON_PATCH_VERSION =/s@\\(\[^0-9\]*\\)\[0-9\]*\\(\[^0-9\]*\\)@\\1${phonon_patch_version}\\2@" \ 
    66         ${worksrcpath}/src/phonon/phonon.pro 
    67  
    68     # (b) in src/3rdparty/phonon/phonon/phononnamespace.h 
    69     # use the .h.in file & sed replace variables 
    70     system "sed -e 's/@PHONON_LIB_MAJOR_VERSION@/${phonon_major_version}/g' \ 
    71 -e 's/@PHONON_LIB_MINOR_VERSION@/${phonon_minor_version}/g' \ 
    72 -e 's/@PHONON_LIB_PATCH_VERSION@/${phonon_patch_version}/g' \ 
    73 < ${worksrcpath}/src/3rdparty/phonon/phonon/phononnamespace.h.in \ 
    74 > ${worksrcpath}/src/3rdparty/phonon/phonon/phononnamespace.h" 
     104    # set ARCHES in configure (per the third patchfile above), for 
     105    # building QMake.  join any 2 or more arch entries with the GCC 
     106    # arch flag (join does not effect a single entry).  first "-arch" 
     107    # is already in place in the 'configure' script (since there has 
     108    # to be at least 1 arch). 
     109    set ARCHES "" 
     110    if {[variant_exists universal] && [variant_isset universal]} { 
     111        set ARCHES [join ${universal_archs} " -arch "] 
     112    } else { 
     113        set ARCHES ${build_arch} 
     114    } 
     115    reinplace "s|@ARCHES@|${ARCHES}|g" ${worksrcpath}/configure 
     116 
     117    global MINOR 
     118 
     119    # set MACOSX_DEPLOYMENT_TARGET version in various places.  These 
     120    # were all patched in (2) above, and can be easily changed or 
     121    # overridden by the user in a project-local qmake .pro script. 
     122    set TARGET "10.${MINOR}" 
     123    foreach fixfile {configure mkspecs/common/g++-macx.conf \ 
     124                     mkspecs/common/mac.conf qmake/qmake.pri \ 
     125                     src/tools/bootstrap/bootstrap.pro } { 
     126        reinplace "s|@MACOSX_DEPLOYMENT_TARGET@|${TARGET}|g" \ 
     127            ${worksrcpath}/${fixfile} 
     128    } 
     129 
     130    # Fix OS version on Bearer CoreWLAN QMake file 
     131    reinplace "s|@MACOSX_VERSION_MINOR@|${MINOR}|g" \ 
     132        ${worksrcpath}/src/plugins/bearer/corewlan/corewlan.pro 
     133 
     134    # Ensure that correct C/C++ compilers are used. 
     135    reinplace "s|@CONFIGURE_CXX@|${configure.cxx}|" \ 
     136        ${worksrcpath}/mkspecs/common/g++-base.conf 
     137    reinplace "s|@CONFIGURE_CC@|${configure.cc}|"  \ 
     138        ${worksrcpath}/mkspecs/common/g++-base.conf 
     139 
     140    # fix up tests to work with ccache, if used 
     141    foreach fixfile [exec find ${worksrcpath}/config.tests \ 
     142                         -name "*.test"] { 
     143        reinplace "s@\\\"\\\$COMPILER\\\"@\$COMPILER@g" ${fixfile} 
     144    } 
     145 
     146    # fix 'configure' script to find the correct QMAKE CXX compiler by 
     147    # removing possibilities that include the character "$".  Yes, 
     148    # that's a lot of "\"s: each "\\\\" -> a single "\" in the patched 
     149    # file, and need "\\\\$" (with the "s) there. 
     150    reinplace "/QMAKE_CONF_COMPILER/ \ 
     151             s@tail@grep -v \"\\\\\\\\\\\\\\\\\$\" | tail@" \ 
     152        ${worksrcpath}/configure 
     153 
     154    # fix the corewlan .pro file to use the correct developer dir 
     155    reinplace "s,@DEVELOPER_DIR@,${developer_dir},g" \ 
     156        ${worksrcpath}/src/plugins/bearer/corewlan/corewlan.pro 
    75157} 
    76158 
     
    79161 
    80162# --prefix is not recognized. 
    81 configure.pre_args-delete  --prefix=${prefix} 
     163configure.pre_args-delete       --prefix=${prefix} 
     164 
     165# --disable-dependency-tracking is not recognized. 
     166configure.universal_args-delete --disable-dependency-tracking 
    82167 
    83168################################################################################ 
     
    100185    configure.ld_archflags 
    101186} 
    102  
    103 set dirname ${name} 
    104 set qt_dir ${prefix}/libexec/${dirname} 
    105187 
    106188#  use compiler.cpath and compiler.library_path, as per 
     
    127209# 
    128210# -openssl-linked ensures that the MacPorts openssl is used. 
     211# 
     212# -no-framework ensures that this port is installed as separate 
     213#     libraries and headers, with guaranteed locations and names. 
     214# 
     215# -no-phonon ensures that Qt does not install the 3rd-parth Phonon 
     216#     port or its backend to QuickTime 7; Phonon is now installed via 
     217#     the 'phonon' port, which is more up to date than that provided 
     218#     by Qt. 
    129219 
    130220configure.args                                            \ 
    131221    -v                                                    \ 
    132     -release                                              \ 
    133222    -confirm-license                                      \ 
    134223    -opensource                                           \ 
    135224    -prefix          ${qt_dir}                            \ 
    136     -docdir          ${qt_dir}/share/doc/${dirname}       \ 
    137     -examplesdir     ${qt_dir}/share/${dirname}/examples  \ 
    138     -demosdir        ${qt_dir}/share/${dirname}/demos     \ 
    139     -cocoa                                                \ 
     225    -bindir          ${qt_bins_dir}                       \ 
     226    -libdir          ${qt_libs_dir}                       \ 
     227    -docdir          ${qt_docs_dir}                       \ 
     228    -headerdir       ${qt_includes_dir}                   \ 
     229    -plugindir       ${qt_plugins_dir}                    \ 
     230    -importdir       ${qt_imports_dir}                    \ 
     231    -datadir         ${qt_data_dir}                       \ 
     232    -translationdir  ${qt_translations_dir}               \ 
     233    -sysconfdir      ${qt_sysconf_dir}                    \ 
     234    -examplesdir     ${qt_examples_dir}                   \ 
     235    -demosdir        ${qt_demos_dir}                      \ 
    140236    -system-sqlite                                        \ 
    141237    -openssl-linked                                       \ 
    142238    -dbus-linked                                          \ 
    143     -pch                                                  \ 
    144239    -fast                                                 \ 
    145     -nomake demos                                         \ 
    146     -nomake examples                                      \ 
    147240    -optimized-qmake                                      \ 
    148     -framework                                            \ 
    149     -arch            \"${build_arch}\" 
     241    -no-framework                                         \ 
     242    -no-phonon                                            \ 
     243    -no-phonon-backend 
    150244 
    151245# Stop configure script from searching for SQL Drivers 
     
    163257} 
    164258 
    165 # use the corrected CPATH and LIBRARY_PATH for configure 
    166259pre-configure { 
     260    # use the corrected CPATH and LIBRARY_PATH for build 
    167261    compiler.cpath [join ${header_path} :] 
    168262    compiler.library_path [join ${library_path} :] 
    169263} 
    170264 
    171 # Remove any '-I' string from the C*FLAGS for SQLITE and DBUS, so that 
    172 # what remains are just non-I flags; these paths are in compiler.cpath . 
    173 # The includes for all the other variants are not used by 
    174 # 'configure', and are already included in the compiler.cpath . 
     265platform darwin 8 { 
     266    # build as Carbon only, not cocoa. 
     267    configure.args-append -carbon 
     268 
     269    # required linking flags? 
     270    configure.ldflags-append -lcrypto -ldbus-1 -ljpeg -llcms -lsqlite3 -lssl -lz 
     271 
     272    # Under 10.4 only: patch QMake build files using just "-lQtHelp" 
     273    # to do "-lQtHelp -lQtCLucene -lQtNetwork -lQtWebKit" instead. 
     274    # For some reason 10.5+ "knows" that how to do this correctly. 
     275    patchfiles-append patch-QtHelp_10.4_only.diff 
     276} 
     277 
     278platform darwin { 
     279    pre-configure { 
     280        # retrieve the arch type(s) to use, in Qt-speak 
     281        configure.args-append -arch \"${qt_arch_types}\" 
     282 
     283        # cannot use pre-compiled headers when compiling with more than 1 
     284        # arch type (typically +universal) or for X11 
     285        #if {[llength ${qt_arch_types}] != 1 || [variant_isset x11]} 
     286        if {[llength ${qt_arch_types}] != 1} { 
     287            configure.args-append -no-pch 
     288        } else { 
     289            configure.args-append -pch 
     290        } 
     291 
     292        # check to see if not compiling for the native machine hardware 
     293        # (e.g., compiling for just i386 but CPU is x86_64); optimization 
     294        # of QMake does not work in this circumstance. 
     295        if {[lsearch -exact ${qt_arch_types} ${os.arch}] == -1} { 
     296            # not building for native arch: disable optimizing qmake 
     297            configure.args-delete -optimized-qmake 
     298        } 
     299 
     300        # find a way to specify the SDK to use; Qt will use the 10.4u 
     301        # by default which won't work on 10.6 since it is not 
     302        # supported.  Allow the user to specify the SDK if desired. 
     303        set SDK ${configure.sdkroot} 
     304        if {${SDK} == ""} { 
     305            # set SDK version depending on OS version 
     306            global MINOR 
     307            set sdk_version "" 
     308            if {${MINOR} == "4"} { 
     309                # OSX 10.4 requires an additional 'u' 
     310                set sdk_version "10.4u" 
     311            } else { 
     312                set sdk_version "10.${MINOR}" 
     313            } 
     314            set SDK ${developer_dir}/SDKs/MacOSX${sdk_version}.sdk 
     315        } 
     316        if {[file exists ${SDK}]} { 
     317            configure.args-append -sdk ${SDK} 
     318        } else { 
     319            ui_msg \ 
     320"No SDK found in ${developer_dir}/SDKs for ${sdk_version} ; \ 
     321configure will probably fail. \n \ 
     322Please install Apple's Developer Tools again." 
     323        } 
     324    } 
     325} 
     326 
     327platform darwin 10 i386 { 
     328    # optimization of QMake does not work on 10.6 32-bit native 
     329    configure.args-delete -optimized-qmake 
     330} 
     331 
     332# Remove any '-I' and '-L' string from the *FLAGS for SQLITE, DBUS, 
     333# ODBC, and OPENSSL, so that what remains are just non-I/L flags; 
     334# these paths are in compiler.cpath and compiler.library_path.  The 
     335# header and library paths for all the other variants are not used by 
     336# 'configure', and are already included in the compiler.cpath and 
     337# compiler.library_path . during the 'build' stage, 'make' will 
     338# rebuild the Makefiles that depend on any of these changed files. 
     339# These patches are sufficient to make sure local (to this build) 
     340# paths are searched first, and then system paths last (via the 
     341# compiler.X settings).  Ideally, 'qmake' -- either via its mkspecs 
     342# files or the project's build files -- would distinguish between 
     343# "local" and "system" includes & libraries. 
    175344post-configure { 
    176     # SQLITE first 
    177     reinplace "/CFLAGS_SQLITE/s@-I${prefix}/\[^ \]*include\[^ \]*@@g" \ 
    178         ${worksrcpath}/.qmake.cache 
    179     # DBUS last 
    180     reinplace "/CFLAGS_DBUS/s@-I${prefix}/\[^ \]*include\[^ \]*@@g" \ 
    181         ${worksrcpath}/.qmake.cache 
    182     # during the 'build' stage, 'make' will rebuild the Makefiles that 
    183     # depend on any of these changed files. 
    184 } 
    185  
    186 # use the corrected CPATH and LIBRARY_PATH for build 
     345    # SQLITE 
     346    reinplace "/SQLITE/s@-I${prefix}/\[^ \]*include\[^ \]*@@g" \ 
     347        ${worksrcpath}/.qmake.cache 
     348    reinplace "/SQLITE/s@-L${prefix}/\[^ \]*lib\[^ \]*@@g" \ 
     349        ${worksrcpath}/.qmake.cache 
     350    # DBUS 
     351    reinplace "/DBUS/s@-I${prefix}/\[^ \]*include\[^ \]*@@g" \ 
     352        ${worksrcpath}/.qmake.cache 
     353    reinplace "/DBUS/s@-L${prefix}/\[^ \]*lib\[^ \]*@@g" \ 
     354        ${worksrcpath}/.qmake.cache 
     355    # OPENSSL 
     356    reinplace "/OPENSSL/s@-I${prefix}/\[^ \]*include\[^ \]*@@g" \ 
     357        ${worksrcpath}/.qmake.cache 
     358    reinplace "/OPENSSL/s@-L${prefix}/\[^ \]*lib\[^ \]*@@g" \ 
     359        ${worksrcpath}/.qmake.cache 
     360    # ODBC 
     361    reinplace "/ODBC/s@-I${prefix}/\[^ \]*include\[^ \]*@@g" \ 
     362        ${worksrcpath}/.qmake.cache 
     363    reinplace "/ODBC/s@-L${prefix}/\[^ \]*lib\[^ \]*@@g" \ 
     364        ${worksrcpath}/.qmake.cache 
     365} 
     366 
    187367pre-build { 
     368    # use the corrected CPATH and LIBRARY_PATH for build 
    188369    compiler.cpath [join ${header_path} :] 
    189370    compiler.library_path [join ${library_path} :] 
     371} 
     372 
     373build.target all 
     374 
     375post-destroot { 
     376    set destroot_qt ${destroot}${qt_dir} 
     377 
     378    # Fix .pc and .prl files by changing ${worksrcpath}\${prefix} to 
     379    # ${qt_dir}\${prefix} ("\" means 'take away').  Cannot use 
     380    # "find -E" since it is not necessarily portable. 
     381    regsub ${prefix} ${worksrcpath} "" from_dir 
     382    regsub ${prefix} ${qt_dir} "" to_dir 
     383    foreach fixfile [exec find ${destroot_qt} -name "*.pc"] { 
     384        reinplace "s|${from_dir}|${to_dir}|g" ${fixfile} 
     385    } 
     386    foreach fixfile [exec find ${destroot_qt} -name "*.prl"] { 
     387        reinplace "s|${from_dir}|${to_dir}|g" ${fixfile} 
     388    } 
     389 
     390    # Install documentation. 
     391    xinstall -m 755 -d ${worksrcpath}/${qt_docs_dir} 
     392    xinstall -m 644 -W ${worksrcpath} \ 
     393        INSTALL LGPL_EXCEPTION.txt LICENSE.FDL \ 
     394        LICENSE.GPL3 LICENSE.LGPL README \ 
     395        ${destroot}${qt_docs_dir} 
     396 
     397    # Move .apps into the applications_dir 
     398    xinstall -m 755 -d ${destroot}${qt_apps_dir} 
     399    foreach app [glob ${destroot}/${qt_bins_dir}/*.app] { 
     400        move ${app} ${destroot}${qt_apps_dir} 
     401    } 
     402 
     403    # install qt_menu.nib, used by any applications making use of Qt's 
     404    # application class. 
     405    xinstall -m 755 -d ${destroot_qt}/lib/Resources 
     406    copy ${worksrcpath}/src/gui/mac/qt_menu.nib \ 
     407        ${destroot_qt}/lib/Resources 
     408} 
     409 
     410pre-activate { 
     411    # make sure 'none' is selected by qt4_select, so that there is no 
     412    # conflict between it and this port. 
     413    if {[file exists ${prefix}/bin/qt4_select]} { 
     414        if {[exec ${prefix}/bin/qt4_select -s] != "none"} { 
     415            ui_msg "Disabling 'qt4_select' selection." 
     416            system "exec ${prefix}/bin/qt4_select none" 
     417        } 
     418    } 
     419} 
     420 
     421variant framework description {Build as Frameworks} { 
     422    configure.args-delete -no-framework 
     423    configure.args-append -framework 
    190424} 
    191425 
     
    204438} 
    205439 
    206 variant psql description {Enable PostgreSQL SQL Driver} { 
    207     depends_lib-append port:postgresql83 
    208     lunshift header_path ${prefix}/include/postgresql83 
    209     lunshift library_path ${prefix}/lib/postgresql83 
     440variant psql83 conflicts psql84 psql90 psql91 \ 
     441description {Enable Postgre SQL Driver version 8.3} {} 
     442 
     443variant psql84 conflicts psql83 psql90 psql91 \ 
     444description {Enable Postgre SQL Driver version 8.4} {} 
     445 
     446variant psql90 conflicts psql83 psql84 psql91 \ 
     447description {Enable Postgre SQL Driver version 9.0} {} 
     448 
     449variant psql91 conflicts psql83 psql84 psql90 \ 
     450description {Enable Postgre SQL Driver version 9.1} {} 
     451 
     452set psql_version "" 
     453if {[variant_isset psql83]} { 
     454    set psql_version "83" 
     455} elseif {[variant_isset psql84]} { 
     456    set psql_version "84" 
     457} elseif {[variant_isset psql90]} { 
     458    set psql_version "90" 
     459} elseif {[variant_isset psql91]} { 
     460    set psql_version "91" 
     461} 
     462 
     463if {${psql_version} != ""} { 
     464    depends_lib-append port:postgresql${psql_version} 
     465    lunshift header_path ${prefix}/include/postgresql${psql_version} 
     466    lunshift library_path ${prefix}/lib/postgresql${psql_version} 
    210467    configure.args-delete -no-sql-psql 
    211468    configure.args-append -plugin-sql-psql 
     
    222479} 
    223480 
    224 variant demos description {Build demos} { 
    225    configure.args-delete -nomake demos 
    226 } 
    227  
    228 variant examples description {Build examples} { 
    229    configure.args-delete -nomake examples 
    230 } 
    231  
    232 variant debug description \ 
    233 {Build both release and debug library} { 
    234     configure.args-delete -release 
     481variant demos description {Build demos} {} 
     482 
     483if {![variant_isset demos]} { 
     484   configure.args-append -nomake demos 
     485} 
     486 
     487variant examples description {Build examples} {} 
     488 
     489if {![variant_isset examples]} { 
     490   configure.args-append -nomake examples 
     491} 
     492 
     493variant debug description {Build both release and debug library} {} 
     494 
     495if {[variant_isset debug]} { 
    235496    configure.args-append -debug-and-release 
    236 } 
    237  
    238 variant no_framework description \ 
    239 {Build as libraries, not as framework} { 
    240     configure.args-delete -framework 
    241     configure.args-append -no-framework 
    242 } 
    243  
    244 variant universal { 
    245     configure.universal_args-delete --disable-dependency-tracking 
    246     configure.args-delete -arch \"${build_arch}\" 
    247     configure.args-append -arch \"${universal_archs}\" 
    248     if {[info exists universal_sysroot]} { 
    249         configure.args-append -sdk ${universal_sysroot} 
    250     } 
    251 } 
    252  
    253 # use the 10.4 SDK (the default) for 10.4 only. 
    254 # and, build as Carbon by disabling Cocoa. 
    255 platform darwin 8 { 
    256     configure.args-delete -cocoa 
    257     configure.args-append -carbon 
    258     post-configure { 
    259         fs-traverse item ${worksrcpath} { 
    260             if {"Makefile" == [file tail ${item}]} { 
    261                 reinplace "s|-framework QtHelp|-framework QtHelp -lQtCLucene|" ${item} 
    262             } 
    263         } 
    264     } 
    265 } 
    266  
    267 # use the 10.5 SDK for 10.5, 
    268 # but only if not (doing universal and the universal sysroot is set) 
    269 platform darwin 9 { 
    270     if {![variant_isset universal] || ![info exists universal_sysroot]} { 
    271         if {[file exists ${developer_dir}/SDKs/MacOSX10.5.sdk]} { 
    272             configure.args-append -sdk ${developer_dir}/SDKs/MacOSX10.5.sdk 
    273         } else { 
    274             ui_msg "No SDK found in ${developer_dir}/SDKs for 10.5 ; \ 
    275 configure will probably fail. \n \ 
    276 Please install Apple's Developer Tools again." 
    277         } 
    278     } 
    279 } 
    280  
    281 platform darwin 10 { 
    282     # disable optimizing qmake, since the resulting executable doesn't 
    283     # seem to function correctly on 10.6 only (both i386 and x86_64). 
    284     configure.args-delete -optimized-qmake 
    285  
    286     # use the 10.6 SDK for 10.6, but only if not (doing universal and 
    287     # the universal sysroot is set) 
    288     if {![variant_isset universal] || ![info exists universal_sysroot]} { 
    289         if {[file exists ${developer_dir}/SDKs/MacOSX10.6.sdk]} { 
    290             configure.args-append -sdk ${developer_dir}/SDKs/MacOSX10.6.sdk 
    291         } else { 
    292             ui_msg "No SDK found in ${developer_dir}/SDKs for 10.6 ; \ 
    293 configure will probably fail. \n \ 
    294 Please install Apple's Developer Tools again." 
    295         } 
    296     } 
    297 } 
    298  
    299 build.target        first 
    300 use_parallel_build  yes 
    301  
    302 destroot.destdir    INSTALL_ROOT="${destroot}" 
    303  
    304 post-patch { 
    305     # Ensure that correct compilers are used. 
    306     reinplace "s| g++\$| ${configure.cxx}|" ${worksrcpath}/mkspecs/common/g++.conf 
    307     reinplace "s| gcc\$| ${configure.cc}|"  ${worksrcpath}/mkspecs/common/g++.conf 
    308     reinplace "s| g++\$| ${configure.cxx}|" ${worksrcpath}/mkspecs/macx-g++/qmake.conf 
    309     reinplace "s| gcc\$| ${configure.cc}|"  ${worksrcpath}/mkspecs/macx-g++/qmake.conf 
    310 } 
    311  
    312 post-destroot { 
    313     set destroot_qt ${destroot}${qt_dir} 
    314  
    315     # Fix .pc and .prl files by changing ${worksrcpath}/lib to ${qt_dir}/lib 
    316     foreach fixfile [exec find -E ${destroot_qt} \ 
    317                          -regex "\[^ \]*\\.\(pc|prl\)"] { 
    318         reinplace "s|${worksrcpath}/lib|${qt_dir}/lib|g" ${fixfile} 
    319     } 
    320  
    321     # Install documentation. 
    322     foreach doc { INSTALL LGPL_EXCEPTION.txt LICENSE.GPL3 LICENSE.LGPL README } { 
    323         xinstall -c -m 644 ${worksrcpath}/${doc} \ 
    324             ${destroot_qt}/share/doc/${name} 
    325     } 
    326  
    327     # Fix includes 
    328     # (1) Remove include/Qt ; it should never be used in Qt 4 or newer 
    329     # it is there for legacy purposes (for Qt 3 compatibility) 
    330     if {[file exists ${destroot_qt}/include/Qt]} { 
    331         delete ${destroot_qt}/include/Qt 
    332     } 
    333  
    334     # (2) If using the framework install: remove from 
    335     # ${qt_dir}/include/FOO, for each FOO in the frameworks, and link 
    336     # into the headers provided by the FOO framework 
    337     if {![variant_isset no_framework]} { 
    338         # retrieve list of all installed frameworks 
    339         foreach framework [exec ls ${destroot_qt}/lib | \ 
    340                                grep framework | \ 
    341                                sed -e "s@\\.framework.*@@"] { 
    342             # remove the include directory, if it exists 
    343             if {[file exists ${destroot_qt}/include/${framework}] } { 
    344                 delete ${destroot_qt}/include/${framework} 
    345             } 
    346             # link in the framework's Headers 
    347             ln -s ${qt_dir}/lib/${framework}.framework/Headers \ 
    348                 ${destroot_qt}/include/${framework} 
    349         } 
    350     } 
    351  
    352     # install the select file 
    353     xinstall -m 755 -d ${destroot}${prefix}/etc/select/${select_group} 
    354     xinstall -c -m 644 ${filespath}/${select_name} \ 
    355         ${destroot}${prefix}/etc/select/${select_group}/${select_name} 
    356  
    357     # install cmake files (taken from port 'kdelibs4'). To use this 
    358     # file, include '-DCMAKE_MODULE_PATH=...' in configure.args during 
    359     # the initial 'configure' stage (which uses CMake), to the full 
    360     # path of where the CMake files are installed. 
    361     xinstall -m 755 -d ${destroot_qt}/share/cmake/modules 
    362     foreach file { FindQt4.cmake Qt4ConfigDependentSettings.cmake \ 
    363                        Qt4Macros.cmake } { 
    364         xinstall -c -m 644 ${filespath}/${file} \ 
    365             ${destroot_qt}/share/cmake/modules 
    366     } 
    367  
    368     # then, reinplace the select file as necessary for variants; put 
    369     # these here instead of in the variants because I don't know which 
    370     # are executed first (this post-destroot or a variant's) & the 
    371     # select file needs to be in place first. 
    372     if {![variant_isset debug]} { 
    373         # remove select entries for debug 
    374         reinplace "/debug/ c\\\n-\n" \ 
    375             ${destroot}${prefix}/etc/select/${select_group}/${select_name} 
    376     } 
    377     if {![variant_isset demos]} { 
    378         # remove select entries for demos 
    379         reinplace "/demo/ c\\\n-\n" \ 
    380             ${destroot}${prefix}/etc/select/${select_group}/${select_name} 
    381  
    382         # special case: if no examples and no demos, 
    383         if {![variant_isset examples]} { 
    384             # the directory "share/${name}" will be empty.  keep it 
    385             # around since other ports might install into it. 
    386             destroot.keepdirs ${destroot_qt}/share/${name} 
    387         } 
    388     } 
    389 } 
    390  
    391 post-activate { 
    392     # If this is the first qt4-* installed, select it. 
    393     set current_select [exec ${prefix}/bin/${select_port} -s] 
    394     if {${current_select} == "none"} { 
    395         system "${prefix}/bin/${select_port} ${select_name}" 
    396     } else { 
    397         if {${current_select} != ${select_name}} { 
    398             # Print out the 'select' info. 
    399             ui_msg "\ 
    400 Port ${current_select} is already selected.\n \ 
    401 To fully complete this installation and make ${name} the default,\n \ 
    402 please run:\n \ 
    403 \tsudo ${select_port} ${select_name}" 
    404         } 
    405     } 
    406 } 
    407  
    408 pre-deactivate { 
    409     # If this is qt4-* is selected, select 'none' & tell the user 
    410     set current_select [exec ${prefix}/bin/${select_port} -s] 
    411     if {${current_select} == ${select_name} } { 
    412         system "${prefix}/bin/${select_port} none" 
    413         ui_msg "\ 
    414 Port '${current_select}' was selected; 'none' is now selected.\n \ 
    415 To select another port for group '${select_group}', \ 
    416 please run '${select_port}'." 
    417     } 
    418 } 
     497} else { 
     498    configure.args-append -release 
     499} 
     500 
     501#variant quartz conflicts x11 
     502variant quartz \ 
     503description {Build for Native OSX Quartz GUI, not X11 (default)} {} 
     504 
     505#variant x11 conflicts quartz \ 
     506#description {Build for X11 GUI, not Native OSX Quartz} {} 
     507 
     508# if neither +x11 or +quartz were specified, default to the latter 
     509#if {![variant_isset quartz] && ![variant_isset x11]} 
     510    default_variants +quartz 
     511#} 
     512 
     513# check to see if user specified just "-quartz", which can't work. 
     514#if {![variant_isset quartz] && ![variant_isset x11]} { 
     515#    return -code error \ 
     516#"\n\nThe variant -quartz will not work alone. 
     517#Please select one of +quartz or +x11 as a variant.\n" 
     518#} 
     519 
     520#if {[variant_isset x11]} { 
     521#    return -code error "\n\nVariant +x11 is not yet functional; \ 
     522#please use +quartz for now.\n" 
     523#} 
    419524 
    420525livecheck.type      regex 
    421 livecheck.url       http://get.qt.nokia.com/qt/source/ 
     526livecheck.url       http://download.qt.nokia.com/qt/source/ 
    422527livecheck.regex     "qt-everywhere-opensource-src-(\[0-9a-z.-\]+)${extract.suffix}" 
Note: See TracChangeset for help on using the changeset viewer.