Ticket #47204: patch-qtsg_all.diff

File patch-qtsg_all.diff, 11.4 KB (added by michaelld (Michael Dickens), 9 years ago)
  • Portfile

     
    66
    77name                qtscriptgenerator
    88version             0.2.0
     9revision            1
    910categories          devel kde4
    1011license             LGPL-2.1
    1112maintainers         michaelld openmaintainer
     
    1415    Qt bindings for Qt Script. With the generated bindings you get \
    1516    access to substantial portions of the Qt API from within Qt Script.
    1617platforms           darwin
    17 homepage            http://labs.trolltech.com/page/Projects/QtScript/Generator
     18homepage            http://qtscriptgenerator.googlecode.com/
    1819distname            ${name}-src-${version}
    1920master_sites        http://qtscriptgenerator.googlecode.com/files/
    20 checksums           md5     9f82b0aa212f7938de37df46cd27165c \
    21                     sha1    4c1078f26b196156e857c17c9d11a66cfea66f00 \
    22                     rmd160  01c8ce3b4c8e9ebb3bc3c2d7b319846f34baee04
     21checksums           rmd160 01c8ce3b4c8e9ebb3bc3c2d7b319846f34baee04 \
     22                    sha256 895feb274470b9272264c7a141e5bd7f90c92e95d37f346f5f95a352541c8e69
    2323
    2424depends_build-append port:automoc
    2525depends_lib-append  port:phonon
     
    2727patchfiles          patch-generator.diff \
    2828                    patch-qtbindings.diff \
    2929                    patch-generator_typesystem_phonon-qtscript.xml.diff \
    30                     patch-generator_typesystem_phonon.xml.diff
     30                    patch-generator_typesystem_phonon.xml.diff \
     31                    patch-remove-QtScriptFutureIterator.diff \
     32                    patch-include-everything.diff \
     33                    patch-build-system-for-MacPorts.diff
    3134
    3235# check for +debug variant of this port, and make sure phonon was
    3336# installed with +debug as well; if not, error out.  phonon checks to
     
    4952    # copy the QMake build script into place
    5053    copy ${filespath}/qtsg.pro ${worksrcpath}
    5154
     55    reinplace "s|@QT_FRAMEWORKS_DIR@|${qt_frameworks_dir}|g" \
     56        ${worksrcpath}/generator/main.h
     57    reinplace "s|@QT_INCLUDES_DIR@|${qt_includes_dir}|g" \
     58        ${worksrcpath}/generator/main.h
     59    reinplace "s|@PREFIX@|${prefix}|g" \
     60        ${worksrcpath}/generator/main.h
     61
    5262    # allow for universal and non-native building if just the
    5363    # qtbinding scripts, not the generator (which is solely used for
    5464    # generating the scripts)
     
    7080configure.args      "-o Makefile qtsg.pro"
    7181configure.post_args
    7282configure.universal_args
     83configure.env-delete \
     84                    QTDIR=${qt_dir}
     85build.env-delete    QTDIR=${qt_dir}
     86# used by generator/generator:
     87build.env-append    QTFRAMEWORKS=${qt_frameworks_dir}
    7388
    7489# allow ccache, if specified by the user
    7590pre-build {
  • files/patch-build-system-for-MacPorts.diff

     
     1diff --git generator/generator.pri generator/generator.pri
     2index daa3e0c..3b62b9b 100644
     3--- generator/generator.pri
     4+++ generator/generator.pri
     5@@ -5,6 +5,12 @@ TEMPLATE = app
     6 TARGET = generator
     7 DEPENDPATH += $$GENERATORPATH tests parser
     8 mac:CONFIG -= app_bundle
     9+
     10+LIBS *= -L/opt/local/lib
     11+INCLUDEPATH += /opt/local/include/qt4
     12+INCLUDEPATH += /opt/local/include/phonon
     13+INCLUDEPATH += /opt/local/include
     14+
     15 INCLUDEPATH += $$GENERATORPATH/.
     16 INCLUDEPATH += $$GENERATORPATH/../common
     17 
     18diff --git generator/main.h generator/main.h
     19index ebf153d..dd65632 100644
     20--- generator/main.h
     21+++ generator/main.h
     22@@ -46,6 +46,7 @@
     23 
     24 #include <QFile>
     25 #include <QDir>
     26+#include <QDebug>
     27 
     28 struct Preprocess
     29 {
     30@@ -87,17 +88,24 @@ struct Preprocess
     31             includes += commandLineIncludes.split(path_splitter);       
     32 
     33         // Include Qt
     34+        qDebug() << "includes=" << includes;
     35         QString qtdir = getenv ("QTDIR");
     36         if (qtdir.isEmpty()) {
     37 #if defined(Q_OS_MAC)
     38             qWarning("QTDIR environment variable not set. Assuming standard binary install using frameworks.");
     39-            QString frameworkDir = "/Library/Frameworks";
     40+            QString frameworkDir = getenv("QTFRAMEWORKS");
     41+            if (frameworkDir.isEmpty()) {
     42+                frameworkDir = "@QT_FRAMEWORKS_DIR@";
     43+            }
     44             includes << (frameworkDir + "/QtXml.framework/Headers");
     45             includes << (frameworkDir + "/QtNetwork.framework/Headers");
     46             includes << (frameworkDir + "/QtCore.framework/Headers");
     47             includes << (frameworkDir + "/QtGui.framework/Headers");
     48             includes << (frameworkDir + "/QtOpenGL.framework/Headers");
     49             includes << frameworkDir;
     50+            includes << "@QT_INCLUDES_DIR@";
     51+            includes << "@PREFIX@/include/phonon";
     52+            includes << "@PREFIX@/include";
     53 #else
     54             qWarning("QTDIR environment variable not set. This may cause problems with finding the necessary include files.");
     55 #endif
     56@@ -110,6 +118,7 @@ struct Preprocess
     57             includes << (qtdir + "/QtOpenGL");
     58             includes << qtdir;
     59         }
     60+        qDebug() << "includes=" << includes;
     61 
     62         foreach (QString include, includes)
     63             preprocess.push_include_path(QDir::convertSeparators(include).toStdString());       
     64diff --git qtbindings/qtbindingsbase.pri qtbindings/qtbindingsbase.pri
     65index 54eb9a5..3021b73 100644
     66--- qtbindings/qtbindingsbase.pri
     67+++ qtbindings/qtbindingsbase.pri
     68@@ -1,9 +1,12 @@
     69 TEMPLATE = lib
     70 DEPENDPATH += .
     71 INCLUDEPATH += .
     72+INCLUDEPATH += /opt/local/include/qt4
     73+INCLUDEPATH += /opt/local/include/phonon
     74+INCLUDEPATH += /opt/local/include
     75 DESTDIR = $$PWD/../plugins/script
     76 QT += script
     77 CONFIG += @ARCHES@ @BUILD_TYPE@
     78 GENERATEDCPP = $$PWD/../generated_cpp
     79 TARGET=$$qtLibraryTarget($$TARGET)
     80 target.path = $$[QT_INSTALL_PLUGINS]/script
  • files/patch-include-everything.diff

     
     1--- generator/orig.qtscript_masterinclude.h     2015-10-30 10:37:09.000000000 +0100
     2+++ generator/qtscript_masterinclude.h  2015-10-30 10:39:06.000000000 +0100
     3@@ -49,15 +49,47 @@
     4 
     5 #include <QtUiTools/QtUiTools>
     6 
     7-#ifndef QT_NO_XMLPATTERNS
     8+// #ifndef QT_NO_XMLPATTERNS
     9 #  include <QtXmlPatterns/QtXmlPatterns>
     10-#endif
     11+// #endif
     12 
     13-#ifndef QT_NO_WEBKIT
     14+// #ifndef QT_NO_WEBKIT
     15 #  include <QtWebKit/QtWebKit>
     16-#endif
     17+// #endif
     18 
     19-#  include <phonon/phonon>
     20+// #  include <phonon/phonon>
     21+
     22+#include "phonon/abstractaudiooutput.h"                                                             
     23+#include "phonon/abstractmediastream.h"                                                             
     24+#include "phonon/abstractvideooutput.h"                                                             
     25+#include "phonon/addoninterface.h"                                                                 
     26+#include "phonon/audiooutput.h"                                                                     
     27+#include "phonon/audiooutputinterface.h"                                                           
     28+#include "phonon/backendcapabilities.h"                                                             
     29+#include "phonon/backendinterface.h"
     30+#include "phonon/effect.h"
     31+#include "phonon/effectinterface.h"
     32+#include "phonon/effectparameter.h"
     33+#include "phonon/effectwidget.h"
     34+#include "phonon/mediacontroller.h"
     35+#include "phonon/medianode.h"
     36+#include "phonon/mediaobject.h"
     37+#include "phonon/mediaobjectinterface.h"
     38+#include "phonon/mediasource.h"
     39+#include "phonon/objectdescription.h"
     40+#include "phonon/objectdescriptionmodel.h"
     41+#include "phonon/path.h"
     42+#include "phonon/phonondefs.h"
     43+#include "phonon/phononnamespace.h"
     44+#include "phonon/platformplugin.h"
     45+#include "phonon/seekslider.h"
     46+#include "phonon/streaminterface.h"
     47+#include "phonon/videoplayer.h"
     48+#include "phonon/videowidget.h"
     49+#include "phonon/videowidgetinterface.h"
     50+#include "phonon/volumefadereffect.h"
     51+#include "phonon/volumefaderinterface.h"
     52+#include "phonon/volumeslider.h"
     53 
     54 #include "../qtbindings/qtscript_core/qtscriptconcurrent.h"
     55 
  • files/patch-remove-QtScriptFutureIterator.diff

     
     1--- generator/typesystem_core-common.xml.orig   2015-03-20 18:01:15.000000000 +0100
     2+++ generator/typesystem_core-common.xml        2015-03-20 18:01:39.000000000 +0100
     3@@ -1387,7 +1387,6 @@
     4   <object-type name="QFutureIterator" generate="no">
     5     <modify-function signature="operator=(const QFuture&amp;)" remove="all" />
     6   </object-type>
     7-  <object-type name="QtScriptFutureIterator" generic-class="yes" java-name="QFutureIterator" />
     8   <object-type name="QRunnable" />
     9 
     10 
     11--- generator/typesystem_core-qtscript.xml.orig 2015-03-20 18:01:15.000000000 +0100
     12+++ generator/typesystem_core-qtscript.xml      2015-03-20 18:01:49.000000000 +0100
     13@@ -1115,13 +1115,6 @@
     14       <modify-function signature="futures()const" remove="all" />
     15   </object-type>
     16   
     17-  <object-type name="QtScriptFutureIterator">
     18-    <modify-function signature="QFutureIterator(const QFuture &amp;)">
     19-        <modify-argument index="1">
     20-            <replace-type modified-type="QtScriptFuture" />
     21-        </modify-argument>
     22-    </modify-function>       
     23-  </object-type>
     24 
     25 
     26   <!-- QXMLStream stream stuff. This was moved from QtXml to QtCore in 4.4 -->
     27--- generator/typesystem_core.xml.orig  2015-03-20 18:01:15.000000000 +0100
     28+++ generator/typesystem_core.xml       2015-03-20 18:01:56.000000000 +0100
     29@@ -2452,13 +2452,6 @@
     30   <object-type name="QFutureIterator" generate="no">
     31     <modify-function signature="operator=(const QFuture&amp;)" remove="all"/>
     32   </object-type>
     33-  <object-type name="QtScriptFutureIterator" generic-class="yes" java-name="QFutureIterator">
     34-    <modify-function signature="QFutureIterator(const QFuture &amp;)">
     35-        <modify-argument index="1">
     36-            <replace-type modified-type="QtScriptFuture"/>
     37-        </modify-argument>
     38-    </modify-function>       
     39-  </object-type>
     40   <object-type name="QRunnable"/>
     41 
     42 
     43--- generator/typesystem_phonon.xml.orig        2015-03-20 18:01:15.000000000 +0100
     44+++ generator/typesystem_phonon.xml     2015-03-20 18:01:15.000000000 +0100
     45@@ -130,6 +130,7 @@
     46         <modify-function signature="operator!=(Phonon::ObjectDescription)const" remove="all"/>
     47         <modify-function signature="fromIndex(int)" remove="all"/>
     48     </value-type>
     49+    <value-type name="Phonon::DeviceAccessList" java-name="DeviceAccessList" />
     50 
     51     <object-type name="Phonon::AbstractAudioOutput" java-name="AbstractAudioOutput"/>
     52     <object-type name="Phonon::AbstractMediaStream" java-name="AbstractMediaStream"/>
     53--- qtbindings/qtscript_core/qtscriptconcurrent.h.orig  2012-01-23 12:30:03.000000000 +0100
     54+++ qtbindings/qtscript_core/qtscriptconcurrent.h       2015-03-20 18:01:59.000000000 +0100
     55@@ -55,7 +55,6 @@
     56 typedef QFuture<QScriptValue> QtScriptFuture;
     57 typedef QFutureWatcher<QScriptValue> QtScriptFutureWatcher;
     58 typedef QFutureSynchronizer<QScriptValue> QtScriptFutureSynchronizer;
     59-typedef QFutureIterator<QScriptValue> QtScriptFutureIterator;
     60 
     61 #endif // QT_NO_CONCURRENT
     62