Commits

David Boddie committed 8941fb6

Added patches for Python 2.7.
Added a specification for 64-bit x86 CPUs.
Merged PyQt 4.9.4 configure.py changes into the configure-qws.py script.
Fixed unmatched feature tests in patches.

Comments (0)

Files changed (9)

PyQt4-Qt-Embedded-Linux-patches/configure-qws.py

 # This script generates the PyQt configuration and generates the Makefiles.
 #
-# Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com>
-# Copyright (c) 2010 David Boddie <david@boddie.org.uk>
+# Copyright (c) 2012 Riverbank Computing Limited <info@riverbankcomputing.com>
+# Copyright (c) 2012 David Boddie <david@boddie.org.uk>
 # 
 # This file is part of PyQt.
 # 
 # GPL Exception version 1.1, which can be found in the file
 # GPL_EXCEPTION.txt in this package.
 # 
-# Please review the following information to ensure GNU General
-# Public Licensing requirements will be met:
-# http://trolltech.com/products/qt/licenses/licensing/opensource/. If
-# you are unsure which license is appropriate for your use, please
-# review the following information:
-# http://trolltech.com/products/qt/licenses/licensing/licensingoverview
-# or contact the sales department at sales@riverbankcomputing.com.
+# If you are unsure which license is appropriate for your use, please
+# contact the sales department at sales@riverbankcomputing.com.
 # 
 # This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 # WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 cross_sipconfig = sipconfig
 
 # Initialise the globals.
-pyqt_version = 0x040901
-pyqt_version_str = "4.9.1 (QWS)"
-
-sip_min_version = 0x040d01
+pyqt_version = 0x040904
+pyqt_version_str = "4.9.4 (QWS)"
+
+sip_min_version = 0x040d03
 
 qt_version = 0
 qt_edition = ""
 qt_shared = ""
 qt_framework = 0
 
+# This default value will be used by the code that bootstraps the Qt
+# configuration.
+qt_macx_spec = 'macx-g++'
+
 qt_sip_flags = []
 
 pyqt_modules = []
             "comments of generated code [default: include timestamps]")
 
     if sys.platform != 'win32':
-        if sys.platform in ('linux2', 'linux3', 'darwin'):
+        if sys.platform.startswith('linux') or sys.platform == 'darwin':
             pip_default = True
             pip_default_str = "enabled"
         else:
             0x040701: "Qt_4_7_0",
             0x040702: "Qt_4_7_1",
             0x040800: "Qt_4_7_2",
-            0x050000: "Qt_4_8_0"
+            0x050000: "Qt_4_8_0",
+            0x060000: "Qt_5_0_0"
         }
 
     def check_modules(self):
 
         if opts.mwg_ssl_dir:
             ass_lib_dirs = [os.path.join(opts.mwg_ssl_dir, "lib")]
-            ass_libs = ["ssleay32", "libeay32", "QtCore"]
+            ass_libs = ["ssleay32", "libeay32"]
         else:
             ass_lib_dirs = None
-            ass_libs = ["QtCore"]
+            ass_libs = None
 
         # Note that the order in which we check is important for the
         # consolidated module - a module's dependencies must be checked first.
         pyqt_modules.append("QtCore")
 
         check_module("QtGui", "qwidget.h", "new QWidget()")
