first import of working package
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
# Generated by mksrcinfo v8
|
||||
# Sun Jun 11 14:14:08 UTC 2017
|
||||
pkgbase = qt5-webkit-print
|
||||
pkgdesc = Classes for a WebKit2 based implementation and a new QML API (maintained fork)
|
||||
pkgver = 5.212.0
|
||||
pkgrel = 1
|
||||
url = https://github.com/annulen/webkit/wiki
|
||||
arch = x86_64
|
||||
license = GPL3
|
||||
license = LGPL3
|
||||
license = FDL
|
||||
license = custom
|
||||
makedepends = cmake
|
||||
makedepends = ruby
|
||||
makedepends = gperf
|
||||
makedepends = python2
|
||||
makedepends = qt5-doc
|
||||
makedepends = qt5-tools
|
||||
depends = qt5-location
|
||||
depends = qt5-sensors
|
||||
depends = qt5-webchannel
|
||||
depends = libwebp
|
||||
depends = libxslt
|
||||
depends = libxcomposite
|
||||
depends = gst-plugins-base
|
||||
depends = hyphen
|
||||
optdepends = gst-plugins-good: Webm codec support
|
||||
provides = qt5-webkit
|
||||
conflicts = qt5-webkit
|
||||
source = https://github.com/annulen/webkit/releases/download/qtwebkit-5.212.0-alpha/qtwebkit-5.212.0-alpha.tar.xz
|
||||
source = qt5-webkit-icu59.patch
|
||||
source = qt5-webkit-ng-gcc7.patch
|
||||
source = qt5-webkit-ng-functional.patch
|
||||
source = qt5-webkit-pdf_scaling.patch
|
||||
source = qt5-webkit-solid_background_PDF.patch
|
||||
sha256sums = f70fea4623a0f1df6ec535358f9c431d6ead9c04742a85258aaabcd0805d2719
|
||||
sha256sums = e1306e696ad7125fa00083aa966be0ea6fe6de555c9e1d119957f208f258edfe
|
||||
sha256sums = 58ecbd8708f5afe4e974fdcd6c1f32fea61ccc55dc9bb711768f2d0da6963fb8
|
||||
sha256sums = c85344edcc23930c0190b2f8ec3847bf8bdbbf7f1d4fa877c502e354e5f4233e
|
||||
sha256sums = 3118595e764bec08960518c07eb5c321d7195b23adc634ba7a50987aeec642b0
|
||||
sha256sums = 339876e8dfdaabdc974d2b2f095d85691d339aef16abe97b472268dae462d0cf
|
||||
|
||||
pkgname = qt5-webkit-print
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
_src
|
||||
src
|
||||
pkg
|
||||
qtwebkit-*
|
||||
lib64-libriis.conf
|
||||
@@ -0,0 +1,82 @@
|
||||
# Maintainer: Antonio Rojas <arojas@archlinux.org>
|
||||
|
||||
pkgname=qt5-webkit-print
|
||||
_qtver=5.212.0
|
||||
pkgver=${_qtver/-/}
|
||||
pkgrel=1
|
||||
arch=(x86_64)
|
||||
url='https://github.com/annulen/webkit/wiki'
|
||||
license=(GPL3 LGPL3 FDL custom)
|
||||
pkgdesc='Classes for a WebKit2 based implementation and a new QML API (maintained fork)'
|
||||
depends=(qt5-location qt5-sensors qt5-webchannel libwebp libxslt libxcomposite gst-plugins-base hyphen)
|
||||
makedepends=(cmake ruby gperf python2 qt5-doc qt5-tools)
|
||||
optdepends=('gst-plugins-good: Webm codec support')
|
||||
conflicts=(qt5-webkit)
|
||||
provides=(qt5-webkit)
|
||||
source=("https://github.com/annulen/webkit/releases/download/qtwebkit-$pkgver-alpha/qtwebkit-$pkgver-alpha.tar.xz"
|
||||
qt5-webkit-icu59.patch qt5-webkit-ng-gcc7.patch qt5-webkit-ng-functional.patch qt5-webkit-pdf_scaling.patch qt5-webkit-solid_background_PDF.patch)
|
||||
sha256sums=('f70fea4623a0f1df6ec535358f9c431d6ead9c04742a85258aaabcd0805d2719'
|
||||
'e1306e696ad7125fa00083aa966be0ea6fe6de555c9e1d119957f208f258edfe'
|
||||
'58ecbd8708f5afe4e974fdcd6c1f32fea61ccc55dc9bb711768f2d0da6963fb8'
|
||||
'c85344edcc23930c0190b2f8ec3847bf8bdbbf7f1d4fa877c502e354e5f4233e'
|
||||
'3118595e764bec08960518c07eb5c321d7195b23adc634ba7a50987aeec642b0'
|
||||
'339876e8dfdaabdc974d2b2f095d85691d339aef16abe97b472268dae462d0cf')
|
||||
|
||||
prepare() {
|
||||
mkdir -p build
|
||||
|
||||
cd qtwebkit-$pkgver-alpha
|
||||
# Fix build with ICU 59 (PLD linux)
|
||||
patch -p1 -i ../qt5-webkit-icu59.patch
|
||||
# Fix build with GCC 7
|
||||
patch -p1 -i ../qt5-webkit-ng-gcc7.patch
|
||||
patch -p1 -i ../qt5-webkit-ng-functional.patch
|
||||
# aleray fixes (https://github.com/annulen/webkit/compare/qtwebkit-stable...aleray:ospkit2)
|
||||
patch -p1 -i ../qt5-webkit-pdf_scaling.patch
|
||||
patch -p1 -i ../qt5-webkit-solid_background_PDF.patch
|
||||
|
||||
sed -e 's|-Wundef|-Wundef -Wno-expansion-to-defined|' -i Source/cmake/WebKitHelpers.cmake
|
||||
}
|
||||
|
||||
build() {
|
||||
cd build
|
||||
|
||||
cmake ../qtwebkit-$pkgver-alpha \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DPORT=Qt \
|
||||
-DENABLE_TOOLS=OFF
|
||||
# -DCMAKE_INSTALL_PREFIX:PATH=/usr/local \
|
||||
# -DVMIME_INSTALL_LIBDIR=/usr/local/lib \
|
||||
# -DENABLE_WEBKIT2=OFF \
|
||||
# -DENABLE_VIDEO=OFF \
|
||||
# -DENABLE_WEB_AUDIO=OFF \
|
||||
# -DENABLE_GEOLOCATION=OFF \
|
||||
# -DENABLE_IOS_AIRPLAY=OFF \
|
||||
# -DENABLE_MINIBROWSER=OFF \
|
||||
# -DENABLE_NOTIFICATIONS=OFF \
|
||||
# -DENABLE_REMOTE_INSPECTOR=OFF \
|
||||
# -DENABLE_SPEECH_SYNTHESIS=OFF \
|
||||
# -DENABLE_TOUCH_EVENTS=OFF \
|
||||
# -DENABLE_TOUCH_SLIDER=OFF \
|
||||
# -DENABLE_TOUCH_ICON_LOADING=OFF \
|
||||
# -DENABLE_DEVICE_ORIENTATION=OFF \
|
||||
# -DENABLE_GAMEPAD=OFF \
|
||||
# -DENABLE_MEDIA_CAPTURE=OFF \
|
||||
# -DENABLE_VIBRATION=OFF
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
|
||||
# mkdir -p "$pkgdir/etc/ld.so.conf.d"
|
||||
# install -Dm644 lib64-libriis.conf "$pkgdir/etc/ld.so.conf.d/lib64-libriis.conf"
|
||||
|
||||
cd build
|
||||
make DESTDIR="$pkgdir" install
|
||||
|
||||
mv "$pkgdir"/usr/local/lib64 "$pkgdir"/usr/local/lib
|
||||
|
||||
install -d "$pkgdir"/usr/share/licenses
|
||||
ln -s /usr/share/licenses/qt5-base "$pkgdir"/usr/share/licenses/${pkgname}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
Qt5 WebkitWidgets specialized for printing for Libriis
|
||||
===================================================
|
||||
|
||||
## Special qt5-webkit-ng build dedicated for printing
|
||||
qt5-webkit-libriis is a fork of qt5-webkit-ng with [aleray patches](https://github.com/annulen/webkit/compare/qtwebkit-stable...aleray:ospkit2) and optimisation applied on build.
|
||||
|
||||
## [Libriis](https://figureslibres.io/gogs/bachir/libriis) is a Markup Cascading Styles Printing software.
|
||||
Inspired by html2print from osp, you can write and organize your contents with markdown, design your layout with css and js, export to pdf and share your work with git.
|
||||
@@ -0,0 +1,38 @@
|
||||
--- qtwebkit-opensource-src-5.5.1/Source/JavaScriptCore/API/JSStringRef.h.orig 2015-10-13 06:37:10.000000000 +0200
|
||||
+++ qtwebkit-opensource-src-5.5.1/Source/JavaScriptCore/API/JSStringRef.h 2017-04-24 12:26:42.495345570 +0200
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <stdbool.h>
|
||||
#endif
|
||||
#include <stddef.h> /* for size_t */
|
||||
+#include <uchar.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -43,7 +44,7 @@
|
||||
@typedef JSChar
|
||||
@abstract A Unicode character.
|
||||
*/
|
||||
- typedef unsigned short JSChar;
|
||||
+ typedef char16_t JSChar;
|
||||
#else
|
||||
typedef wchar_t JSChar;
|
||||
#endif
|
||||
--- qtwebkit-opensource-src-5.5.1/Source/WebKit2/Shared/API/c/WKString.h.orig 2015-10-13 06:37:12.000000000 +0200
|
||||
+++ qtwebkit-opensource-src-5.5.1/Source/WebKit2/Shared/API/c/WKString.h 2017-04-24 12:27:33.432011867 +0200
|
||||
@@ -31,6 +31,7 @@
|
||||
#ifndef __cplusplus
|
||||
#include <stdbool.h>
|
||||
#endif
|
||||
+#include <uchar.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -38,7 +39,7 @@
|
||||
|
||||
#if !defined(WIN32) && !defined(_WIN32) \
|
||||
&& !((defined(__CC_ARM) || defined(__ARMCC__)) && !defined(__linux__)) /* RVCT */
|
||||
- typedef unsigned short WKChar;
|
||||
+ typedef char16_t WKChar;
|
||||
#else
|
||||
typedef wchar_t WKChar;
|
||||
#endif
|
||||
@@ -0,0 +1,40 @@
|
||||
--- webkit-qtwebkit-tp5/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.h.orig 2017-06-01 06:14:55.587195469 +0000
|
||||
+++ webkit-qtwebkit-tp5/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.h 2017-06-01 06:15:23.040491577 +0000
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <wtf/Optional.h>
|
||||
#include <wtf/RefCounted.h>
|
||||
#include <wtf/text/WTFString.h>
|
||||
+#include <functional>
|
||||
|
||||
namespace Inspector {
|
||||
|
||||
--- webkit-qtwebkit-tp5/Source/WebCore/css/CSSValue.h.orig 2017-06-01 07:48:18.099623726 +0000
|
||||
+++ webkit-qtwebkit-tp5/Source/WebCore/css/CSSValue.h 2017-06-01 07:48:41.542925091 +0000
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <wtf/RefCounted.h>
|
||||
#include <wtf/RefPtr.h>
|
||||
#include <wtf/TypeCasts.h>
|
||||
+#include <functional>
|
||||
|
||||
namespace WebCore {
|
||||
|
||||
--- webkit-qtwebkit-tp5/Source/WebCore/css/StyleSheetContents.h.orig 2017-06-01 08:33:31.792577087 +0000
|
||||
+++ webkit-qtwebkit-tp5/Source/WebCore/css/StyleSheetContents.h 2017-06-01 08:33:44.715892348 +0000
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <wtf/Vector.h>
|
||||
#include <wtf/text/AtomicStringHash.h>
|
||||
#include <wtf/text/TextPosition.h>
|
||||
+#include <functional>
|
||||
|
||||
namespace WebCore {
|
||||
|
||||
--- webkit-qtwebkit-tp5/Source/WebCore/loader/ResourceLoader.h.orig 2017-06-01 09:47:50.463011889 +0000
|
||||
+++ webkit-qtwebkit-tp5/Source/WebCore/loader/ResourceLoader.h 2017-06-01 09:48:21.976300680 +0000
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "ResourceRequest.h"
|
||||
#include "ResourceResponse.h"
|
||||
#include <wtf/Forward.h>
|
||||
+#include <functional>
|
||||
|
||||
namespace WTF {
|
||||
class SchedulePair;
|
||||
@@ -0,0 +1,12 @@
|
||||
Index: /trunk/Source/JavaScriptCore/runtime/JSArrayBufferView.h
|
||||
===================================================================
|
||||
--- trunk/Source/JavaScriptCore/runtime/JSArrayBufferView.h (revision 211433)
|
||||
+++ trunk/Source/JavaScriptCore/runtime/JSArrayBufferView.h (revision 211434)
|
||||
@@ -168,5 +168,5 @@
|
||||
void neuter();
|
||||
|
||||
- void* vector()
|
||||
+ void* vector() const
|
||||
{
|
||||
return m_vector.getPredicated(
|
||||
this,
|
||||
@@ -0,0 +1,25 @@
|
||||
From 24e655e27c68880cd71c762a27e1813e3300a4b3 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Leray <alexandre@stdin.fr>
|
||||
Date: Wed, 10 Aug 2016 18:38:31 +0200
|
||||
Subject: [PATCH] Fix PDF scale issue with Point units
|
||||
|
||||
Done by hardcoding the scalefactor to 72 (1 inch = 72 points).
|
||||
---
|
||||
Source/WebKit/qt/WidgetApi/qwebframe.cpp | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Source/WebKit/qt/WidgetApi/qwebframe.cpp b/Source/WebKit/qt/WidgetApi/qwebframe.cpp
|
||||
index e27d9b0f8f40..a35d5fbcc5ca 100644
|
||||
--- a/Source/WebKit/qt/WidgetApi/qwebframe.cpp
|
||||
+++ b/Source/WebKit/qt/WidgetApi/qwebframe.cpp
|
||||
@@ -827,8 +827,8 @@ void QWebFrame::print(QPrinter *printer) const
|
||||
if (!painter.begin(printer))
|
||||
return;
|
||||
|
||||
- const qreal zoomFactorX = (qreal)printer->logicalDpiX() / qt_defaultDpi();
|
||||
- const qreal zoomFactorY = (qreal)printer->logicalDpiY() / qt_defaultDpi();
|
||||
+ const qreal zoomFactorX = (qreal)printer->logicalDpiX() / 72;
|
||||
+ const qreal zoomFactorY = (qreal)printer->logicalDpiY() / 72;
|
||||
|
||||
QRect qprinterRect = printer->pageRect();
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From df18029adc431e6f0f3f5cfa47fb09849b2be63a Mon Sep 17 00:00:00 2001
|
||||
From: Alex Leray <alexandre@stdin.fr>
|
||||
Date: Wed, 10 Aug 2016 18:40:55 +0200
|
||||
Subject: [PATCH] Fixes issues with solid background in PDFs.
|
||||
|
||||
---
|
||||
Source/WebKit/qt/WidgetApi/qwebview.cpp | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Source/WebKit/qt/WidgetApi/qwebview.cpp b/Source/WebKit/qt/WidgetApi/qwebview.cpp
|
||||
index d97a604261c0..8f5cd207aea2 100644
|
||||
--- a/Source/WebKit/qt/WidgetApi/qwebview.cpp
|
||||
+++ b/Source/WebKit/qt/WidgetApi/qwebview.cpp
|
||||
@@ -28,6 +28,7 @@
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#include "qwebviewaccessible_p.h"
|
||||
#endif
|
||||
+#include <qapplication.h>
|
||||
#include <qbitmap.h>
|
||||
#include <qdir.h>
|
||||
#include <qevent.h>
|
||||
@@ -259,7 +260,9 @@ void QWebView::setPage(QWebPage* page)
|
||||
|
||||
if (d->page) {
|
||||
d->page->setView(this);
|
||||
- d->page->setPalette(palette());
|
||||
+ QPalette palette = QApplication::palette();
|
||||
+ palette.setBrush(QPalette::Base, QColor::fromRgbF(0, 0, 0, 0));
|
||||
+ d->page->setPalette(palette);
|
||||
// #### connect signals
|
||||
QWebFrame *mainFrame = d->page->mainFrame();
|
||||
connect(mainFrame, SIGNAL(titleChanged(QString)),
|
||||
Reference in New Issue
Block a user