From 6e1f8f0a579df1988b56a43f0f1a0f03f3bf6570 Mon Sep 17 00:00:00 2001 From: SolveFinder Date: Aug 04 2023 08:25:22 +0000 Subject: [PATCH 1/2] libre/scenarist without qt5-webengine support --- diff --git a/libre/scenarist/PKGBUILD b/libre/scenarist/PKGBUILD new file mode 100644 index 0000000..3429438 --- /dev/null +++ b/libre/scenarist/PKGBUILD @@ -0,0 +1,63 @@ +# Maintainer: Balló György +# Contributor: cyrant + +pkgname=scenarist +pkgver=0.7.2.rc15 +pkgrel=1 +pkgdesc='Screenwriting software to create screenplays which oriented at international standards in the field of film production' +arch=('x86_64') +url='https://kitscenarist.ru/en/' +license=('GPL3') +depends=('hunspell' 'qt5-multimedia' 'qt5-svg') +makedepends=('git') +_commit=70ebff68c67242ee4f9a5d1f6397f00d0dd471ff +source=("git+https://github.com/dimkanovikov/KITScenarist.git#commit=$_commit" + 'git+https://github.com/dimkanovikov/KITScenaristCore.git' + 'scenarist.mime.xml' + 'scenarist.appdata.xml' + 'libre.patch') +sha256sums=('SKIP' + 'SKIP' + '513987794f8ba5a4c12aa2a65314fccdc098f86e616a416977aead29e6545b63' + 'ae04ebca48b01ef86d913f769ff856e259e7c3f13a75fc4e05cc15487460772b' + 'f3967900375e103dfd8b33af07c7de1dabb714dc67cc358d6a68a508f616219d') + +pkgver() { + cd KITScenarist + git describe --tags | sed 's/-/+/g' +} + +prepare() { + cd KITScenarist + + git config protocol.file.allow always + + git submodule init + git submodule set-url src/bin/scenarist-core "$srcdir/KITScenaristCore" + git submodule update + + # Use system hunspell + sed -i '/hunspell/d + s/LIBS += -lz/LIBS += -lhunspell -lz/' src/bin/scenarist-desktop.pro \ + src/libs/libs.pro + patch -p1 -i ../libre.patch + +} + +build() { + cd KITScenarist/src + + git config --global protocol.file.allow never + + qmake-qt5 + make +} + +package() { + cd KITScenarist + install -Dm755 build/Release/bin/scenarist-desktop/Scenarist "$pkgdir/usr/bin/$pkgname" + install -Dm644 build/Ubuntu/scenarist_amd64/usr/share/applications/$pkgname.desktop "$pkgdir/usr/share/applications/$pkgname.desktop" + install -Dm644 build/Ubuntu/scenarist_amd64/usr/share/pixmaps/$pkgname.png "$pkgdir/usr/share/icons/hicolor/512x512/apps/$pkgname.png" + install -Dm644 ../$pkgname.mime.xml "$pkgdir/usr/share/mime/packages/$pkgname.xml" + install -Dm644 ../$pkgname.appdata.xml "$pkgdir/usr/share/metainfo/$pkgname.appdata.xml" +} diff --git a/libre/scenarist/libre.patch b/libre/scenarist/libre.patch new file mode 100644 index 0000000..8b4a728 --- /dev/null +++ b/libre/scenarist/libre.patch @@ -0,0 +1,110 @@ +diff --git a/src/bin/scenarist-desktop.pro b/src/bin/scenarist-desktop.pro +index c03d4785..372160bc 100755 +--- a/src/bin/scenarist-desktop.pro ++++ b/src/bin/scenarist-desktop.pro +@@ -5,7 +5,6 @@ + #------------------------------------------------- + + QT += core gui gui-private sql xml widgets widgets-private printsupport network concurrent multimedia svg +-!win32-g++: QT += webengine webenginewidgets + + TARGET = Scenarist + TEMPLATE = app +diff --git a/src/bin/scenarist-desktop/UserInterfaceLayer/Research/ResearchItemDialog.cpp b/src/bin/scenarist-desktop/UserInterfaceLayer/Research/ResearchItemDialog.cpp +index f49a2e57..446d2170 100644 +--- a/src/bin/scenarist-desktop/UserInterfaceLayer/Research/ResearchItemDialog.cpp ++++ b/src/bin/scenarist-desktop/UserInterfaceLayer/Research/ResearchItemDialog.cpp +@@ -208,15 +208,7 @@ QWidget* ResearchItemDialog::focusedOnExec() const + void ResearchItemDialog::initView() + { + m_ui->otherType->setEnabled(m_ui->other->isChecked()); +- +-#ifdef Q_OS_WIN +- // +- // В виндовс XP webengine не работает, поэтому скрываем пункт с добавлением ссылки +- // +- if (QSysInfo::windowsVersion() == QSysInfo::WV_XP) { +- m_ui->otherType->removeItem(2); +- } +-#endif ++ m_ui->otherType->removeItem(2); + } + + void ResearchItemDialog::initConnections() +diff --git a/src/bin/scenarist-desktop/UserInterfaceLayer/Research/ResearchView.cpp b/src/bin/scenarist-desktop/UserInterfaceLayer/Research/ResearchView.cpp +index 25360002..504d21cc 100644 +--- a/src/bin/scenarist-desktop/UserInterfaceLayer/Research/ResearchView.cpp ++++ b/src/bin/scenarist-desktop/UserInterfaceLayer/Research/ResearchView.cpp +@@ -411,9 +411,6 @@ void ResearchView::editUrl(const QString& _name, const QString& _url, const QStr + } + + m_ui->urlLink->setText(_url); +- if (m_ui->urlContent->url().toString() != _url) { +- m_ui->urlContent->load(QUrl(_url)); +- } + m_cachedUrlContent = _cachedContent; + + // +@@ -948,11 +945,9 @@ void ResearchView::initConnections() + m_ui->urlLink->setText(url.toString()); + emit urlLinkChanged(url.toString()); + } +- m_ui->urlContent->load(url); + }; + connect(m_ui->urlLink, &QLineEdit::returnPressed, loadUrlFunction); + connect(m_ui->urlLoad, &QPushButton::clicked, loadUrlFunction); +- connect(m_ui->urlContent, &QWebEngineView::loadProgress, m_ui->urlLoadProgress, &QProgressBar::setValue); + // + // ... смена изображения + // +@@ -1056,22 +1051,6 @@ void ResearchView::initConnections() + // + connect(m_ui->urlName, &QLineEdit::textChanged, this, &ResearchView::urlNameChanged); + connect(m_ui->urlLink, &QLineEdit::textEdited, this, &ResearchView::urlLinkChanged); +- connect(m_ui->urlContent, &QWebEngineView::loadFinished, [=](bool _success) { +- // +- // Если страница загрузилась успешно, кэшируем её содержимое +- // +- if (_success) { +- m_ui->urlContent->page()->toHtml([=](const QString& _html){ +- emit urlContentChanged(_html); +- }); +- } +- // +- // Если не удалось загрузить, загружаем информацию из кэша +- // +- else { +- m_ui->urlContent->page()->setHtml(m_cachedUrlContent); +- } +- }); + // + // ... галерея изображений + // +diff --git a/src/bin/scenarist-desktop/UserInterfaceLayer/Research/ResearchView.ui b/src/bin/scenarist-desktop/UserInterfaceLayer/Research/ResearchView.ui +index c4005795..3abff91e 100644 +--- a/src/bin/scenarist-desktop/UserInterfaceLayer/Research/ResearchView.ui ++++ b/src/bin/scenarist-desktop/UserInterfaceLayer/Research/ResearchView.ui +@@ -1103,7 +1103,7 @@ p, li { white-space: pre-wrap; } + + + +- ++ + + + 0 +@@ -1552,9 +1552,9 @@ p, li { white-space: pre-wrap; } + + + +- QWebEngineView ++ QWidget + QWidget +-
QtWebEngineWidgets/QWebEngineView
++
QWidget
+ 1 +
+ +-- +2.41.0 + diff --git a/libre/scenarist/scenarist.appdata.xml b/libre/scenarist/scenarist.appdata.xml new file mode 100644 index 0000000..8ab257e --- /dev/null +++ b/libre/scenarist/scenarist.appdata.xml @@ -0,0 +1,19 @@ + + + ru.kitscenarist.Scenarist + scenarist.desktop + KIT Scenarist + Screenwriting software + CC0-1.0 + GPL-3.0 + +

