Ignore:
Timestamp:
Jul 6, 2015, 1:22:12 PM (4 years ago)
Author:
michaelld@…
Message:

qt4 1.0 PortGroup:
+ use more shortcut settings, e.g., qt_bins_dir, qt_share_dir;
+ rearrange so that common settings are clumped together;
+ change various dirs depending on whether installing into ${prefix} alone or some subdirectory (e.g., ${prefix}/libexec/qt4).
+ with ${qt_dir} is not ${prefix}, also set pkg_config_path to start with Qt's pkg_config_dir;
+ NOTE: These changes do not change current functionality; they are meant to avoid issues with future functionality.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/_resources/port1.0/group/qt4-1.0.tcl

    r124176 r138365  
    22# $Id$
    33
    4 # Copyright (c) 2010-2014 The MacPorts Project
     4# Copyright (c) 2010-2015 The MacPorts Project
    55# All rights reserved.
    66#
     
    6060set qt_dir              ${prefix}
    6161
    62 # standard Qt documents directory
    63 global qt_docs_dir
    64 set qt_docs_dir         ${qt_dir}/share/doc/${qt_name}
    65 
    66 # standard Qt plugins directory
    67 global qt_plugins_dir
    68 set qt_plugins_dir      ${qt_dir}/share/${qt_name}/plugins
    69 
    70 # standard Qt mkspecs directory
    71 global qt_mkspecs_dir
    72 set qt_mkspecs_dir      ${qt_dir}/share/${qt_name}/mkspecs
    73 
    74 # standard Qt imports directory
    75 global qt_imports_dir
    76 set qt_imports_dir      ${qt_dir}/share/${qt_name}/imports
    77 
    7862# standard Qt includes directory
    7963global qt_includes_dir
     
    9680set qt_apps_dir         ${applications_dir}/Qt4
    9781
     82# standard Qt share directory
     83global qt_share_dir
     84set qt_share_dir        ${qt_dir}/share
     85
     86# standard Qt documents directory
     87global qt_docs_dir
     88if {${qt_dir} ne ${prefix}} {
     89    set qt_docs_dir         ${qt_share_dir}/doc
     90} else {
     91    set qt_docs_dir         ${qt_share_dir}/share/doc/${qt_name}
     92}
     93
     94# standard Qt plugins directory
     95global qt_plugins_dir
     96if {${qt_dir} ne ${prefix}} {
     97    set qt_plugins_dir      ${qt_share_dir}/plugins
     98} else {
     99    set qt_plugins_dir      ${qt_share_dir}/${qt_name}/plugins
     100}
     101
     102# standard Qt mkspecs directory
     103global qt_mkspecs_dir
     104if {${qt_dir} ne ${prefix}} {
     105    set qt_mkspecs_dir      ${qt_share_dir}/mkspecs
     106} else {
     107    set qt_mkspecs_dir      ${qt_share_dir}/${qt_name}/mkspecs
     108}
     109
     110# standard Qt imports directory
     111global qt_imports_dir
     112if {${qt_dir} ne ${prefix}} {
     113    set qt_imports_dir      ${qt_share_dir}/imports
     114} else {
     115    set qt_imports_dir      ${qt_share_dir}/${qt_name}/imports
     116}
     117
    98118# standard Qt data directory
    99119global qt_data_dir
    100 set qt_data_dir         ${qt_dir}/share/${qt_name}
     120if {${qt_dir} ne ${prefix}} {
     121    set qt_data_dir         ${qt_share_dir}/data
     122} else {
     123    set qt_data_dir         ${qt_share_dir}/${qt_name}/data
     124}
    101125
    102126# standard Qt translations directory
    103127global qt_translations_dir
    104 set qt_translations_dir ${qt_dir}/share/${qt_name}/translations
     128if {${qt_dir} ne ${prefix}} {
     129    set qt_translations_dir ${qt_share_dir}/translations
     130} else {
     131    set qt_translations_dir ${qt_share_dir}/${qt_name}/translations
     132}
    105133
    106134# standard Qt sysconf directory
    107135global qt_sysconf_dir
    108 set qt_sysconf_dir      ${qt_dir}/etc/${qt_name}
     136if {${qt_dir} ne ${prefix}} {
     137    set qt_sysconf_dir      ${qt_share_dir}/sysconf
     138} else {
     139    set qt_sysconf_dir      ${qt_share_dir}/${qt_name}/sysconf
     140}
    109141
    110142# standard Qt examples directory
    111143global qt_examples_dir
    112 set qt_examples_dir     ${qt_dir}/share/${qt_name}/examples
     144if {${qt_dir} ne ${prefix}} {
     145    set qt_examples_dir     ${qt_share_dir}/examples
     146} else {
     147    set qt_examples_dir     ${qt_share_dir}/${qt_name}/examples
     148}
    113149
    114150# standard Qt demos directory
    115151global qt_demos_dir
    116 set qt_demos_dir        ${qt_dir}/share/${qt_name}/demos
     152if {${qt_dir} ne ${prefix}} {
     153    set qt_demos_dir        ${qt_share_dir}/demos
     154} else {
     155    set qt_demos_dir        ${qt_share_dir}/${qt_name}/demos
     156}
    117157
    118158# standard CMake module directory for Qt-related files
    119159global qt_cmake_module_dir
    120 set qt_cmake_module_dir ${qt_dir}/share/cmake/Modules
     160set qt_cmake_module_dir ${qt_share_dir}/cmake/Modules
    121161
    122162# standard qmake command location
    123163global qt_qmake_cmd
    124 set qt_qmake_cmd        ${qt_dir}/bin/qmake
     164set qt_qmake_cmd        ${qt_bins_dir}/qmake
    125165
    126166# standard qmake spec
     
    130170# standard moc command location
    131171global qt_moc_cmd
    132 set qt_moc_cmd          ${qt_dir}/bin/moc
     172set qt_moc_cmd          ${qt_bins_dir}/moc
    133173
    134174# standard uic command location
    135175global qt_uic_cmd
    136 set qt_uic_cmd          ${qt_dir}/bin/uic
     176set qt_uic_cmd          ${qt_bins_dir}/uic
    137177
    138178# standard lrelease command location
    139179global qt_lrelease_cmd
    140 set qt_lrelease_cmd     ${qt_dir}/bin/lrelease
     180set qt_lrelease_cmd     ${qt_bins_dir}/lrelease
    141181
    142182# standard PKGCONFIG path
     
    184224        MOC=${qt_moc_cmd}
    185225
    186     # make sure the Qt binaries' directory is in the path, if it is
    187     # not the current prefix
     226    # make sure Qt directories are in various paths, if Qt is not
     227    # directly installed into ${prefix}
    188228
    189229    if {${qt_dir} ne ${prefix}} {
    190230        configure.env-append PATH=${qt_dir}/bin:$env(PATH)
     231        configure.pkg_config_path-append ${qt_pkg_config_dir}
    191232    }
    192233} else {
Note: See TracChangeset for help on using the changeset viewer.