Add recipe for haikuwebkit

This commit is contained in:
Ingo Weinhold
2013-08-10 07:52:30 +02:00
parent 8bea1430a7
commit 5d1de7c96d
3 changed files with 270 additions and 0 deletions

View File

@@ -0,0 +1,137 @@
SUMMARY="Open source web browser engine"
DESCRIPTION="WebKit is an open source web browser engine. WebKit is also the name of the Mac OS X system framework version of the engine that's used by Safari, Dashboard, Mail, and many other OS X applications. WebKit's HTML and JavaScript code began as a branch of the KHTML and KJS libraries from KDE."
HOMEPAGE="http://www.webkit.org/"
COPYRIGHT="1998-2012 Apple Inc., Google Inc., et al"
LICENSE="
GNU LGPL v2
GNU LGPL v2.1
WebKit Apple
MIT
"
SRC_URI="http://www.haiku-files.org/files/haiku-webkit-lastgood-no-tests-2013-08-09.tar.bz2"
CHECKSUM_MD5="a6551b2573612678e9d2d27fda4fae48"
REVISION="1"
ARCHITECTURES="x86"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
# x86_gcc2 is fine as primary target architecture as long as we're building
# for a different secondary architecture.
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
fi
SECONDARY_ARCHITECTURES="x86"
# version info -- usually derived from the git repository
webkitRevision=r115944
haikuWebkitRevision=de778f7
PROVIDES="
haikuwebkit$secondaryArchSuffix = $portVersion
lib:libjavascriptcore$secondaryArchSuffix = $portVersion
lib:libwebcore$secondaryArchSuffix = $portVersion
lib:libwebkit$secondaryArchSuffix = $portVersion
lib:libwtf$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
icu$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libjpeg$secondaryArchSuffix
lib:libpng$secondaryArchSuffix
lib:libsqlite3$secondaryArchSuffix
lib:libxml2$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
icu${secondaryArchSuffix}_devel
devel:libcurl$secondaryArchSuffix
devel:libjpeg$secondaryArchSuffix
devel:libpng$secondaryArchSuffix
devel:libsqlite3$secondaryArchSuffix
devel:libxml2$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:bison
cmd:gcc$secondaryArchSuffix
cmd:gperf
cmd:jam
cmd:ld$secondaryArchSuffix
cmd:m4
cmd:make
cmd:perl
cmd:python
"
SOURCE_DIR="haiku-webkit-lastgood"
BUILD()
{
export WEBKIT_REVISION=$webkitRevision
export HAIKU_WEBKIT_REVISION=$haikuWebkitRevision
libxml2Dir=$portPackageLinksDir/devel:libxml2$secondaryArchSuffix
libxml2Includes=$libxml2Dir/$relativeIncludeDir/libxml2
compileFlags="-sCCFLAGS=-I$libxml2Includes -sC++FLAGS=-I$libxml2Includes"
cd Source/JavaScriptCore
./make-generated-sources.sh
NDEBUG=1 jam -q $jobArgs $compileFlags libjavascriptcore.so
cd ../../Source/WebCore
./make-generated-sources.sh
NDEBUG=1 jam -q $jobArgs $compileFlags libwebkit.so
}
INSTALL()
{
# collect the libraries
local libraries="
libjavascriptcore
libwebcore
libwebkit
libwtf
"
mkdir -p $libDir
local library
for library in $libraries; do
cp generated/release/${library}.so $libDir
done
# collect the headers
local headers="
WebWindow.h
WebViewConstants.h
WebView.h
WebSettings.h
WebPage.h
WebKitInfo.h
WebFrame.h
WebDownload.h
NetworkCookieJar.h
NetworkCookie.h
"
mkdir -p $includeDir
local header
for header in $headers; do
cp Source/WebKit/haiku/API/$header $includeDir
done
prepareInstalledDevelLibs $libraries
# devel package
packageEntries devel \
$developDir
}
# ----- devel package -------------------------------------------------------
PROVIDES_devel="
haikuwebkit${secondaryArchSuffix}_devel = $portVersion
devel:libjavascriptcore$secondaryArchSuffix = $portVersion
devel:libwebcore$secondaryArchSuffix = $portVersion
devel:libwebkit$secondaryArchSuffix = $portVersion
devel:libwtf$secondaryArchSuffix = $portVersion
"
REQUIRES_devel="
haikuwebkit$secondaryArchSuffix == $portVersion base
"

View File

