# This file is part of mingw-cross-env. # See doc/index.html for further information. # Qt PKG := qt $(PKG)_IGNORE := $(PKG)_VERSION := 4.6.2 $(PKG)_CHECKSUM := 977c10b88a2230e96868edc78a9e3789c0fcbf70 $(PKG)_SUBDIR := $(PKG)-everywhere-opensource-src-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-everywhere-opensource-src-$($(PKG)_VERSION).tar.gz $(PKG)_WEBSITE := http://qt.nokia.com/ $(PKG)_URL := http://get.qt.nokia.com/qt/source/$($(PKG)_FILE) $(PKG)_DEPS := gcc libodbc++ postgresql freetds openssl libgcrypt zlib libpng jpeg libmng tiff sqlite define $(PKG)_UPDATE wget -q -O- 'http://qt.gitorious.org/qt/qt/commits' | \ grep '
  • '$(1)'/qmake/Makefile.unix for f in `ls -1 '$(1)'/src/tools`; \ do echo TEMPLATE = subdirs >'$(1)'/src/tools/"$$f"/"$$f".pro; \ done # Trick the buildsystem into using win32 feature files: mv '$(1)'/mkspecs/features/unix '$(1)'/mkspecs/features/unix.orig ln -s win32 '$(1)'/mkspecs/features/unix # Adjust the mkspec values that contain the TARGET platform prefix. # The patch planted strings HOSTPLATFORMPREFIX and HOSTPLATFORMINCLUDE. $(SED) 's,HOSTPLATFORMPREFIX-,$(TARGET)-,g' -i '$(1)'/mkspecs/win32-g++/qmake.conf $(SED) 's,HOSTPLATFORMINCLUDE,$(PREFIX)/$(TARGET)/include,g' -i '$(1)'/mkspecs/win32-g++/qmake.conf # Make sure qmake doesn't use compilation paths meant for unix find '$(1)'/src -name '*.pr[oi]' -exec \ $(SED) 's,\(^\|[^_/]\)unix,\1linux,g' -i {} \; # Make qmake use compilation paths meant for MinGW or Windows in general find '$(1)'/src -name '*.pr[oi]' -exec \ $(SED) 's,\(^\|[^_/]\)win32-g++\([^-]\|$$\),\1unix\2,g' -i {} \; find '$(1)'/src -name '*.pr[oi]' -exec \ $(SED) 's,\(^\|[^_/]\)win32\([^-]\|$$\),\1unix\2,g' -i {} \; # Configure Qt for MinGW target # We prefer static mingw-cross-env system libs for static build: # -system-zlib -system-libpng -system-libjpeg -system-libtiff -system-libmng -system-sqlite # There is no -system-gif option. NB -system-libmng will not link in shared build. cd '$(1)' && ./configure \ -opensource \ -confirm-license \ -xplatform win32-g++ \ -host-arch i386 \ -host-little-endian \ -little-endian \ -largefile \ -force-pkg-config \ -release \ -exceptions \ -static \ -prefix '$(PREFIX)/$(TARGET)' \ -prefix-install \ -bindir '$(1)'/bindirsink \ -script \ -opengl desktop \ -no-webkit \ -no-phonon \ -no-phonon-backend \ -accessibility \ -no-reduce-exports \ -no-rpath \ -make libs \ -nomake demos \ -nomake docs \ -nomake examples \ -plugin-sql-sqlite \ -plugin-sql-odbc \ -plugin-sql-psql \ -plugin-sql-tds \ -system-zlib \ -system-libpng \ -system-libjpeg \ -system-libtiff \ -system-libmng \ -system-sqlite \ -qt-gif \ -openssl-linked \ -v $(MAKE) -C '$(1)' -j '$(JOBS)' '$(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