KIT Scenarist is a program for creating screenplays which oriented at international standards in the field of film production. The program is a full-featured studio for creating stories from the birth of the idea and before the transfer of the script to production.

+
+ + + https://kitscenarist.ru/assets/images/news/cards-filter.jpg + + + https://github.com/dimkanovikov/KITScenarist/issues + https://kitscenarist.ru/en/ +
diff --git a/libre/scenarist/scenarist.mime.xml b/libre/scenarist/scenarist.mime.xml new file mode 100644 index 0000000..e04d418 --- /dev/null +++ b/libre/scenarist/scenarist.mime.xml @@ -0,0 +1,7 @@ + + + + KIT Scenarist Project + + + From abae16f859ebbca87486ceb52c45c23b7146ce47 Mon Sep 17 00:00:00 2001 From: SolveFinder Date: Aug 04 2023 13:35:39 +0000 Subject: [PATCH 2/2] minor fix --- diff --git a/libre/scenarist/PKGBUILD b/libre/scenarist/PKGBUILD index 3429438..e56afb4 100644 --- a/libre/scenarist/PKGBUILD +++ b/libre/scenarist/PKGBUILD @@ -4,6 +4,7 @@ pkgname=scenarist pkgver=0.7.2.rc15 pkgrel=1 +pkgrel+=.parabola1 pkgdesc='Screenwriting software to create screenplays which oriented at international standards in the field of film production' arch=('x86_64') url='https://kitscenarist.ru/en/' @@ -29,9 +30,6 @@ pkgver() { prepare() { cd KITScenarist - - git config protocol.file.allow always - git submodule init git submodule set-url src/bin/scenarist-core "$srcdir/KITScenaristCore" git submodule update @@ -46,9 +44,6 @@ prepare() { build() { cd KITScenarist/src - - git config --global protocol.file.allow never - qmake-qt5 make }