Merged in arfonzo/haikuports/qupzilla (pull request #26)

QupZilla: patch set and recipe.
This commit is contained in:
Chris Roberts
2013-12-05 01:58:05 -07:00
2 changed files with 198 additions and 0 deletions

View File

@@ -0,0 +1,119 @@
From 49c386fa4bd03dfe7e102c1d0635743d966b75b7 Mon Sep 17 00:00:00 2001
From: "Arfonzo J. Coward" <art@poorcoding.com>
Date: Thu, 5 Dec 2013 00:04:04 +0000
Subject: QupZilla sources and build definitions modified for Haiku.
diff --git a/src/defines.pri b/src/defines.pri
index 18a234a..7c33ba5 100644
--- a/src/defines.pri
+++ b/src/defines.pri
@@ -19,6 +19,13 @@ win32-msvc* {
LIBS += User32.lib Ole32.lib Shell32.lib ShlWapi.lib Gdi32.lib ComCtl32.lib
}
+#DEFINES *= QUPZILLA_PREFIX="`finddir B_USER_APPS_DIRECTORY`/QupZilla/"
+DEFINES *= QUPZILLA_PREFIX="/boot/home/config/apps/QupZilla/"
+DEFINES *= DISABLE_DBUS
+DEFINES *= NO_SYSTEM_DATAPATH
+DEFINES *= NO_X11
+
+
# Check for pkg-config availability
!mac:unix:system(pkg-config --version > /dev/null) {
isEqual(QT_MAJOR_VERSION, 5) {
diff --git a/src/lib/3rdparty/processinfo.cpp b/src/lib/3rdparty/processinfo.cpp
index 6131d62..ba96c63 100644
--- a/src/lib/3rdparty/processinfo.cpp
+++ b/src/lib/3rdparty/processinfo.cpp
@@ -30,6 +30,10 @@
#include <cstdarg>
#endif
+#ifdef __HAIKU__
+#define DT_DIR 4
+#endif
+
ProcessInfo::ProcessInfo(const QString &name)
: m_name(name)
{
@@ -75,7 +79,8 @@ pid_t ProcessInfo::GetPIDbyName(const char* cchrptr_ProcessName) const
}
// Loop while not NULL
- while ((de_DirEntity = readdir(dir_proc))) {
+ while ((de_DirEntity = readdir(dir_proc))) {
+#ifndef __HAIKU__
if (de_DirEntity->d_type == DT_DIR) {
if (IsNumeric(de_DirEntity->d_name)) {
strcpy(chrarry_CommandLinePath, "/proc/") ;
@@ -104,6 +109,7 @@ pid_t ProcessInfo::GetPIDbyName(const char* cchrptr_ProcessName) const
}
}
}
+#endif
}
closedir(dir_proc) ;
diff --git a/src/main/main.cpp b/src/main/main.cpp
index e6a56ea..e4ac880 100644
--- a/src/main/main.cpp
+++ b/src/main/main.cpp
@@ -20,10 +20,12 @@
#include <QMessageBox> // For QT_REQUIRE_VERSION
-#if defined(Q_OS_LINUX) || defined(__GLIBC__)
+#if defined(Q_OS_LINUX) || defined(__GLIBC__) || defined(__HAIKU__)
#include <iostream>
#include <signal.h>
+#ifndef __HAIKU__
#include <execinfo.h>
+#endif
#include "qupzilla.h"
@@ -56,6 +58,7 @@ void qupzilla_signal_handler(int s)
}
sigSegvServed = true;
+#ifndef __HAIKU__
std::cout << "QupZilla: Crashed :( Saving backtrace in " << qPrintable(mApp->PROFILEDIR) << "crashlog ..." << std::endl;
void* array[100];
@@ -105,6 +108,9 @@ void qupzilla_signal_handler(int s)
file.close();
std::cout << "Backtrace successfuly saved in " << qPrintable(dir.absoluteFilePath(file.fileName())) << std::endl;
+#else
+ std::cout << "QupZilla: Crashed :(" << std::endl;
+#endif
}
default:
--
1.8.3.4
From 002f7d5e1da83f0e0db8129ae05ebf805abec4fe Mon Sep 17 00:00:00 2001
From: "Arfonzo J. Coward" <art@poorcoding.com>
Date: Thu, 5 Dec 2013 08:00:47 +0000
Subject: Remove QUPZILLA_PREFIX definition. We set thisbuild time instead.
diff --git a/src/defines.pri b/src/defines.pri
index 7c33ba5..96093af 100644
--- a/src/defines.pri
+++ b/src/defines.pri
@@ -19,8 +19,6 @@ win32-msvc* {
LIBS += User32.lib Ole32.lib Shell32.lib ShlWapi.lib Gdi32.lib ComCtl32.lib
}
-#DEFINES *= QUPZILLA_PREFIX="`finddir B_USER_APPS_DIRECTORY`/QupZilla/"
-DEFINES *= QUPZILLA_PREFIX="/boot/home/config/apps/QupZilla/"
DEFINES *= DISABLE_DBUS
DEFINES *= NO_SYSTEM_DATAPATH
DEFINES *= NO_X11
--
1.8.3.4

View File

@@ -0,0 +1,79 @@
SUMMARY="QupZilla, a lightweight Qt WebKit web browser."
DESCRIPTION="
QupZilla is a lightweight multiplatform web browser based on
libqtwebkit.
It provides:
- A unified interface for bookmarks, history and RSS reading.
- A themeable interface.
- Integrated AdBlock.
- Speed Dial.
- Multiplatform support.
"
HOMEPAGE="http://www.qupzilla.com"
SRC_URI="git://github.com/QupZilla/qupzilla.git#4f3aba95ff4194c9b756d196f54d50ff30161f46"
REVISION="1"
LICENSE="GNU GPL v3"
COPYRIGHT="2010-2013 David Rosca"
ARCHITECTURES="x86"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
fi
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
qupzilla${secondaryArchSuffix} = $portVersion
app:qupzilla${secondaryArchSuffix} = $portVersion
"
# TODO: update requirements to be more specific about which Qt
# libraries are required.
REQUIRES="
haiku${secondaryArchSuffix} >= $haikuVersion
qtcore${secondaryArchSuffix} >= 4.8.0
"
BUILD_PREREQUIRES="
cmd:qmake${secondaryArchSuffix}
cmd:make
cmd:g++${secondaryArchSuffix}
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
openssl${secondaryArchSuffix}_devel
qtcore${secondaryArchSuffix} >= 4.8.0
qtcore${secondaryArchSuffix}_devel >= 4.8.0
"
PATCHES="
qupzilla-1.4.x.patchset
"
BUILD()
{
qmake QUPZILLA_PREFIX=${appsDir}/QupZilla
make $jobArgs
}
INSTALL()
{
echo "Installing QupZilla..."
mkdir -p ${appsDir}/QupZilla/
mkdir -p ${appsDir}/QupZilla/lib/
cd bin/
cp qupzilla ${appsDir}/QupZilla/
cp -R locale ${appsDir}/QupZilla/
cp -R plugins ${appsDir}/QupZilla/
cp -R themes ${appsDir}/QupZilla/
cp libQupZilla.* ${appsDir}/QupZilla/lib/
echo "Linking QupZilla..."
addAppDeskbarSymlink ${appsDir}/QupZilla/qupzilla "QupZilla"
}