From b06d42cb4307e168d9cae83b074688b79552b871 Mon Sep 17 00:00:00 2001 From: "Arfonzo J. Coward" Date: Thu, 5 Dec 2013 00:19:46 +0000 Subject: [PATCH 1/3] QupZilla: patches and recipe. --- .../patches/qupzilla_x86-1.4.x.patchset | 96 +++++++++++++++++++ www-client/qupzilla/qupzilla-1.4.x.recipe | 79 +++++++++++++++ 2 files changed, 175 insertions(+) create mode 100644 www-client/qupzilla/patches/qupzilla_x86-1.4.x.patchset create mode 100644 www-client/qupzilla/qupzilla-1.4.x.recipe diff --git a/www-client/qupzilla/patches/qupzilla_x86-1.4.x.patchset b/www-client/qupzilla/patches/qupzilla_x86-1.4.x.patchset new file mode 100644 index 000000000..16a2d9922 --- /dev/null +++ b/www-client/qupzilla/patches/qupzilla_x86-1.4.x.patchset @@ -0,0 +1,96 @@ +From 8cd9ec3eb620f08d9ea0de439b80f45d2e9a8cdc Mon Sep 17 00:00:00 2001 +From: "Arfonzo J. Coward" +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 + #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 // For QT_REQUIRE_VERSION + +-#if defined(Q_OS_LINUX) || defined(__GLIBC__) ++#if defined(Q_OS_LINUX) || defined(__GLIBC__) || defined(__HAIKU__) + #include + #include ++#ifndef __HAIKU__ + #include ++#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 + diff --git a/www-client/qupzilla/qupzilla-1.4.x.recipe b/www-client/qupzilla/qupzilla-1.4.x.recipe new file mode 100644 index 000000000..132b7338f --- /dev/null +++ b/www-client/qupzilla/qupzilla-1.4.x.recipe @@ -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" +SOURCE_DIR="qupzilla" + +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 + " + +# 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_x86-1.4.x.patchset + " + +BUILD() +{ + qmake + 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" +} From 70d8539119324a19d90f3b606e914bed1573facb Mon Sep 17 00:00:00 2001 From: "Arfonzo J. Coward" Date: Thu, 5 Dec 2013 08:30:36 +0000 Subject: [PATCH 2/3] - Renamed patch set to remove '_x86' from filename. - Modified recipe to use prefix of $appsDir at qmake rather than hardcoded path in defines.pri. - Use commit hashtag to reference a specific version from git repo. --- ...1.4.x.patchset => qupzilla-1.4.x.patchset} | 25 ++++++++++++++++++- www-client/qupzilla/qupzilla-1.4.x.recipe | 7 +++--- 2 files changed, 27 insertions(+), 5 deletions(-) rename www-client/qupzilla/patches/{qupzilla_x86-1.4.x.patchset => qupzilla-1.4.x.patchset} (78%) diff --git a/www-client/qupzilla/patches/qupzilla_x86-1.4.x.patchset b/www-client/qupzilla/patches/qupzilla-1.4.x.patchset similarity index 78% rename from www-client/qupzilla/patches/qupzilla_x86-1.4.x.patchset rename to www-client/qupzilla/patches/qupzilla-1.4.x.patchset index 16a2d9922..9b9b2c806 100644 --- a/www-client/qupzilla/patches/qupzilla_x86-1.4.x.patchset +++ b/www-client/qupzilla/patches/qupzilla-1.4.x.patchset @@ -1,4 +1,4 @@ -From 8cd9ec3eb620f08d9ea0de439b80f45d2e9a8cdc Mon Sep 17 00:00:00 2001 +From 49c386fa4bd03dfe7e102c1d0635743d966b75b7 Mon Sep 17 00:00:00 2001 From: "Arfonzo J. Coward" Date: Thu, 5 Dec 2013 00:04:04 +0000 Subject: QupZilla sources and build definitions modified for Haiku. @@ -94,3 +94,26 @@ index e6a56ea..e4ac880 100644 -- 1.8.3.4 + +From 002f7d5e1da83f0e0db8129ae05ebf805abec4fe Mon Sep 17 00:00:00 2001 +From: "Arfonzo J. Coward" +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 + diff --git a/www-client/qupzilla/qupzilla-1.4.x.recipe b/www-client/qupzilla/qupzilla-1.4.x.recipe index 132b7338f..bd64d69b3 100644 --- a/www-client/qupzilla/qupzilla-1.4.x.recipe +++ b/www-client/qupzilla/qupzilla-1.4.x.recipe @@ -12,8 +12,7 @@ DESCRIPTION=" " HOMEPAGE="http://www.qupzilla.com" -SRC_URI="git://github.com/QupZilla/qupzilla.git" -SOURCE_DIR="qupzilla" +SRC_URI="git://github.com/QupZilla/qupzilla.git#4f3aba95ff4194c9b756d196f54d50ff30161f46" REVISION="1" LICENSE="GNU GPL v3" @@ -50,12 +49,12 @@ BUILD_REQUIRES=" " PATCHES=" - qupzilla_x86-1.4.x.patchset + qupzilla-1.4.x.patchset " BUILD() { - qmake + qmake QUPZILLA_PREFIX=${appsDir}/QupZilla make $jobArgs } From caf217ce73cbd147e4bf258929989a726f95d87d Mon Sep 17 00:00:00 2001 From: "Arfonzo J. Coward" Date: Thu, 5 Dec 2013 08:34:38 +0000 Subject: [PATCH 3/3] Added provides for app:qupzilla. --- www-client/qupzilla/qupzilla-1.4.x.recipe | 1 + 1 file changed, 1 insertion(+) diff --git a/www-client/qupzilla/qupzilla-1.4.x.recipe b/www-client/qupzilla/qupzilla-1.4.x.recipe index bd64d69b3..f49c354ff 100644 --- a/www-client/qupzilla/qupzilla-1.4.x.recipe +++ b/www-client/qupzilla/qupzilla-1.4.x.recipe @@ -26,6 +26,7 @@ SECONDARY_ARCHITECTURES="x86" PROVIDES=" qupzilla${secondaryArchSuffix} = $portVersion + app:qupzilla${secondaryArchSuffix} = $portVersion " # TODO: update requirements to be more specific about which Qt