packages/webkit: Build the Qt/Qtopia port of WebKit as well.
authorHolger Freyther <zecke@selfish.org>
Sun, 21 Oct 2007 12:56:09 +0000 (12:56 +0000)
committerHolger Freyther <zecke@selfish.org>
Sun, 21 Oct 2007 12:56:09 +0000 (12:56 +0000)
    Unifiy the WebKit recipe and allow to build the Gtk+, Qt
    and Qtopia port. Add classes/qtopia4core.bbclass to assist
    building for Qtopia. Change the WebKit.pro to currently not
    build the testkjs and DumpRenderTree test utilities.

classes/qtopia4core.bbclass [new file with mode: 0644]
conf/distro/include/sane-srcrevs.inc
packages/webkit/files/WebKit.pro
packages/webkit/webkit-gtk_svn.bb
packages/webkit/webkit-qt.inc [new file with mode: 0644]
packages/webkit/webkit-qt_svn.bb [new file with mode: 0644]
packages/webkit/webkit-qtopia_svn.bb [new file with mode: 0644]
packages/webkit/webkit.inc [new file with mode: 0644]

diff --git a/classes/qtopia4core.bbclass b/classes/qtopia4core.bbclass
new file mode 100644 (file)
index 0000000..86bc7af
--- /dev/null
@@ -0,0 +1,11 @@
+DEPENDS_prepend = "${@["qtopia-core ", ""][(bb.data.getVar('PN', d, 1) == 'qtopia-core')]}"
+inherit qmake2
+
+#
+# override variables set by qmake-base to compile QtopiaCore apps
+#
+export OE_QMAKE_INCDIR_QT = "${STAGING_INCDIR}/qtopiacore4"
+export OE_QMAKE_LIBDIR_QT = "${STAGING_LIBDIR}/qtopiacore4/"
+export OE_QMAKE_LIBS_QT = "qt"
+export OE_QMAKE_LIBS_X11 = ""
+EXTRA_QMAKEVARS_POST += "LIBS+=-lQtNetwork "
index 332b69d..edb02cb 100644 (file)
@@ -96,6 +96,8 @@ SRCREV_pn-settings-daemon ?= "1615"
 SRCREV_pn-sjf2410-linux-native ?= "933"
 SRCREV_pn-sphyrna ?= "44"
 SRCREV_pn-webkit-gtk ?= "26079"
+SRCREV_pn-webkit-qt ?= "26079"
+SRCREV_pn-webkit-qtopia ?= "26079"
 SRCREV_pn-xoo ?= "1623"
 SRCREV_pn-mplayer ?= "24587"
 SRCREV_pn-networkmanager ?= "2887"
index dca2614..aab0209 100644 (file)
@@ -3,14 +3,9 @@ CONFIG += ordered
 !gtk-port:CONFIG += qt-port
 qt-port:!win32-*:SUBDIRS += WebKit/qt/Plugins
 SUBDIRS += \
-        WebCore \
-        JavaScriptCore/kjs/testkjs.pro
-
-qt-port {
-    SUBDIRS += WebKit/qt/QtLauncher
-
-    !win32-*: SUBDIRS += WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro
-}
+        WebCore
 
+qt-port:SUBDIRS += \
+        WebKit/qt/QtLauncher
 gtk-port:SUBDIRS += \
         WebKitTools/GtkLauncher
index 208ec25..4722999 100644 (file)
@@ -1,42 +1,13 @@
-DEPENDS = "flex-native gperf-native gperf perl-native curl icu libxml2 sqlite3 cairo libxslt libidn gnutls gtk+"
-SRCREV_FORMAT = "webcore-rwebkit"
+DEPENDS = "curl icu libxml2 cairo libxslt libidn gnutls gtk+"
 
