From feccf81bb92f76668d107880f270988d3048cb42 Mon Sep 17 00:00:00 2001 From: Volker Grabsch Date: Sat, 23 Jan 2010 00:05:23 +0100 Subject: [PATCH 1/2] improved escaping in the build rules of package qt --- src/qt.mk | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/qt.mk b/src/qt.mk index 02cc2818..9aa2cd99 100644 --- a/src/qt.mk +++ b/src/qt.mk @@ -42,15 +42,15 @@ define $(PKG)_BUILD -nomake docs \ -nomake translations - $(MAKE) -C '$(1)'.native -j $(JOBS) sub-tools-bootstrap - $(MAKE) -C '$(1)'.native -j $(JOBS) sub-moc - $(MAKE) -C '$(1)'.native -j $(JOBS) sub-rcc - $(MAKE) -C '$(1)'.native -j $(JOBS) sub-uic + $(MAKE) -C '$(1)'.native -j '$(JOBS)' sub-tools-bootstrap + $(MAKE) -C '$(1)'.native -j '$(JOBS)' sub-moc + $(MAKE) -C '$(1)'.native -j '$(JOBS)' sub-rcc + $(MAKE) -C '$(1)'.native -j '$(JOBS)' sub-uic # rebuild qmake to use "-unix" as default and to use the correct "ar" command $(SED) 's,\(Option::TARG_MODE Option::target_mode = Option::TARG_\)[A-Z_]*,\1UNIX_MODE,' -i '$(1)'.native/qmake/option.cpp $(SED) 's,"ar -M,"$(TARGET)-ar -M,' -i '$(1)'.native/qmake/generators/win32/mingw_make.cpp - $(MAKE) -C '$(1)'.native/qmake -j $(JOBS) + $(MAKE) -C '$(1)'.native/qmake -j '$(JOBS)' # install the native tools manually $(INSTALL) -m755 '$(1)'.native/bin/moc '$(PREFIX)/bin/$(TARGET)-moc' @@ -132,7 +132,7 @@ define $(PKG)_BUILD -v $(MAKE) -C '$(1)' -j '$(JOBS)' - $(TARGET)-ranlib '$(1)'/lib/*.a + '$(TARGET)-ranlib' '$(1)'/lib/*.a rm -rf '$(PREFIX)/$(TARGET)/mkspecs' - $(MAKE) -C '$(1)' install + $(MAKE) -C '$(1)' -j 1 install endef From 4a1e1b1fcbcd66e47cc3e4bd8876cb6e98abd4c8 Mon Sep 17 00:00:00 2001 From: Volker Grabsch Date: Sat, 23 Jan 2010 00:07:21 +0100 Subject: [PATCH 2/2] test program for package qt --- src/qt-test.cpp | 15 +++++++ src/qt-test.pro | 6 +++ src/qt-test.ui | 107 ++++++++++++++++++++++++++++++++++++++++++++++++ src/qt.mk | 6 +++ 4 files changed, 134 insertions(+) create mode 100644 src/qt-test.cpp create mode 100644 src/qt-test.pro create mode 100644 src/qt-test.ui diff --git a/src/qt-test.cpp b/src/qt-test.cpp new file mode 100644 index 00000000..706082d2 --- /dev/null +++ b/src/qt-test.cpp @@ -0,0 +1,15 @@ +/* This file is part of mingw-cross-env. */ +/* See doc/index.html or doc/README for further information. */ + +#include +#include "ui_qt-test.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + QMainWindow w; + Ui::MainWindow u; + u.setupUi(&w); + w.show(); + return a.exec(); +} diff --git a/src/qt-test.pro b/src/qt-test.pro new file mode 100644 index 00000000..85d11098 --- /dev/null +++ b/src/qt-test.pro @@ -0,0 +1,6 @@ +# This file is part of mingw-cross-env. +# See doc/index.html or doc/README for further information. + +TARGET = test-qt +SOURCES += qt-test.cpp +FORMS += qt-test.ui diff --git a/src/qt-test.ui b/src/qt-test.ui new file mode 100644 index 00000000..4515072a --- /dev/null +++ b/src/qt-test.ui @@ -0,0 +1,107 @@ + + + + + + + MainWindow + + + + 0 + 0 + 400 + 300 + + + + test-qt + + + + + + + + + + + + test-qt + + + +

test-qt

+

test-qt

+
    +
  1. test-qt
  2. +
  3. test-qt
  4. +
  5. test-qt
  6. +
+ + + ]]> +
+
+
+
+
+
+ + + + 0 + 0 + 400 + 26 + + + + + &File + + + + + + + + + &Quit + + + Ctrl+Q + + + + + + + actionQuit + triggered() + MainWindow + close() + + + -1 + -1 + + + 399 + 299 + + + + +
diff --git a/src/qt.mk b/src/qt.mk index 9aa2cd99..9cf9b3f7 100644 --- a/src/qt.mk +++ b/src/qt.mk @@ -135,4 +135,10 @@ define $(PKG)_BUILD '$(TARGET)-ranlib' '$(1)'/lib/*.a rm -rf '$(PREFIX)/$(TARGET)/mkspecs' $(MAKE) -C '$(1)' -j 1 install + + mkdir '$(1)/test-qt' + cp '$(2)'* '$(1)/test-qt/' + cd '$(1)/test-qt' && '$(TARGET)-qmake' + $(MAKE) -C '$(1)/test-qt' -j '$(JOBS)' + $(INSTALL) -m755 '$(1)/test-qt/release/test-qt.exe' '$(PREFIX)/$(TARGET)/bin/' endef