QT4_VERSION = 4.7.4
QT4_URL := http://download.qt.nokia.com/qt/source/qt-everywhere-opensource-src-$(QT4_VERSION).tar.gz
-# FIXME : OSX and win32 build
-ifdef HAVE_WIN64
+# FIXME : OSX build
+# FIXME : native win32 build
+ifdef HAVE_CROSS_COMPILE
+ifdef HAVE_WIN32
PKGS += qt4
endif
+endif
ifeq ($(call need_pkg,"QtCore QtGui"),)
PKGS_FOUND += qt4
qt4: qt-$(QT4_VERSION).tar.gz .sum-qt4
$(UNPACK)
- patch -p0 < $(SRC)/qt4/cross-x64.diff # FIXME : add new target, fix/add mingw32 target
+ patch -p0 < $(SRC)/qt4/cross.patch
mv qt-everywhere-opensource-src-4.7.4 $@ && touch $@
+XTOOLS := XCC="$(CC)" XCXX="$(CXX)" XSTRIP="$(STRIP)" XAR="$(AR)"
+
.qt4: qt4
- for i in qmake moc uic rcc; do ln -sf `which $$i` $</bin/; done # FIXME : we probably need the exact same version of those tools on the host
- cd $< && ./configure -platform win32-g++ -static -release -fast -no-exceptions -no-stl -no-sql-sqlite -no-qt3support -no-gif -no-libmng -qt-libjpeg -no-libtiff -no-qdbus -no-openssl -no-webkit -sse -no-script -no-multimedia -opensource -no-scripttools -no-opengl -no-script -no-scripttools -no-declarative -no-declarative-debug -opensource -no-s60 -host-little-endian -confirm-license
- cd $< && make sub-src
- cd $</src/plugins/imageformats/jpeg && make # FIXME
+ cd $< && $(XTOOLS) ./configure -xplatform win32-g++ -static -release -fast -no-exceptions -no-stl -no-sql-sqlite -no-qt3support -no-gif -no-libmng -qt-libjpeg -no-libtiff -no-qdbus -no-openssl -no-webkit -sse -no-script -no-multimedia -no-phonon -opensource -no-scripttools -no-opengl -no-script -no-scripttools -no-declarative -no-declarative-debug -opensource -no-s60 -host-little-endian -confirm-license
+ cd $< && $(MAKE) $(XTOOLS) sub-src
+ cd $</src/plugins/imageformats/jpeg && $(MAKE) $(XTOOLS) # FIXME
# INSTALLING LIBRARIES
for lib in QtGui QtCore; \
do install -D -- $</lib/lib$${lib}.a "$(PREFIX)/lib/lib$${lib}.a"; \
cd $</src/gui; find . -type f -name '*.h' -exec install -D -- "{}" "$(PREFIX)/include/qt4/src/gui/{}" \;
cd $</include/QtGui; find . -maxdepth 1 -type f \( -name '*.h' -o -name 'Q*' \) -exec install -D -s --strip-program="$(abspath $(SRC)/qt4/fix_header.sh)" -- "{}" "$(PREFIX)/include/qt4/QtGui/{}" \;
# INSTALLING PKGCONFIG FILES
+ install -d "$(PREFIX)/lib/pkgconfig"
cat $(SRC)/qt4/QtCore.pc.in | sed -e s/@@VERSION@@/$(QT4_VERSION)/ | sed -e 's|@@PREFIX@@|$(PREFIX)|' > "$(PREFIX)/lib/pkgconfig/QtCore.pc"
cat $(SRC)/qt4/QtGui.pc.in | sed -e s/@@VERSION@@/$(QT4_VERSION)/ | sed -e 's|@@PREFIX@@|$(PREFIX)|' > "$(PREFIX)/lib/pkgconfig/QtGui.pc"
touch $@