-# Yes, this is wrong...
-PV = "0.0+svnr${SRCREV}"
-PR = "r1"
-
-inherit qmake2 pkgconfig
-
-SRC_URI = "\
-  svn://svn.webkit.org/repository/webkit/trunk/;module=JavaScriptCore;proto=http \
-  svn://svn.webkit.org/repository/webkit/trunk/;module=JavaScriptGlue;proto=http \
-  svn://svn.webkit.org/repository/webkit/trunk/;module=WebCore;proto=http;name=webcore \
-  svn://svn.webkit.org/repository/webkit/trunk/;module=WebKit;proto=http;name=webkit \
-  svn://svn.webkit.org/repository/webkit/trunk/;module=WebKitLibraries;proto=http \
-#  svn://svn.webkit.org/repository/webkit/trunk/;module=WebKitQt;proto=http \
-  svn://svn.webkit.org/repository/webkit/trunk/;module=WebKitTools;proto=http \
-  file://Makefile \
-  file://Makefile.shared \
-  file://WebKit.pri \
-  file://WebKit.pro \
-"
-S = "${WORKDIR}/"
+WEBKIT_PORT = "gtk-port"
+WEBKIT_EXTRA_OPTIONS = "CONFIG-=qt"
+PACKAGES =+ "webkit-gtklauncher-dbg webkit-gtklauncher"
 
-do_configure() {
-       qmake2 -spec ${QMAKESPEC} CONFIG+=gtk-port CONFIG-=qt CONFIG-=release CONFIG+=debug
-       mkdir -p WebKitBuilds/Debug
-       cd WebKitBuilds/Debug
-       PWD=`pwd` qmake2 -spec ${QMAKESPEC} -r OUTPUT_DIR=$PWD/ CONFIG-=qt CONFIG+=gtk-port $PWD/../../WebKit.pro \
-      WEBKIT_INC_DIR=${prefix}/include WEBKIT_LIB_DIR=${libdir}
-}
+FILES_webkit-gtklauncher = "${bindir}/GtkLauncher"
+FILES_webkit-gtklauncher-dbg = "${bindir}/.debug/GtkLauncher"
 
