Ticket #47204: patch-build-system-for-MacPorts.diff

File patch-build-system-for-MacPorts.diff, 2.8 KB (added by RJVB (René Bertin), 9 years ago)
  • generator/generator.pri

    diff --git generator/generator.pri generator/generator.pri
    index daa3e0c..3b62b9b 100644
    TEMPLATE = app 
    55TARGET = generator
    66DEPENDPATH += $$GENERATORPATH tests parser
    77mac:CONFIG -= app_bundle
     8
     9LIBS *= -L/opt/local/lib
     10INCLUDEPATH += /opt/local/include/qt4
     11INCLUDEPATH += /opt/local/include/phonon
     12INCLUDEPATH += /opt/local/include
     13
    814INCLUDEPATH += $$GENERATORPATH/.
    915INCLUDEPATH += $$GENERATORPATH/../common
    1016
  • generator/main.h

    diff --git generator/main.h generator/main.h
    index ebf153d..dd65632 100644
     
    4646
    4747#include <QFile>
    4848#include <QDir>
     49#include <QDebug>
    4950
    5051struct Preprocess
    5152{
    struct Preprocess 
    8788            includes += commandLineIncludes.split(path_splitter);       
    8889
    8990        // Include Qt
     91        qDebug() << "includes=" << includes;
    9092        QString qtdir = getenv ("QTDIR");
    9193        if (qtdir.isEmpty()) {
    9294#if defined(Q_OS_MAC)
    9395            qWarning("QTDIR environment variable not set. Assuming standard binary install using frameworks.");
    94             QString frameworkDir = "/Library/Frameworks";
     96            QString frameworkDir = getenv("QTFRAMEWORKS");
     97            if (frameworkDir.isEmpty()) {
     98                frameworkDir = "@QT_FRAMEWORKS_DIR@";
     99            }
    95100            includes << (frameworkDir + "/QtXml.framework/Headers");
    96101            includes << (frameworkDir + "/QtNetwork.framework/Headers");
    97102            includes << (frameworkDir + "/QtCore.framework/Headers");
    98103            includes << (frameworkDir + "/QtGui.framework/Headers");
    99104            includes << (frameworkDir + "/QtOpenGL.framework/Headers");
    100105            includes << frameworkDir;
     106            includes << "@QT_INCLUDES_DIR@";
     107            includes << "@PREFIX@/include/phonon";
     108            includes << "@PREFIX@/include";
    101109#else
    102110            qWarning("QTDIR environment variable not set. This may cause problems with finding the necessary include files.");
    103111#endif
    struct Preprocess 
    110118            includes << (qtdir + "/QtOpenGL");
    111119            includes << qtdir;
    112120        }
     121        qDebug() << "includes=" << includes;
    113122
    114123        foreach (QString include, includes)
    115124            preprocess.push_include_path(QDir::convertSeparators(include).toStdString());       
  • qtbindings/qtbindingsbase.pri

    diff --git qtbindings/qtbindingsbase.pri qtbindings/qtbindingsbase.pri
    index 54eb9a5..3021b73 100644
     
    11TEMPLATE = lib
    22DEPENDPATH += .
    33INCLUDEPATH += .
     4INCLUDEPATH += /opt/local/include/qt4
     5INCLUDEPATH += /opt/local/include/phonon
     6INCLUDEPATH += /opt/local/include
    47DESTDIR = $$PWD/../plugins/script
    58QT += script
    69CONFIG += @ARCHES@ @BUILD_TYPE@
    710GENERATEDCPP = $$PWD/../generated_cpp
    811TARGET=$$qtLibraryTarget($$TARGET)
    912target.path = $$[QT_INSTALL_PLUGINS]/script