From 2d8c4c44185a682290ccde4d23132ae3acf01678 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 2 Jun 2011 22:47:10 +0000 Subject: Thu Jun 2 22:47:10 UTC 2011 --- staging/libwebkit/PKGBUILD | 61 ++++++++++++++++++++++ staging/libwebkit/gcc46.patch | 11 ++++ staging/libwebkit/libwebkit.install | 11 ++++ .../libwebkit/replace-switch-with-given-when.patch | 45 ++++++++++++++++ 4 files changed, 128 insertions(+) create mode 100644 staging/libwebkit/PKGBUILD create mode 100644 staging/libwebkit/gcc46.patch create mode 100644 staging/libwebkit/libwebkit.install create mode 100644 staging/libwebkit/replace-switch-with-given-when.patch (limited to 'staging/libwebkit') diff --git a/staging/libwebkit/PKGBUILD b/staging/libwebkit/PKGBUILD new file mode 100644 index 000000000..032056ae3 --- /dev/null +++ b/staging/libwebkit/PKGBUILD @@ -0,0 +1,61 @@ +# $Id: PKGBUILD 126165 2011-06-01 22:31:25Z andyrtr $ +# Maintainer: Andreas Radke + +pkgbase=libwebkit +pkgname=(libwebkit libwebkit3) +pkgver=1.4.0 +pkgrel=2 +pkgdesc="An opensource web content engine" +arch=('i686' 'x86_64') +url="http://webkitgtk.org/" +license=('custom') +depends=('libxt' 'libxslt' 'sqlite3' 'icu' 'gstreamer0.10-base' 'libsoup' 'enchant') +makedepends=('gperf' 'gtk-doc' 'gobject-introspection' 'python2' 'gtk2' 'gtk3') +options=('!libtool') +install=libwebkit.install +source=(http://webkitgtk.org/webkit-${pkgver}.tar.gz + gcc46.patch + replace-switch-with-given-when.patch) +md5sums=('10c969db3b5484c71df1aa9a338377ff' + '970a2fa91b9827dff8e9b9edb4867701' + '3ba708a26b7af0e1e853867966fe14f7') + +build() { + cd "${srcdir}/webkit-${pkgver}" + patch -Np1 -i "${srcdir}/gcc46.patch" + patch -Np1 -i "${srcdir}/replace-switch-with-given-when.patch" + mkdir build-gtk{2,3} + + ( cd build-gtk2 && _build --with-gtk=2.0 ) + ( cd build-gtk3 && _build --with-gtk=3.0 ) +} + +_build() { + PYTHON=/usr/bin/python2 ../configure --prefix=/usr \ + --enable-introspection \ + --with-font-backend=freetype --enable-gtk-doc \ + --with-unicode-backend=icu \ + --enable-spellcheck "$@" + make all stamp-po +} + +package_libwebkit() { + pkgdesc+=" (for GTK2)" + depends+=(gtk2) + provides=('webkitgtk-svn') + conflicts=('webkitgtk-svn') + replaces=('webkitgtk-svn') + + cd "$srcdir/webkit-$pkgver/build-gtk2" + make DESTDIR="${pkgdir}" install + install -Dm644 ../Source/WebKit/LICENSE "${pkgdir}/usr/share/licenses/libwebkit/LICENSE" +} + +package_libwebkit3() { + pkgdesc+=" (for GTK3)" + depends+=(gtk3) + + cd "${srcdir}/webkit-${pkgver}/build-gtk3" + make DESTDIR="${pkgdir}" install + install -Dm644 ../Source/WebKit/LICENSE "${pkgdir}/usr/share/licenses/libwebkit3/LICENSE" +} diff --git a/staging/libwebkit/gcc46.patch b/staging/libwebkit/gcc46.patch new file mode 100644 index 000000000..befd892d4 --- /dev/null +++ b/staging/libwebkit/gcc46.patch @@ -0,0 +1,11 @@ +Index: trunk/Source/WebCore/dom/make_names.pl +=================================================================== +--- trunk/Source/WebCore/dom/make_names.pl (revision 73989) ++++ trunk/Source/WebCore/dom/make_names.pl (revision 84123) +@@ -66,5 +66,5 @@ + $gccLocation = "/usr/bin/gcc"; + } +-my $preprocessor = $gccLocation . " -E -P -x c++"; ++my $preprocessor = $gccLocation . " -E -x c++"; + + GetOptions( diff --git a/staging/libwebkit/libwebkit.install b/staging/libwebkit/libwebkit.install new file mode 100644 index 000000000..24072f316 --- /dev/null +++ b/staging/libwebkit/libwebkit.install @@ -0,0 +1,11 @@ +post_install() { + usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/staging/libwebkit/replace-switch-with-given-when.patch b/staging/libwebkit/replace-switch-with-given-when.patch new file mode 100644 index 000000000..4e64610bb --- /dev/null +++ b/staging/libwebkit/replace-switch-with-given-when.patch @@ -0,0 +1,45 @@ +diff -upr webkit-1.4.0.orig/Source/WebCore/make-hash-tools.pl webkit-1.4.0/Source/WebCore/make-hash-tools.pl +--- webkit-1.4.0.orig/Source/WebCore/make-hash-tools.pl 2011-04-25 22:27:15.000000000 +0300 ++++ webkit-1.4.0/Source/WebCore/make-hash-tools.pl 2011-06-02 00:41:26.000000000 +0300 +@@ -20,7 +20,7 @@ + # Boston, MA 02110-1301, USA. + + use strict; +-use Switch; ++use feature 'switch'; + use File::Basename; + + my $outdir = $ARGV[0]; +@@ -28,9 +28,9 @@ shift; + my $option = basename($ARGV[0],".gperf"); + + +-switch ($option) { ++given ($option) { + +-case "DocTypeStrings" { ++when ("DocTypeStrings") { + + my $docTypeStringsGenerated = "$outdir/DocTypeStrings.cpp"; + my $docTypeStringsGperf = $ARGV[0]; +@@ -38,9 +38,9 @@ case "DocTypeStrings" { + + system("gperf --key-positions=\"*\" -s 2 $docTypeStringsGperf > $docTypeStringsGenerated") == 0 || die "calling gperf failed: $?"; + +-} # case "DocTypeStrings" ++} # when ("DocTypeStrings") + +-case "ColorData" { ++when ("ColorData") { + + my $colorDataGenerated = "$outdir/ColorData.cpp"; + my $colorDataGperf = $ARGV[0]; +@@ -48,6 +48,6 @@ case "ColorData" { + + system("gperf --key-positions=\"*\" -D -s 2 $colorDataGperf > $colorDataGenerated") == 0 || die "calling gperf failed: $?"; + +-} # case "ColorData" ++} # when ("ColorData") + +-} # switch ($option) ++} # given ($option) -- cgit v1.2.3-54-g00ecf