-do_compile_prepend() {
-       mkdir -p ${S}/WebKitBuilds/Debug/JavaScriptCore/pcre/tmp/
-       cd ${S}/JavaScriptCore/pcre 
-       ${BUILD_CC} dftables.c -o dftables -I. -I../wtf
-       cp dftables ${S}/WebKitBuilds/Debug/JavaScriptCore/pcre/tmp/
-       cd ${S}/WebKitBuilds/Debug
-}
+require webkit.inc
 
 do_install() {
        install -d ${D}${bindir}
@@ -45,22 +16,7 @@ do_install() {
 
        install -m 0755 ${S}/WebKitBuilds/Debug/WebKitTools/GtkLauncher/GtkLauncher ${D}${bindir}
        cd ${S}/WebKitBuilds/Debug
-       PWD=`pwd` qmake2 -spec ${QMAKESPEC} -r OUTPUT_DIR=$PWD/ CONFIG-=qt CONFIG+=gtk-port $PWD/../../WebKit.pro \
-      WEBKIT_INC_DIR=${D}${prefix}/include WEBKIT_LIB_DIR=${D}${libdir}
+       PWD=`pwd` ${WEBKIT_QMAKE} WEBKIT_INC_DIR=${D}${prefix}/include WEBKIT_LIB_DIR=${D}${libdir} $PWD/../../WebKit.pro
        oe_runmake install
 }
 
-do_stage() {
-       install -d ${STAGING_LIBDIR}
-       install -d ${STAGING_INCDIR}
-       cd ${S}/WebKitBuilds/Debug
-       PWD=`pwd` qmake2 -spec ${QMAKESPEC} -r OUTPUT_DIR=$PWD/ CONFIG-=qt CONFIG+=gtk-port $PWD/../../WebKit.pro \
-      WEBKIT_INC_DIR=${STAGING_INCDIR} WEBKIT_LIB_DIR=${STAGING_LIBDIR}
-       oe_runmake install
-}
-
-
-PACKAGES =+ "webkit-gtklauncher-dbg webkit-gtklauncher"
-
-FILES_webkit-gtklauncher = "${bindir}/GtkLauncher"
-FILES_webkit-gtklauncher-dbg = "${bindir}/.debug/GtkLauncher"
diff --git a/packages/webkit/webkit-qt.inc b/packages/webkit/webkit-qt.inc
new file mode 100644 (file)
index 0000000..bba8d83
--- /dev/null
@@ -0,0 +1,20 @@
+WEBKIT_PORT = "qt"
+WEBKIT_EXTRA_OPTIONS = ""
+PACKAGES =+ "webkit-qtlauncher-dbg webkit-qtlauncher"
+
+FILES_webkit-qtlauncher = "${bindir}/QtLauncher"
+FILES_webkit-qtlauncher-dbg = "${bindir}/.debug/*"
+
+require webkit.inc
+
+do_install() {
+       install -d ${D}${bindir}
+       install -d ${D}${libdir}
+       install -d ${D}${libdir}/pkgconfig
+
+       install -m 0755 ${S}/WebKitBuilds/Debug/bin/QtLauncher ${D}${bindir}
+       cd ${S}/WebKitBuilds/Debug
+       PWD=`pwd` ${WEBKIT_QMAKE} WEBKIT_INC_DIR=${D}${prefix}/include WEBKIT_LIB_DIR=${D}${libdir} $PWD/../../WebKit.pro
+       oe_runmake install
+}
+
diff --git a/packages/webkit/webkit-qt_svn.bb b/packages/webkit/webkit-qt_svn.bb
new file mode 100644 (file)
index 0000000..75b36a4
--- /dev/null
@@ -0,0 +1,2 @@
+require webkit-qt.inc
+inherit qt4x11
diff --git a/packages/webkit/webkit-qtopia_svn.bb b/packages/webkit/webkit-qtopia_svn.bb
new file mode 100644 (file)
index 0000000..cfd96c8
--- /dev/null
@@ -0,0 +1,3 @@
+BROKEN="1"
+require webkit-qt.inc
+inherit qtopia4core
diff --git a/packages/webkit/webkit.inc b/packages/webkit/webkit.inc
new file mode 100644 (file)
index 0000000..c20fc57
--- /dev/null
@@ -0,0 +1,48 @@
+DEPENDS += "flex-native gperf-native perl-native sqlite3"
+SRCREV_FORMAT = "webcore-rwebkit"
+
+# Yes, this is wrong...
+PV = "0.0+svnr${SRCREV}"
+PR = "r1"
+
+inherit qmake2 pkgconfig
+
+SRC_URI = "\
+  svn://svn.webkit.org/repository/webkit/trunk/;module=JavaScriptCore;proto=http \
+  svn://svn.webkit.org/repository/webkit/trunk/;module=JavaScriptGlue;proto=http \
+  svn://svn.webkit.org/repository/webkit/trunk/;module=WebCore;proto=http;name=webcore \
+  svn://svn.webkit.org/repository/webkit/trunk/;module=WebKit;proto=http;name=webkit \
+  svn://svn.webkit.org/repository/webkit/trunk/;module=WebKitLibraries;proto=http \
+  svn://svn.webkit.org/repository/webkit/trunk/;module=WebKitTools;proto=http \
+  file://Makefile \
+  file://Makefile.shared \
+  file://WebKit.pri \
+  file://WebKit.pro \
+"
+S = "${WORKDIR}/"
+
+WEBKIT_QMAKE = "qmake2 -spec ${QMAKESPEC} -r OUTPUT_DIR=$PWD/ ${WEBKIT_EXTRA_OPTIONS} CONFIG+=${WEBKIT_PORT}"
+
+do_configure() {
+       qmake2 -spec ${QMAKESPEC} CONFIG+=${WEBKIT_PORT} ${WEBKIT_EXTRA_OPTIONS} CONFIG-=release CONFIG+=debug
+       mkdir -p WebKitBuilds/Debug
+       cd WebKitBuilds/Debug
+       PWD=`pwd` ${WEBKIT_QMAKE}  WEBKIT_INC_DIR=${prefix}/include WEBKIT_LIB_DIR=${libdir} $PWD/../../WebKit.pro
+}
+
+do_compile_prepend() {
+       mkdir -p ${S}/WebKitBuilds/Debug/JavaScriptCore/pcre/tmp/
+       cd ${S}/JavaScriptCore/pcre 
+       ${BUILD_CC} dftables.c -o dftables -I. -I../wtf
+       cp dftables ${S}/WebKitBuilds/Debug/JavaScriptCore/pcre/tmp/
+       cd ${S}/WebKitBuilds/Debug
+}
+
+do_stage() {
+       install -d ${STAGING_LIBDIR}
+       install -d ${STAGING_INCDIR}
+       cd ${S}/WebKitBuilds/Debug
+       PWD=`pwd` ${WEBKIT_QMAKE} WEBKIT_INC_DIR=${STAGING_INCDIR} WEBKIT_LIB_DIR=${STAGING_LIBDIR} $PWD/../../WebKit.pro
+       oe_runmake install
+}
+