view src/qt.mk @ 2988:aca8511e7751

qt.mk: link to correct files in bin directory
author John W. Eaton <jwe@octave.org>
date Thu, 16 May 2013 13:32:57 -0400
parents e6ba75a96089
children 4f9b72cf7ee7
line wrap: on
line source

# This file is part of MXE.
# See index.html for further information.

PKG             := qt
$(PKG)_IGNORE   :=
$(PKG)_CHECKSUM := bc352a283610e0cd2fe0dbedbc45613844090fcb
$(PKG)_SUBDIR   := $(PKG)-everywhere-opensource-src-$($(PKG)_VERSION)
$(PKG)_FILE     := $(PKG)-everywhere-opensource-src-$($(PKG)_VERSION).tar.gz
$(PKG)_URL      := http://releases.qt-project.org/qt4/source/$($(PKG)_FILE)
$(PKG)_DEPS     := gcc libodbc++ postgresql freetds openssl zlib libpng jpeg libmng tiff sqlite dbus

define $(PKG)_UPDATE
    $(WGET) -q -O- 'http://qt.gitorious.org/qt/qt/commits' | \
    grep '<li><a href="/qt/qt/commit/' | \
    $(SED) -n 's,.*<a[^>]*>v\([0-9][^<-]*\)<.*,\1,p' | \
    tail -1
endef

define $(PKG)_BUILD
    cd '$(1)' && QTDIR='$(1)' ./bin/syncqt
    cd '$(1)' && \
        OPENSSL_LIBS="`'$(TARGET)-pkg-config' --libs-only-l openssl`" \
        PSQL_LIBS="-lpq -lsecur32 `'$(TARGET)-pkg-config' --libs-only-l openssl` -lws2_32" \
        SYBASE_LIBS="-lsybdb `'$(TARGET)-pkg-config' --libs-only-l gnutls` -liconv -lws2_32" \
        ./configure \
        -opensource \
        -confirm-license \
        -fast \
        -xplatform win32-g++-4.6 \
        -device-option CROSS_COMPILE=$(TARGET)- \
        -device-option PKG_CONFIG='$(TARGET)-pkg-config' \
        -force-pkg-config \
        -release \
        -exceptions \
        -shared \
        -prefix '$(PREFIX)/$(TARGET)' \
        -prefix-install \
        -script \
        -no-iconv \
        -opengl desktop \
        -no-webkit \
        -no-glib \
        -no-gstreamer \
        -no-phonon \
        -no-phonon-backend \
        -accessibility \
        -no-reduce-exports \
        -no-rpath \
        -make libs \
        -nomake demos \
        -nomake docs \
        -nomake examples \
        -qt-sql-sqlite \
        -qt-sql-odbc \
        -qt-sql-psql \
        -qt-sql-tds -D Q_USE_SYBASE \
        -system-zlib \
        -system-libpng \
        -system-libjpeg \
        -system-libtiff \
        -system-libmng \
        -system-sqlite \
        -openssl-linked \
        -dbus-linked \
        -no-sse2 -no-ssse3 \
        -v

    $(MAKE) -C '$(1)' -j '$(JOBS)'
    $(MAKE) -C '$(1)' -j 1 install
    ln -fs '$(PREFIX)/$(TARGET)/bin/moc' '$(PREFIX)/bin/$(TARGET)-moc'
    ln -fs '$(PREFIX)/$(TARGET)/bin/rcc' '$(PREFIX)/bin/$(TARGET)-roc'
    ln -fs '$(PREFIX)/$(TARGET)/bin/uic' '$(PREFIX)/bin/$(TARGET)-uic'
    ln -fs '$(PREFIX)/$(TARGET)/bin/qmake' '$(PREFIX)/bin/$(TARGET)-qmake'

    # cd '$(1)/tools/assistant' && '$(1)/bin/qmake' assistant.pro
    # $(MAKE) -C '$(1)/tools/assistant' -j '$(JOBS)' install

    # cd '$(1)/tools/designer' && '$(1)/bin/qmake' designer.pro
    # $(MAKE) -C '$(1)/tools/designer' -j '$(JOBS)' install

    # # at least some of the qdbus tools are useful on target
    # cd '$(1)/tools/qdbus' && '$(1)/bin/qmake' qdbus.pro
    # $(MAKE) -C '$(1)/tools/qdbus' -j '$(JOBS)' install
    
    # lrelease (from linguist) needed by octave for GUI build
    $(MAKE) -C '$(1)/tools/linguist/lrelease' -j '$(JOBS)' install
    ln -fs '$(PREFIX)/$(TARGET)/bin/lrelease' '$(PREFIX)/bin/$(TARGET)-lrelease'

    # mkdir            '$(1)/test-qt'
    # cd               '$(1)/test-qt' && '$(TARGET)-qmake' '$(PWD)/$(2).pro'
    # $(MAKE)       -C '$(1)/test-qt' -j '$(JOBS)'
    # $(INSTALL) -m755 '$(1)/test-qt/release/test-qt.exe' '$(PREFIX)/$(TARGET)/bin/'
endef