-        check_module("QtHelp", "qhelpengine.h", "new QHelpEngine(\"foo\")",
-                extra_libs=["QtCore"])
-        check_module("QtMultimedia", "QAudioDeviceInfo",
+        if qt_version < 0x050000: check_module("QtHelp", "qhelpengine.h", "new QHelpEngine(\"foo\")")
+        if qt_version < 0x050000: check_module("QtMultimedia", "QAudioDeviceInfo",
                 "new QAudioDeviceInfo()")
-        check_module("QtNetwork", "qhostaddress.h", "new QHostAddress()")
-        check_module("QtDBus", "qdbusconnection.h",
+        if qt_version < 0x050000: check_module("QtNetwork", "qhostaddress.h", "new QHostAddress()")
+        if qt_version < 0x050000: check_module("QtDBus", "qdbusconnection.h",
                 "QDBusConnection::systemBus()")
-        check_module("QtDeclarative", "qdeclarativeview.h",
+        if qt_version < 0x050000: check_module("QtDeclarative", "qdeclarativeview.h",
                 "new QDeclarativeView()")
-        check_module("QtOpenGL", "qgl.h", "new QGLWidget()")
-        check_module("QtScript", "qscriptengine.h", "new QScriptEngine()")
-        check_module("QtScriptTools", "qscriptenginedebugger.h",
+        if qt_version < 0x050000: check_module("QtOpenGL", "qgl.h", "new QGLWidget()")
+        if qt_version < 0x050000: check_module("QtScript", "qscriptengine.h", "new QScriptEngine()")
+        if qt_version < 0x050000: check_module("QtScriptTools", "qscriptenginedebugger.h",
                 "new QScriptEngineDebugger()")
-        check_module("QtSql", "qsqldatabase.h", "new QSqlDatabase()",
+        if qt_version < 0x050000: check_module("QtSql", "qsqldatabase.h", "new QSqlDatabase()",
                 extra_libs=sql_libs)
-        check_module("QtSvg", "qsvgwidget.h", "new QSvgWidget()")
-        check_module("QtTest", "QtTest", "QTest::qSleep(0)")
-        check_module("QtWebKit", "qwebpage.h", "new QWebPage()")
-        check_module("QtXml", "qxml.h", "new QXmlInputSource()")
-        check_module("QtXmlPatterns", "qxmlname.h", "new QXmlName()")
-        check_module("phonon", "phonon/videowidget.h",
+        if qt_version < 0x050000: check_module("QtSvg", "qsvgwidget.h", "new QSvgWidget()")
+        if qt_version < 0x050000: check_module("QtTest", "QtTest", "QTest::qSleep(0)")
+        if qt_version < 0x050000: check_module("QtWebKit", "qwebpage.h", "new QWebPage()")
+        if qt_version < 0x050000: check_module("QtXml", "qdom.h", "new QDomDocument()")
+        if qt_version < 0x050000: check_module("QtXmlPatterns", "qxmlname.h", "new QXmlName()")
+        if qt_version < 0x050000: check_module("phonon", "phonon/videowidget.h",
                 "new Phonon::VideoWidget()")
-        #check_module("QtAssistant", "qassistantclient.h",
-        #        "new QAssistantClient(\"foo\")", extra_lib_dirs=ass_lib_dirs,
-        #        extra_libs=ass_libs)
+        if qt_version < 0x050000: check_module("QtAssistant", "qassistantclient.h",
+                "new QAssistantClient(\"foo\")", extra_lib_dirs=ass_lib_dirs,
+                extra_libs=ass_libs)
 
         #if not qt_shared:
         #    sipconfig.inform("QtDesigner module disabled with static Qt libraries.")
         #elif sipcfg.universal:
         #    sipconfig.inform("QtDesigner module disabled with universal binaries.")
         #else:
-        #    check_module("QtDesigner", "QExtensionFactory",
+        #    if qt_version < 0x050000: check_module("QtDesigner", "QExtensionFactory",
         #            "new QExtensionFactory()")
 
-        #check_module("QAxContainer", "qaxobject.h", "new QAxObject()",
+        #if qt_version < 0x050000: check_module("QAxContainer", "qaxobject.h", "new QAxObject()",
         #        extra_libs=["QAxContainer"])
 
         #if os.path.isdir(os.path.join(src_dir, "dbus")):
             if cfg.universal:
                 f.write("QMAKE_MAC_SDK = %s\n" % cfg.universal)
 
+            if cfg.deployment_target:
+                f.write("QMAKE_MACOSX_DEPLOYMENT_TARGET = %s\n" % cfg.deployment_target)
+
             inc_path = [cfg.py_inc_dir]
             if qpy in ("QtCore", "QtDBus", "QtDeclarative", "QtOpenGL"):
                 if cfg.sip_inc_dir != cfg.py_inc_dir:
             makefile.generate()
             tool.append("dbus")
 
+        # Only include ElementTree for older versions of Python.
+        #if sipcfg.py_version < 0x020500:
+        #    sipconfig.inform("Creating elementtree Makefile...")
+
+        #    makefile = sipconfig.PythonModuleMakefile(
+        #        configuration=sipcfg,
+        #        dstdir=os.path.join(pyqt_modroot, "elementtree"),
+        #        dir="elementtree"
+        #    )
+
+        #    makefile.generate()
+        #    tool.append("elementtree")
+
+        # Create the pyuic4 wrapper.  Use the GUI version on MacOS (so that
+        # previews work properly and normal console use will work anyway), but
+        # not on Windows (so that normal console use will work).
+        #sipconfig.inform("Creating pyuic4 wrapper...")
+
+        #if sys.platform == 'darwin':
+        #    gui = True
+        #    use_arch = opts.use_arch
+        #else:
+        #    gui = False
+        #    use_arch = ''
+
         # The pyuic directory may not exist if we are building away from the
         # source directory.
         try:
             py_major = cfg.py_version >> 16
             py_minor = (cfg.py_version >> 8) & 0x0ff
 
+            abi = getattr(sys, 'abiflags', '')
+
             if sys.platform == 'win32':
                 # Use abiflags in case it is supported in a future version.
                 lib_dir_flag = quote("-L%s" % cfg.py_lib_dir)
                 from distutils.sysconfig import get_config_vars
                 ducfg = get_config_vars()
 
+                config_args = ducfg.get("CONFIG_ARGS", "")
+
                 if sys.platform == "darwin":
-                    # We need to work out how to specify the right framework
-                    # version.
-                    link = "-framework Python"
-                elif "--enable-shared" in ducfg.get("CONFIG_ARGS", ""):
+                    dynamic_pylib = "--enable-framework" in config_args
+
+                    # It's probably a Python bug that the library name doesn't
+                    # include the ABI information.
+                    abi = ""
+                else:
+                    dynamic_pylib = "--enable-shared" in config_args
+
+                if dynamic_pylib:
                     if glob.glob("%s/lib/libpython%d.%d*" % (ducfg["exec_prefix"], py_major, py_minor)):
                         lib_dir_flag = quote("-L%s/lib" % ducfg["exec_prefix"])
                     elif glob.glob("%s/libpython%d.%d*" % (ducfg["LIBDIR"], py_major, py_minor)):
                         lib_dir_flag = quote("-L%s" % ducfg["LIBDIR"])
                     else:
                         sipconfig.inform("Qt Designer plugin disabled because Python library couldn't be found")
+                        lib_dir_flag = ''
                         opts.designer_plugin = False
 
                     link = "%s -lpython%d.%d%s" % (lib_dir_flag, py_major, py_minor, abi)
     ### Note that the dependency on QtNetwork is only there on Embedded Linux.
     LIB_DEPS = {
         "QtCore": [],
+        "QtDBus": ["QtCore"],
         "QtDeclarative": ["QtNetwork", "QtGui"],
         "QtGui": ["QtCore", "QtNetwork"],
         "QtHelp": ["QtGui"],
 
     overrides is a list of macros overrides from the user.
     """
+    global qt_macx_spec
+
     # Get the name of the qmake configuration file to take the macros from.
     if "QMAKESPEC" in list(os.environ.keys()):
         fname = os.environ["QMAKESPEC"]
 
         if not os.path.dirname(fname):
+            qt_macx_spec = fname
             fname = os.path.join(qt_datadir, "mkspecs", fname)
     elif sys.platform == "darwin":
         # The Qt Mac binary installer defaults to xcode which we don't want.
-        fname = os.path.join(qt_datadir, "mkspecs", "macx-g++")
+        # Use Qt5's macx-clang if it is available, otherwise fall back to
+        # macx-g++.
+        fname = os.path.join(qt_datadir, "mkspecs", "macx-clang")
+        if os.path.isdir(fname):
+            qt_macx_spec = "macx-clang"
+        else:
+            fname = os.path.join(qt_datadir, "mkspecs", "macx-g++")
+            qt_macx_spec = "macx-g++"
     else:
         fname = os.path.join(qt_datadir, "mkspecs", "default")
 
         "QT_INSTALL_LIBS":      qt_libdir
     }
 
-    return cross_sipconfig.parse_build_macros(fname, names, overrides, properties)
+    macros = cross_sipconfig.parse_build_macros(fname, names, overrides, properties)
+
+    if macros is None:
+        return None
+
+    # Make sure we have an entry for MOC (which Qt v5 doesn't provide).
+    if macros.get("MOC", "") == "":
+        default_moc = os.path.join(qt_bindir, "moc")
+        if sys.platform == 'win32':
+            default_moc += ".exe"
+
+        macros["MOC"] = default_moc
+
+    return macros
 
 
 def check_qt_installation(macros):
     """
     if sys.platform == "darwin":
         # The Qt binary installer has macx-xcode as the default.
-        args = "-spec %s %s" % (cfg.platform, args)
+        args = "-spec %s %s" % (qt_macx_spec, args)
 
     return args
 
 #include <QLibraryInfo>
 #include <QTextStream>
 
+// This seems to be missing from the Qt v5 alpha.
+#if !defined(QT_EDITION_OPENSOURCE)
+#define QT_EDITION_OPENSOURCE   8
+#endif
+
 int main(int argc, char **argv)
 {
     QCoreApplication app(argc, argv);

PyQt4-Qt-Embedded-Linux-patches/sip/QtGui/qstyleoption.sip.diff

---- sip/QtGui/qstyleoption.sip.old	2012-10-13 22:18:55.000000000 +0200
-+++ sip/QtGui/qstyleoption.sip	2012-10-13 22:22:47.000000000 +0200
+--- sip/QtGui/qstyleoption.sip.old	2012-10-14 16:56:24.000000000 +0200
++++ sip/QtGui/qstyleoption.sip	2012-10-14 17:52:14.000000000 +0200
 @@ -118,24 +118,31 @@
          break;
      #endif
      case QStyleOption::SO_ToolBar:
          sipType = sipType_QStyleOptionToolBar;
          break;
-@@ -231,7 +241,9 @@
-     case QStyleOption::SO_ToolButton:
+@@ -232,6 +242,7 @@
          sipType = sipType_QStyleOptionToolButton;
          break;
-+    #endif
      
 +    #if defined(SIP_FEATURE_PyQt_ItemViews)
      case QStyleOption::SO_ViewItem:
      #if QT_VERSION >= 0x050000
          sipType = sipType_QStyleOptionViewItem;
-@@ -262,6 +274,7 @@
+@@ -262,6 +273,7 @@
          }
          break;
      #endif
      
      default:
          if ((sipCpp->type & QStyleOption::SO_ComplexCustomBase) == QStyleOption::SO_ComplexCustomBase)
-@@ -509,6 +522,9 @@
+@@ -509,6 +521,9 @@
  QFlags<QStyleOptionFrameV2::FrameFeature> operator|(QStyleOptionFrameV2::FrameFeature f1, QFlags<QStyleOptionFrameV2::FrameFeature> f2);
  %End
  
  class QStyleOptionTabWidgetFrame : QStyleOption
  {
  %TypeHeaderCode
-@@ -564,6 +580,8 @@
+@@ -564,6 +579,8 @@
      QStyleOptionTabWidgetFrame(const QStyleOptionTabWidgetFrame &other);
  };
  
  class QStyleOptionTabBarBase : QStyleOption
  {
  %TypeHeaderCode
-@@ -613,6 +631,8 @@
+@@ -613,6 +630,8 @@
      QStyleOptionTabBarBase(const QStyleOptionTabBarBase &other);
  };
  
  class QStyleOptionHeader : QStyleOption
  {
  %TypeHeaderCode
-@@ -752,6 +772,8 @@
+@@ -752,6 +771,8 @@
  
  QFlags<QStyleOptionButton::ButtonFeature> operator|(QStyleOptionButton::ButtonFeature f1, QFlags<QStyleOptionButton::ButtonFeature> f2);
  
  class QStyleOptionTab : QStyleOption
  {
  %TypeHeaderCode
-@@ -872,6 +894,8 @@
+@@ -872,6 +893,8 @@
  
  %End
  
  class QStyleOptionProgressBar : QStyleOption
  {
  %TypeHeaderCode
-@@ -1104,6 +1128,7 @@
+@@ -1104,6 +1127,7 @@
      QStyleOptionDockWidget(const QStyleOptionDockWidget &other);
  };
  
  class QStyleOptionViewItem : QStyleOption
  {
  %TypeHeaderCode
-@@ -1215,6 +1240,7 @@
+@@ -1215,6 +1239,7 @@
  %If (Qt_5_0_0 -)
  QFlags<QStyleOptionViewItem::ViewItemFeature> operator|(QStyleOptionViewItem::ViewItemFeature f1, QFlags<QStyleOptionViewItem::ViewItemFeature> f2);
  %End
  
  class QStyleOptionToolBox : QStyleOption
  {
-@@ -1288,6 +1314,8 @@
+@@ -1288,6 +1313,8 @@
      QStyleOptionToolBox(const QStyleOptionToolBox &other);
  };
  
  class QStyleOptionRubberBand : QStyleOption
  {
  %TypeHeaderCode
-@@ -1333,6 +1361,8 @@
+@@ -1333,6 +1360,8 @@
      QStyleOptionRubberBand(const QStyleOptionRubberBand &other);
  };
  
  class QStyleOptionComplex : QStyleOption
  {
  %TypeHeaderCode
-@@ -1378,6 +1408,7 @@
+@@ -1378,6 +1407,7 @@
      QStyleOptionComplex(const QStyleOptionComplex &other);
  };
  
  class QStyleOptionSlider : QStyleOptionComplex
  {
  %TypeHeaderCode
-@@ -1432,7 +1463,9 @@
+@@ -1432,7 +1462,9 @@
      QStyleOptionSlider();
      QStyleOptionSlider(const QStyleOptionSlider &other);
  };
  class QStyleOptionSpinBox : QStyleOptionComplex
  {
  %TypeHeaderCode
-@@ -1478,6 +1511,7 @@
+@@ -1478,6 +1510,7 @@
      QStyleOptionSpinBox();
      QStyleOptionSpinBox(const QStyleOptionSpinBox &other);
  };
  
  class QStyleOptionToolButton : QStyleOptionComplex
  {
-@@ -1746,6 +1780,8 @@
+@@ -1746,6 +1779,8 @@
      QRegion region;
  };
  
  class QStyleOptionToolBar : QStyleOption
  {
  %TypeHeaderCode
-@@ -1813,6 +1849,8 @@
+@@ -1813,6 +1848,8 @@
  
  QFlags<QStyleOptionToolBar::ToolBarFeature> operator|(QStyleOptionToolBar::ToolBarFeature f1, QFlags<QStyleOptionToolBar::ToolBarFeature> f2);
  
  class QStyleOptionGroupBox : QStyleOptionComplex
  {
  %TypeHeaderCode
-@@ -1867,6 +1905,7 @@
+@@ -1867,6 +1904,7 @@
      QStyleOptionGroupBox(const QStyleOptionGroupBox &other);
  };
  
  %If (Qt_4_2_0 - Qt_5_0_0)
  
  class QStyleOptionViewItemV2 : QStyleOptionViewItem
-@@ -1908,7 +1947,10 @@
+@@ -1908,7 +1946,10 @@
  %If (Qt_4_2_0 - Qt_5_0_0)
  QFlags<QStyleOptionViewItemV2::ViewItemFeature> operator|(QStyleOptionViewItemV2::ViewItemFeature f1, QFlags<QStyleOptionViewItemV2::ViewItemFeature> f2);
  %End
  
  class QStyleOptionSizeGrip : QStyleOptionComplex
  {
-@@ -1933,6 +1975,7 @@
+@@ -1933,6 +1974,7 @@
  };
  
  %End
  %If (Qt_4_2_0 -)
  
  class QStyleOptionGraphicsItem : QStyleOption
-@@ -1984,6 +2027,7 @@
+@@ -1984,6 +2026,7 @@
  };
  
  %End
  %If (Qt_4_3_0 - Qt_5_0_0)
  
  class QStyleOptionViewItemV3 : QStyleOptionViewItemV2
-@@ -2006,6 +2050,7 @@
+@@ -2006,6 +2049,7 @@
  };
  
  %End
  %If (Qt_4_3_0 - Qt_5_0_0)
  
  class QStyleOptionToolBoxV2 : QStyleOptionToolBox
-@@ -2067,6 +2112,8 @@
+@@ -2067,6 +2111,8 @@
  };
  
  %End
  %If (Qt_4_4_0 - Qt_5_0_0)
  
  class QStyleOptionViewItemV4 : QStyleOptionViewItemV3
-@@ -2124,6 +2171,9 @@
+@@ -2124,6 +2170,9 @@
  };
  
  %End
  %If (Qt_4_5_0 - Qt_5_0_0)
  
  class QStyleOptionTabBarBaseV2 : QStyleOptionTabBarBase
-@@ -2169,6 +2219,9 @@
+@@ -2169,6 +2218,9 @@
  };
  
  %End
  %If (Qt_4_6_0 - Qt_5_0_0)
  
  class QStyleOptionTabWidgetFrameV2 : QStyleOptionTabWidgetFrame
-@@ -2191,3 +2244,4 @@
+@@ -2191,3 +2243,4 @@
  };
  
  %End

PyQt4-Qt-Embedded-Linux-patches/sip/QtGui/qtextlayout.sip.diff

---- sip/QtGui/qtextlayout.sip.old	2012-10-13 21:16:21.000000000 +0200
-+++ sip/QtGui/qtextlayout.sip	2012-10-13 21:16:21.000000000 +0200
+--- sip/QtGui/qtextlayout.sip.old	2012-10-14 14:38:39.000000000 +0200
++++ sip/QtGui/qtextlayout.sip	2012-10-14 14:42:36.000000000 +0200
 @@ -126,12 +126,14 @@
  %If (Qt_4_8_0 -)
      int rightCursorPosition(int oldPos) const;
  
  private:
      QTextLayout(const QTextLayout &);
+@@ -195,7 +197,9 @@
+ %If (Qt_4_7_0 -)
+     qreal horizontalAdvance() const;
+ %End
++%If (PyQt_RawFont)
+ %If (Qt_5_0_0 -)
+     QList<QGlyphRun> glyphRuns(int from = -1, int length = -1) const;
+ %End
++%End
+ };

Python-2.7-embedded-patches/LICENSE.PYTHON

+PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
+--------------------------------------------
+
+1. This LICENSE AGREEMENT is between the Python Software Foundation
+("PSF"), and the Individual or Organization ("Licensee") accessing and
+otherwise using this software ("Python") in source or binary form and
+its associated documentation.
+
+2. Subject to the terms and conditions of this License Agreement, PSF hereby
+grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
+analyze, test, perform and/or display publicly, prepare derivative works,
+distribute, and otherwise use Python alone or in any derivative version,
+provided, however, that PSF's License Agreement and PSF's notice of copyright,
+i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Python
+Software Foundation; All Rights Reserved" are retained in Python alone or in any
+derivative version prepared by Licensee.
+
+3. In the event Licensee prepares a derivative work that is based on
+or incorporates Python or any part thereof, and wants to make
+the derivative work available to others as provided herein, then
+Licensee hereby agrees to include in any such work a brief summary of
+the changes made to Python.
+
+4. PSF is making Python available to Licensee on an "AS IS"
+basis.  PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
+IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
+DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
+FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
+INFRINGE ANY THIRD PARTY RIGHTS.
+
+5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
+FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
+A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
+OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
+
+6. This License Agreement will automatically terminate upon a material
+breach of its terms and conditions.
+
+7. Nothing in this License Agreement shall be deemed to create any
+relationship of agency, partnership, or joint venture between PSF and
+Licensee.  This License Agreement does not grant permission to use PSF
+trademarks or trade name in a trademark sense to endorse or promote
+products or services of Licensee, or any third party.
+
+8. By copying, installing or otherwise using Python, Licensee
+agrees to be bound by the terms and conditions of this License
+Agreement.

Python-2.7-embedded-patches/Makefile.pre.in.diff

+--- Makefile.pre.in.orig	2012-04-10 01:07:33.000000000 +0200
++++ Makefile.pre.in	2012-10-14 03:01:38.000000000 +0200
+@@ -160,7 +160,7 @@
+ 
+ LIBRARY=	@LIBRARY@
+ LDLIBRARY=      @LDLIBRARY@
+-BLDLIBRARY=     @BLDLIBRARY@
++BLDLIBRARY=     -Xlinker -rpath $(LIBDIR) @BLDLIBRARY@
+ DLLLIBRARY=	@DLLLIBRARY@
+ LDLIBRARYDIR=   @LDLIBRARYDIR@
+ INSTSONAME=	@INSTSONAME@
+@@ -182,6 +182,8 @@
+ 
+ PYTHON=		python$(EXE)
+ BUILDPYTHON=	python$(BUILDEXE)
++NATIVEPYTHON=	$(srcdir)/../Python-native/python
++NATIVECC=	`which cc`
+ 
+ # The task to run while instrument when building the profile-opt target
+ PROFILE_TASK=	$(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
+@@ -243,6 +245,7 @@
+ 		Parser/tokenizer.h
+ 
+ PGENOBJS=	$(PGENMAIN) $(POBJS) $(PGOBJS)
++NATIVEPGENSOURCES=	$(PGENOBJS:.o=.c)
+ 
+ ##########################################################################
+ # AST
+@@ -402,14 +405,13 @@
+ 			$(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
+ 
+ platform: $(BUILDPYTHON)
+-	$(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
+-
++	$(NATIVEPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
+ 
+ # Build the shared modules
+ sharedmods: $(BUILDPYTHON)
+ 	@case $$MAKEFLAGS in \
+-	*s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
+-	*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
++	*s*) $(RUNSHARED) PREFIX='$(prefix)' CC='$(CC) -I$(INCLUDEDIR)' LDSHARED='$(BLDSHARED) -L$(srcdir) -L$(LIBDIR)' OPT='$(OPT)' $(NATIVEPYTHON) -E $(srcdir)/setup.py -q build;; \
++	*) $(RUNSHARED) PREFIX='$(prefix)' CC='$(CC) -I$(INCLUDEDIR)' LDSHARED='$(BLDSHARED) -L$(srcdir) -L$(LIBDIR)' OPT='$(OPT)' $(NATIVEPYTHON) -E $(srcdir)/setup.py build;; \
+ 	esac
+ 
+ # Build static library
+@@ -546,8 +548,8 @@
+ 		$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
+ 		-touch Parser/pgen.stamp
+ 
+-$(PGEN):	$(PGENOBJS)
+-		$(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
++$(PGEN):
++		$(NATIVECC) $(PY_CFLAGS) $(OPT) $(LDFLAGS) $(NATIVEPGENSOURCES) $(LIBS) -o $(PGEN)
+ 
+ Parser/grammar.o:	$(srcdir)/Parser/grammar.c \
+ 				$(srcdir)/Include/token.h \
+@@ -771,7 +773,7 @@
+ oldsharedinstall: $(DESTSHARED) $(SHAREDMODS)
+ 		@for i in X $(SHAREDMODS); do \
+ 		  if test $$i != X; then \
+-		    echo $(INSTALL_SHARED) $$i $(DESTSHARED)/`basename $$i`; \
++		    echo $(INSTALL_SHARED) $$i $(DESTDIR)$(DESTSHARED)/`basename $$i`; \
+ 		    $(INSTALL_SHARED) $$i $(DESTDIR)$(DESTSHARED)/`basename $$i`; \
+ 		  fi; \
+ 		done
+@@ -780,7 +782,7 @@
+ 		@for i in $(DESTDIRS); \
+ 		do \
+ 			if test ! -d $(DESTDIR)$$i; then \
+-				echo "Creating directory $$i"; \
++				echo "Creating directory $(DESTDIR)$$i"; \
+ 				$(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
+ 			else    true; \
+ 			fi; \
+@@ -814,7 +816,7 @@
+ 	@for i in $(BINDIR) $(LIBDIR); \
+ 	do \
+ 		if test ! -d $(DESTDIR)$$i; then \
+-			echo "Creating directory $$i"; \
++			echo "Creating directory $(DESTDIR)$$i"; \
+ 			$(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
+ 		else	true; \
+ 		fi; \
+@@ -837,7 +839,7 @@
+ 	@for i in $(MANDIR) $(MANDIR)/man1; \
+ 	do \
+ 		if test ! -d $(DESTDIR)$$i; then \
+-			echo "Creating directory $$i"; \
++			echo "Creating directory $(DESTDIR)$$i"; \
+ 			$(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
+ 		else	true; \
+ 		fi; \
+@@ -882,7 +884,7 @@
+ 	@for i in $(SCRIPTDIR) $(LIBDEST); \
+ 	do \
+ 		if test ! -d $(DESTDIR)$$i; then \
+-			echo "Creating directory $$i"; \
++			echo "Creating directory $(DESTDIR)$$i"; \
+ 			$(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
+ 		else	true; \
+ 		fi; \
+@@ -893,7 +895,7 @@
+ 		if test ! -d $$a; then continue; else true; fi; \
+ 		b=$(LIBDEST)/$$d; \
+ 		if test ! -d $(DESTDIR)$$b; then \
+-			echo "Creating directory $$b"; \
++			echo "Creating directory $(DESTDIR)$$b"; \
+ 			$(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$b; \
+ 		else	true; \
+ 		fi; \
+@@ -902,10 +904,10 @@
+ 	do \
+ 		if test -x $$i; then \
+ 			$(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \
+-			echo $(INSTALL_SCRIPT) $$i $(LIBDEST); \
++			echo $(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \
+ 		else \
+ 			$(INSTALL_DATA) $$i $(DESTDIR)$(LIBDEST); \
+-			echo $(INSTALL_DATA) $$i $(LIBDEST); \
++			echo $(INSTALL_DATA) $$i $(DESTDIR)$(LIBDEST); \
+ 		fi; \
+ 	done
+ 	@for d in $(LIBSUBDIRS); \
+@@ -924,10 +926,10 @@
+ 			*) \
+ 				if test -d $$i; then continue; fi; \
+ 				if test -x $$i; then \
+-				    echo $(INSTALL_SCRIPT) $$i $$b; \
++				    echo $(INSTALL_SCRIPT) $$i $(DESTDIR)$$b; \
+ 				    $(INSTALL_SCRIPT) $$i $(DESTDIR)$$b; \
+ 				else \
+-				    echo $(INSTALL_DATA) $$i $$b; \
++				    echo $(INSTALL_DATA) $$i $(DESTDIR)$$b; \
+ 				    $(INSTALL_DATA) $$i $(DESTDIR)$$b; \
+ 				fi;; \
+ 			esac; \
+@@ -938,26 +940,26 @@
+ 		$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
+ 			$(DESTDIR)$(LIBDEST)/distutils/tests ; \
+ 	fi
+-	PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
+-		./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
+-		-d $(LIBDEST) -f \
+-		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+-		$(DESTDIR)$(LIBDEST)
+-	PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+-		./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
+-		-d $(LIBDEST) -f \
+-		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+-		$(DESTDIR)$(LIBDEST)
+-	-PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
+-		./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
+-		-d $(LIBDEST)/site-packages -f \
+-		-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+-	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+-		./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
+-		-d $(LIBDEST)/site-packages -f \
+-		-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+-	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+-		./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
++	#PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
++	#	./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
++	#	-d $(LIBDEST) -f \
++	#	-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
++	#	$(DESTDIR)$(LIBDEST)
++	#PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
++	#	./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
++	#	-d $(LIBDEST) -f \
++	#	-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
++	#	$(DESTDIR)$(LIBDEST)
++	#-PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
++	#	./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
++	#	-d $(LIBDEST)/site-packages -f \
++	#	-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
++	#-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
++	#	./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
++	#	-d $(LIBDEST)/site-packages -f \
++	#	-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
++	#-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
++	#	./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
+ 
+ # Create the PLATDIR source directory, if one wasn't distributed..
+ $(srcdir)/Lib/$(PLATDIR):
+@@ -980,14 +982,14 @@
+ 	@for i in $(INCLDIRSTOMAKE); \
+ 	do \
+ 		if test ! -d $(DESTDIR)$$i; then \
+-			echo "Creating directory $$i"; \
++			echo "Creating directory $(DESTDIR)$$i"; \
+ 			$(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
+ 		else	true; \
+ 		fi; \
+ 	done
+ 	@for i in $(srcdir)/Include/*.h; \
+ 	do \
+-		echo $(INSTALL_DATA) $$i $(INCLUDEPY); \
++		echo $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY); \
+ 		$(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY); \
+ 	done
+ 	$(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h
+@@ -1003,7 +1005,7 @@
+ 	@for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \
+ 	do \
+ 		if test ! -d $(DESTDIR)$$i; then \
+-			echo "Creating directory $$i"; \
++			echo "Creating directory $(DESTDIR)$$i"; \
+ 			$(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
+ 		else	true; \
+ 		fi; \
+@@ -1062,7 +1064,7 @@
+ # Install the dynamically loadable modules
+ # This goes into $(exec_prefix)
+ sharedinstall: sharedmods
+-	$(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
++	$(RUNSHARED) PREFIX='$(prefix)' $(NATIVEPYTHON) -E $(srcdir)/setup.py install \
+ 	   	--prefix=$(prefix) \
+ 		--install-scripts=$(BINDIR) \
+ 		--install-platlib=$(DESTSHARED) \
+@@ -1135,7 +1137,7 @@
+ # This installs a few of the useful scripts in Tools/scripts
+ scriptsinstall:
+ 	SRCDIR=$(srcdir) $(RUNSHARED) \
+-	./$(BUILDPYTHON) $(srcdir)/Tools/scripts/setup.py install \
++	$(NATIVEPYTHON) $(srcdir)/Tools/scripts/setup.py install \
+ 	--prefix=$(prefix) \
+ 	--install-scripts=$(BINDIR) \
+ 	--root=$(DESTDIR)/

Python-2.7-embedded-patches/configure.diff

Empty file added.

Python-2.7-embedded-patches/setup.py.diff

+--- setup.py.orig	2010-07-17 14:31:09.000000000 +0200
++++ setup.py	2010-09-15 01:09:23.000000000 +0200
+@@ -160,7 +160,7 @@
+ 
+         # Fix up the autodetected modules, prefixing all the source files
+         # with Modules/ and adding Python's include directory to the path.
+-        (srcdir,) = sysconfig.get_config_vars('srcdir')
++        srcdir = os.curdir
+         if not srcdir:
+             # Maybe running on Windows but not using CYGWIN?
+             raise ValueError("No source directory; cannot proceed.")
+@@ -316,6 +316,9 @@
+         ext_filename = os.path.join(
+             self.build_lib,
+             self.get_ext_filename(self.get_ext_fullname(ext.name)))
++
++        #if global_opts.has_key("cross-compile"):
++        return
+         try:
+             imp.load_dynamic(ext.name, ext_filename)
+         except ImportError, why:
+@@ -410,8 +413,9 @@
+         lib_dirs = self.compiler.library_dirs + [
+             '/lib64', '/usr/lib64',
+             '/lib', '/usr/lib',
++            os.getenv("PREFIX")+'/lib'
+             ]
+-        inc_dirs = self.compiler.include_dirs + ['/usr/include']
++        inc_dirs = self.compiler.include_dirs + ['/usr/include', os.getenv("PREFIX")+'/include']
+         exts = []
+         missing = []
+ 
+@@ -507,7 +511,7 @@
+         exts.append( Extension('_testcapi', ['_testcapimodule.c'],
+                                depends=['testcapi_long.h']) )
+         # profilers (_lsprof is for cProfile.py)
+-        exts.append( Extension('_hotshot', ['_hotshot.c']) )
++        #exts.append( Extension('_hotshot', ['_hotshot.c']) )
+         exts.append( Extension('_lsprof', ['_lsprof.c', 'rotatingtree.c']) )
+         # static Unicode character database
+         if have_unicode:
+@@ -1192,36 +1196,36 @@
+         # Curses support, requiring the System V version of curses, often
+         # provided by the ncurses library.
+         panel_library = 'panel'
+-        if curses_library.startswith('ncurses'):
+-            if curses_library == 'ncursesw':
+-                # Bug 1464056: If _curses.so links with ncursesw,
+-                # _curses_panel.so must link with panelw.
+-                panel_library = 'panelw'
+-            curses_libs = [curses_library]
+-            exts.append( Extension('_curses', ['_cursesmodule.c'],
+-                                   libraries = curses_libs) )
+-        elif curses_library == 'curses' and platform != 'darwin':
+-                # OSX has an old Berkeley curses, not good enough for
+-                # the _curses module.
+-            if (self.compiler.find_library_file(lib_dirs, 'terminfo')):
+-                curses_libs = ['curses', 'terminfo']
+-            elif (self.compiler.find_library_file(lib_dirs, 'termcap')):
+-                curses_libs = ['curses', 'termcap']
+-            else:
+-                curses_libs = ['curses']
+-
+-            exts.append( Extension('_curses', ['_cursesmodule.c'],
+-                                   libraries = curses_libs) )
+-        else:
+-            missing.append('_curses')
+-
+-        # If the curses module is enabled, check for the panel module
+-        if (module_enabled(exts, '_curses') and
+-            self.compiler.find_library_file(lib_dirs, panel_library)):
+-            exts.append( Extension('_curses_panel', ['_curses_panel.c'],
+-                                   libraries = [panel_library] + curses_libs) )
+-        else:
+-            missing.append('_curses_panel')
++#        if curses_library.startswith('ncurses'):
++#            if curses_library == 'ncursesw':
++#                # Bug 1464056: If _curses.so links with ncursesw,
++#                # _curses_panel.so must link with panelw.
++#                panel_library = 'panelw'
++#            curses_libs = [curses_library]
++#            exts.append( Extension('_curses', ['_cursesmodule.c'],
++#                                   libraries = curses_libs) )
++#        elif curses_library == 'curses' and platform != 'darwin':
++#                # OSX has an old Berkeley curses, not good enough for
++#                # the _curses module.
++#            if (self.compiler.find_library_file(lib_dirs, 'terminfo')):
++#                curses_libs = ['curses', 'terminfo']
++#            elif (self.compiler.find_library_file(lib_dirs, 'termcap')):
++#                curses_libs = ['curses', 'termcap']
++#            else:
++#                curses_libs = ['curses']
++#
++#            exts.append( Extension('_curses', ['_cursesmodule.c'],
++#                                   libraries = curses_libs) )
++#        else:
++#            missing.append('_curses')
++#
++#        # If the curses module is enabled, check for the panel module
++#        if (module_enabled(exts, '_curses') and
++#            self.compiler.find_library_file(lib_dirs, panel_library)):
++#            exts.append( Extension('_curses_panel', ['_curses_panel.c'],
++#                                   libraries = [panel_library] + curses_libs) )
++#        else:
++#            missing.append('_curses_panel')
+ 
+         # Andrew Kuchling's zlib module.  Note that some versions of zlib
+         # 1.1.3 have security problems.  See CERT Advisory CA-2002-07:
+@@ -1570,7 +1574,8 @@
+         self.extensions.extend(exts)
+ 
+         # Call the method for detecting whether _tkinter can be compiled
+-        self.detect_tkinter(inc_dirs, lib_dirs)
++        #if not global_opts.has_key("no-tkinter"):
++        #    self.detect_tkinter(inc_dirs, lib_dirs)
+ 
+         if '_tkinter' not in [e.name for e in self.extensions]:
+             missing.append('_tkinter')
     dest_dir = env.get("DESTDIR", "")
     
     env_commands = (
-        "CC="+os.path.join(env["TARGET_TOOLS_BIN"], env["TARGET_PLATFORM_CC"]) + " " + \
-        "CXX="+os.path.join(env["TARGET_TOOLS_BIN"], env["TARGET_PLATFORM_CXX"]) + " " + \
-        'LDSHARED="'+os.path.join(env["TARGET_TOOLS_BIN"], env["TARGET_PLATFORM_LDSHARED"]) + \
-        ' -shared" '
+        "PATH="+env["TARGET_TOOLS_BIN"]+":"+env["ORIGINAL_PATH"] + " " + \
+        "CC="+env["TARGET_PLATFORM_CC"] + " " + \
+        "CXX="+env["TARGET_PLATFORM_CXX"] + " " + \
+        'LDSHARED="'+env["TARGET_PLATFORM_LDSHARED"] + ' -shared" '
         )
     
     # zlib doesn't provide a way to specify separate prefix and installation
     system("./autogen.sh")
     
     env_commands = (
-        "CC="+os.path.join(env["TARGET_TOOLS_BIN"], env["TARGET_PLATFORM_CC"]) + " " + \
-        "CXX="+os.path.join(env["TARGET_TOOLS_BIN"], env["TARGET_PLATFORM_CXX"]) + " " + \
-        "LDSHARED="+os.path.join(env["TARGET_TOOLS_BIN"], env["TARGET_PLATFORM_LDSHARED"]) + " "
+        "PATH="+env["TARGET_TOOLS_BIN"]+":"+env["ORIGINAL_PATH"] + " " + \
+        "CC="+env["TARGET_PLATFORM_CC"] + " " + \
+        "CXX="+env["TARGET_PLATFORM_CXX"] + " " + \
+        "LDSHARED="+env["TARGET_PLATFORM_LDSHARED"] + " "
         "LDFLAGS=-L"+os.path.join(env["TARGETDIR"], "lib") + " "
 #        "CFLAGS=-DDEBUG "
         )
     system("patch configure "+os.path.join(env["PYTHONPATCHDIR"], "configure.diff"))
     
     env_commands = (
-        "PATH="+os.path.join(env["NATIVE_TOOLS"], "bin")+":"+env["ORIGINAL_PATH"] + " "
+        "PATH="+env["TARGET_TOOLS_BIN"]+":"+os.path.join(env["NATIVE_TOOLS"], "bin")+":"+env["ORIGINAL_PATH"] + " "
         "LD_LIBRARY_PATH="+os.path.join(env["NATIVE_TOOLS"], "lib") + " "
         )
     
     print
     
     env_commands += (
-        "CC="+os.path.join(env["TARGET_TOOLS_BIN"], env["TARGET_PLATFORM_CC"]) + " " + \
-        "CXX="+os.path.join(env["TARGET_TOOLS_BIN"], env["TARGET_PLATFORM_CXX"]) + " " + \
+        "CC="+env["TARGET_PLATFORM_CC"] + " " + \
+        "CXX="+env["TARGET_PLATFORM_CXX"] + " " + \
         "CFLAGS=-I"+os.path.join(env["TARGETDIR"], "include") + " " + \
         "LDFLAGS=-L"+os.path.join(env["TARGETDIR"], "lib") + " "
         )
     "QT_NO_QWS_TRANSFORMED": "",
     "QT_NO_QWS_VNC": "",
     "QT_NO_RASTERCALLBACKS": "",                                # not wrapped
-    "QT_NO_RAWFONT": "",                                        # internal
+    "QT_NO_RAWFONT": "PyQt_RawFont",                            # internal
     "QT_NO_RESIZEHANDLER": "",                                  # internal
     "QT_NO_RUBBERBAND": "PyQt_RubberBand",
     "QT_NO_SCRIPT": "",                                 # internal/unnecessary

sip-Qt-Embedded-Linux-changes/specs/linux-x86_64-g++

+#
+# qmake configuration for linux-x86_64-g++
+#
+
+MAKEFILE_GENERATOR	= UNIX
+TEMPLATE		= app
+CONFIG			+= qt warn_on release incremental link_prl
+QT			+= core gui
+QMAKE_INCREMENTAL_STYLE = sublib
+
+QMAKE_CC		= gcc
+QMAKE_LEX		= flex
+QMAKE_LEXFLAGS		=
+QMAKE_YACC		= yacc
+QMAKE_YACCFLAGS		= -d
+QMAKE_YACCFLAGS_MANGLE  = -p $base -b $base
+QMAKE_YACC_HEADER       = $base.tab.h
+QMAKE_YACC_SOURCE       = $base.tab.c
+QMAKE_CFLAGS		= -pipe
+QMAKE_CFLAGS_DEPS	= -M
+QMAKE_CFLAGS_WARN_ON	= -Wall -W
+QMAKE_CFLAGS_WARN_OFF	= -w
+QMAKE_CFLAGS_RELEASE	= -O2
+QMAKE_CFLAGS_DEBUG	= -g
+QMAKE_CFLAGS_SHLIB	= -fPIC
+QMAKE_CFLAGS_YACC	= -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_THREAD	= -D_REENTRANT
+QMAKE_CFLAGS_HIDESYMS   = -fvisibility=hidden
+
+QMAKE_CXX		= g++
+QMAKE_CXXFLAGS		= $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS_DEPS	= $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON	= $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF	= $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE	= $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG	= $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB	= $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_YACC	= $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD	= $$QMAKE_CFLAGS_THREAD
+QMAKE_CXXFLAGS_HIDESYMS = $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
+
+QMAKE_INCDIR		=
+QMAKE_LIBDIR		=
+QMAKE_INCDIR_X11	= 
+QMAKE_LIBDIR_X11	= 
+QMAKE_INCDIR_QT		= $$[QT_INSTALL_HEADERS]
+QMAKE_LIBDIR_QT		= $$[QT_INSTALL_LIBS]
+QMAKE_INCDIR_OPENGL	= 
+QMAKE_LIBDIR_OPENGL	= 
+
+QMAKE_LINK		= g++
+QMAKE_LINK_SHLIB	= g++
+QMAKE_LFLAGS		=
+QMAKE_LFLAGS_RELEASE	=
+QMAKE_LFLAGS_DEBUG	=
+QMAKE_LFLAGS_SHLIB	= -shared
+QMAKE_LFLAGS_PLUGIN	= $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME	= -Wl,-soname,
+QMAKE_LFLAGS_THREAD	=
+QMAKE_RPATH		= -Wl,-rpath,
+
+QMAKE_LIBS		=
+QMAKE_LIBS_DYNLOAD	= -ldl
+QMAKE_LIBS_X11		= 
+QMAKE_LIBS_X11SM	= 
+QMAKE_LIBS_NIS		= -lnsl
+QMAKE_LIBS_OPENGL	= 
+QMAKE_LIBS_OPENGL_QT	= 
+QMAKE_LIBS_THREAD	= -lpthread
+
+QMAKE_MOC		= $$[QT_INSTALL_BINS]/moc
+QMAKE_UIC		= $$[QT_INSTALL_BINS]/uic
+
+QMAKE_AR		= ar cqs
+QMAKE_RANLIB		=
+
+QMAKE_TAR		= tar -cf
+QMAKE_GZIP		= gzip -9f
+
+QMAKE_COPY		= cp -f
+QMAKE_COPY_FILE         = $(COPY)
+QMAKE_COPY_DIR          = $(COPY) -r
+QMAKE_MOVE		= mv -f
+QMAKE_DEL_FILE		= rm -f
+QMAKE_DEL_DIR		= rmdir
+QMAKE_STRIP             = strip
+QMAKE_STRIPFLAGS_LIB 	+= --strip-unneeded
+QMAKE_CHK_DIR_EXISTS	= test -d
+QMAKE_MKDIR		= mkdir -p
+load(qt_config)