@@ -0,0 +1,21 @@
Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -0,0 +1,112 @@
From 542b92ebe5085880dbcc8903639e2f4f81e6e93d Mon Sep 17 00:00:00 2001
From: Ingo Weinhold <ingo_weinhold@gmx.de>
Date: Sat, 10 Aug 2013 07:01:25 +0200
Subject: Jamfile: Remove Install rule invocations
Automatically installing stuff in /boot/home/config isn't desirable.
diff --git a/Jamfile b/Jamfile
index c2e412f..cff37a3 100644
--- a/Jamfile
+++ b/Jamfile
@@ -11,25 +11,3 @@ SubInclude TOP Source WebCore ;
SubInclude TOP Source WebKit ;
SubInclude TOP Source WebKit haiku HaikuLauncher ;
SubInclude TOP Tools DumpRenderTree ;
-
-#-----------------------------------------------------------------------------
-# Installation rules
-#-----------------------------------------------------------------------------
-
-Install WTF :
- libwtf.so
-;
-
-Install JavaScriptCore :
- libjavascriptcore.so
- jsc
-;
-
-Install WebCore :
- libwebcore.so
-;
-
-Install WebKit :
- libwebkit.so
- HaikuLauncher
-;
--
1.7.10.2
From 805441db575c8303ddba5688911b66594fff922d Mon Sep 17 00:00:00 2001
From: Ingo Weinhold <ingo_weinhold@gmx.de>
Date: Sat, 10 Aug 2013 07:04:09 +0200
Subject: generate-build-info.sh: make optionally work outside git repo
If the build variables WEBKIT_REVISION and HAIKU_WEBKIT_REVISION are
set, the script will use the value of those instead of trying to pull
the info from the git repository.
diff --git a/Tools/haiku/build/MainBuildRules b/Tools/haiku/build/MainBuildRules
index 9304fae..026da44 100644
--- a/Tools/haiku/build/MainBuildRules
+++ b/Tools/haiku/build/MainBuildRules
@@ -298,5 +298,6 @@ rule CreateBuildInfoFile target
actions CreateBuildInfoFile
{
- $(TOP)/Tools/haiku/generate-build-info.sh > $(1) ;
+ $(TOP)/Tools/haiku/generate-build-info.sh $(TOP) \
+ $(WEBKIT_REVISION) $(HAIKU_WEBKIT_REVISION) > $(1) ;
}
diff --git a/Tools/haiku/generate-build-info.sh b/Tools/haiku/generate-build-info.sh
index b870ca4..2bedf4f 100755
--- a/Tools/haiku/generate-build-info.sh
+++ b/Tools/haiku/generate-build-info.sh
@@ -5,15 +5,24 @@
# Distributed under the terms of the MIT License.
#
-CURENT_HASH=`git log --pretty=format:'%h' -n 1`
+# Usage: generate-build-info.sh <source top dir>
+# [ <webkit revision> <haiku webkit revision> ]
-MERGE_HASH=`git log --pretty=format:'%H' --date-order --merges -n 1`
-REV_1=`git log $MERGE_HASH^1 -n 1 | perl -nle '/webkit\.org.+trunk@(\d+)/ and print $1'`
-REV_2=`git log $MERGE_HASH^2 -n 1 | perl -nle '/webkit\.org.+trunk@(\d+)/ and print $1'`
+
+if [ $# -gt 2 ]; then
+ WEBKIT_REVISION=$2
+ HAIKU_WEBKIT_REVISION=$3
+else
+ MERGE_HASH=`git log --pretty=format:'%H' --date-order --merges -n 1`
+ REV_1=`git log $MERGE_HASH^1 -n 1 | perl -nle '/webkit\.org.+trunk@(\d+)/ and print $1'`
+ REV_2=`git log $MERGE_HASH^2 -n 1 | perl -nle '/webkit\.org.+trunk@(\d+)/ and print $1'`
+ WEBKIT_REVISION=r$REV_1$REV_2
+ HAIKU_WEBKIT_REVISION=`git log --pretty=format:'%h' -n 1`
+fi
HAIKU_WEBKIT_VERSION=1.1
-TOP=`git rev-parse --show-toplevel`
+TOP="$1"
WEBKIT_MAJOR=`cat $TOP/Source/WebKit/mac/Configurations/Version.xcconfig | perl -nle '/MAJOR_VERSION = (\d+);/ and print $1'`
WEBKIT_MINOR=`cat $TOP/Source/WebKit/mac/Configurations/Version.xcconfig | perl -nle '/MINOR_VERSION = (\d+);/ and print $1'`
@@ -23,10 +32,10 @@ echo '/*
#ifndef BuildInfo_h
#define BuildInfo_h
-#define HAIKU_WEBKIT_REVISION "'$CURENT_HASH'"
+#define HAIKU_WEBKIT_REVISION "'$HAIKU_WEBKIT_REVISION'"
#define HAIKU_WEBKIT_VERSION "'$HAIKU_WEBKIT_VERSION'"
-#define WEBKIT_REVISION "r'$REV_1$REV_2'"
+#define WEBKIT_REVISION "'$WEBKIT_REVISION'"
#define WEBKIT_MAJOR_VERSION '$WEBKIT_MAJOR'
#define WEBKIT_MINOR_VERSION '$WEBKIT_MINOR'
--
1.7.10.2