LICENSE := GPL
VERSION := 5.8.0

QT5 := qt-everywhere-opensource-src-${VERSION}
QT5_WEBKIT := qtwebkit-opensource-src-$(VERSION)
QTSCRIPTCLASSIC := qtscriptclassic-1.0_1-opensource

DOWNLOADS := ${QT5}.archive ${QT5_WEBKIT}.archive ${QTSCRIPTCLASSIC}.archive

URL(${QT5}) := http://download.qt.io/archive/qt/5.8/$(VERSION)/single/$(QT5).tar.xz
SHA(${QT5}) := 1a056ca4f731798e4142a691d0448c2c853228ca
DIR(${QT5}) := src/lib/qt5/${QT5}

URL(${QT5_WEBKIT}) := http://download.qt.io/community_releases/5.8/$(VERSION)-final/${QT5_WEBKIT}.tar.xz
SHA(${QT5_WEBKIT}) := 79d898f0e447039fb9f12b2f798a0aedf071ea82
DIR(${QT5_WEBKIT}) := src/lib/qt5/${QT5}/qtwebkit

URL(${QTSCRIPTCLASSIC}) := ftp://ftp.informatik.hu-berlin.de/pub/Mirrors/ftp.troll.no/QT/qt/solutions/lgpl/${QTSCRIPTCLASSIC}.tar.gz
SHA(${QTSCRIPTCLASSIC}) := 74e9dc82dd194d8ae0fb0f8f1df74081948b943a
DIR(${QTSCRIPTCLASSIC}) := src/lib/qt5/${QTSCRIPTCLASSIC}


PATCHES_DIR             := $(REP_DIR)/src/lib/qt5/patches
QT5_PATCHES             := $(shell cat $(PATCHES_DIR)/series)
QT5_WEBKIT_PATCHES      := $(shell cat $(PATCHES_DIR)/series.qtwebkit)
QTSCRIPTCLASSIC_PATCHES := $(shell cat $(PATCHES_DIR)/series.qtscriptclassic)

PATCHES := $(addprefix src/lib/qt5/patches/, ${QT5_PATCHES} ${QT5_WEBKIT_PATCHES} ${QTSCRIPTCLASSIC_PATCHES})

PATCH_OPT                                                  := -p1 -d ${DIR(${QT5})}
PATCH_OPT(src/lib/qt5/patches/qtscriptclassic_qt5.patch)   := -p1 -d ${DIR(${QTSCRIPTCLASSIC})}
PATCH_OPT(src/lib/qt5/patches/qtscriptclassic_qt5_7.patch) := -p1 -d ${DIR(${QTSCRIPTCLASSIC})}

$(call check_tool,bison)
$(call check_tool,perl)
$(call check_tool,python)
$(call check_tool,sed)
$(call check_tool,gperf)
