mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
kchmviewer: add recipe for 7.7 version
This commit is contained in:
51
app-text/kchmviewer/additional-files/kchmviewer.rdef.in
Normal file
51
app-text/kchmviewer/additional-files/kchmviewer.rdef.in
Normal file
@@ -0,0 +1,51 @@
|
||||
|
||||
resource app_flags B_MULTIPLE_LAUNCH;
|
||||
|
||||
resource app_version {
|
||||
major = @MAJOR@,
|
||||
middle = @MIDDLE@,
|
||||
minor = 0,
|
||||
|
||||
variety = B_APPV_FINAL,
|
||||
internal = 0,
|
||||
|
||||
short_info = "Kchmviewer",
|
||||
long_info = "@LONG_INFO@"
|
||||
};
|
||||
|
||||
resource app_signature "@APP_SIGNATURE@";
|
||||
|
||||
resource file_types message {
|
||||
"types" = "application/x-chm",
|
||||
"types" = "application/epub+zip"
|
||||
};
|
||||
|
||||
resource vector_icon {
|
||||
$"6E6369660B04018003010000020006023CC800389C28B89C283CC80049DBD7C6"
|
||||
$"AAE100BAECFFFF008FFF020006023CC800389C28B89C283CC80049DBD7C6AAE1"
|
||||
$"0075C2FFFF02366D020016023C96143A4D1EBA4D1E3C96144B834748BFD70057"
|
||||
$"FFB502001602BC591EBB29993B2999BC591E481AB84BD27A00BEFFFF02001602"
|
||||
$"3CC800389C28B89C283CC80049DBD7C6AAE100FFFFF202001602BC622CBB9764"
|
||||
$"3B9D06BC65E847C6844C30460057FFF402001602BBBEF2BA97203AB9A6BBF0DE"
|
||||
$"482F564BDE8F0057FFF402001602BC591EBB29993B2999BC591E481AB84BD27A"
|
||||
$"0057FFF405000B0A05445D495D603E5A3B5B3F0607A62B223C49445B5A3E5838"
|
||||
$"583B58355A3139250A04293F444B5A3141280A04223C293F412839250606AE0B"
|
||||
$"444B4252424E4256445B5A3E5838583B58355A310605E602223C49445B425242"
|
||||
$"56424E444B0802B4B4C25BC117C8F70802B642C1E6C0BCC70908022540434E02"
|
||||
$"21BF20BEEBBF20BEEBBF20BEEBBF25BF26BF25BF26BF25BF7EBED1C020BF09BF"
|
||||
$"D1BE99C06FBDFBC0CCBE51C0A9BDA2C0F1BD24C0C7BD5AC0EFBCEDC09EBCD2C0"
|
||||
$"01BCD2C05CBCD2BF62BD8DBE20BD10BEC2BE0ABD7EBF7CBCAEBEAFBD03C039BC"
|
||||
$"60C14EBC87C0D5BC53C1C7BCBBC203BDB4C203BD1FC203BE1DC1B2BF14C1E8BE"
|
||||
$"92C17CBF95C043C133C101C04ABF85C21DBEE3C324BF0FC2C3BEB7C385BEA1C4"
|
||||
$"27BEA1C3DBBEA1C462BED3C4ACBEB2C48EBEF5C4C9BF49C4BCBF1CC4CFBF76C4"
|
||||
$"AABFD6C425BFA5C478BFD6C425C005C42EC005C42EBFF5C47EBFA5C504BFD6C4"
|
||||
$"C5BF75C544BF05C588BF40C570BEBCC5A6BE57C57FBE82C5A3BE2CC55ABE16C4"
|
||||
$"B7BE16C517BE16C45FBE5AC389BE2DC3FABE88C318BF7CC1A2BEE8C276C00FC0"
|
||||
$"CEC0A3BFCFC072C032C0D4BF6BC0EDBE8DC0EDBF00C0EDBDF7C060BD5AC0BEBD"
|
||||
$"92C002BD23BEFDBD60BF8CBD25BE88BD91BDD5BE3CBE25BDDABD85BE9DBD5DBF"
|
||||
$"64BD5DBF00BD5DBFAABD97BFF5BD70BFDABDBEC010BE2EBFF7BDF0C011BE8DBF"
|
||||
$"D0BEFEBEFEBED3BF7DBEFEBEFE0A04BFB8C6EABEF7C823BE35C77CBEF2C63F0A"
|
||||
$"0A000100000A0101011001178300040A020102000A030103000A040104000A05"
|
||||
$"0105000A0701061001178200040A0801071001178100040A0901081001178100"
|
||||
$"040A0A02090A12409EB5400ACDBE9CF83F5A3A486A70CA70D10115800004"
|
||||
};
|
||||
107
app-text/kchmviewer/kchmviewer-7.7.recipe
Normal file
107
app-text/kchmviewer/kchmviewer-7.7.recipe
Normal file
@@ -0,0 +1,107 @@
|
||||
SUMMARY="CHM viewer for KDE"
|
||||
DESCRIPTION="Kchmviewer is a free, open-source CHM (aka MS HTML help) and EPUB \
|
||||
viewer written in C++ for Unix, Mac and Windows systems. Unlike most existing \
|
||||
CHM viewers for Unix, it uses Trolltech Qt widget library, and could optionally \
|
||||
be compiled for better KDE integration. It does not require KDE, but may be \
|
||||
compiled with KDE widget support. Since version 5.0 it uses the Webkit API to \
|
||||
show the content.
|
||||
|
||||
The main advantage of kchmviewer is the best support for non-English languages. \
|
||||
Unlike other viewers, kchmviewer in most cases is able to correctly detect the \
|
||||
chm file encoding and show it. It correctly shows the index and table of context \
|
||||
in Russian, Spanish, Romanian, Korean, Chinese and Arabic help files, and with \
|
||||
new search engine is able to search in any chm file no matter what language \
|
||||
it is written."
|
||||
HOMEPAGE="http://www.ulduzsoft.com/linux/kchmviewer/"
|
||||
COPYRIGHT="George Yunaev"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://sourceforge.net/projects/kchmviewer/files/kchmviewer/$portVersion/kchmviewer-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="27cbac45c786b1718550a87e6f86010e161302b426c6396ff2a3091b913b17dd"
|
||||
SOURCE_DIR="kchmviewer-$portVersion"
|
||||
PATCHES="kchmviewer-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="kchmviewer.rdef.in"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
kchmviewer$secondaryArchSuffix = $portVersion
|
||||
app:kchmviewer$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libchm$secondaryArchSuffix
|
||||
lib:libfreetype$secondaryArchSuffix
|
||||
lib:libfontconfig$secondaryArchSuffix
|
||||
lib:libGL$secondaryArchSuffix
|
||||
lib:libintl$secondaryArchSuffix
|
||||
lib:libjpeg$secondaryArchSuffix
|
||||
lib:libpng16$secondaryArchSuffix
|
||||
lib:libQt5Core$secondaryArchSuffix
|
||||
lib:libQt5Gui$secondaryArchSuffix
|
||||
lib:libQt5Network$secondaryArchSuffix
|
||||
lib:libQt5PrintSupport$secondaryArchSuffix
|
||||
lib:libQt5Svg$secondaryArchSuffix
|
||||
lib:libQt5WebKit$secondaryArchSuffix
|
||||
lib:libQt5WebKitWidgets$secondaryArchSuffix
|
||||
lib:libQt5Widgets$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
lib:libzip$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libchm$secondaryArchSuffix
|
||||
devel:libfreetype$secondaryArchSuffix
|
||||
devel:libfontconfig$secondaryArchSuffix
|
||||
devel:libGL$secondaryArchSuffix
|
||||
devel:libjpeg$secondaryArchSuffix
|
||||
devel:libpng$secondaryArchSuffix
|
||||
devel:libQt5Core$secondaryArchSuffix
|
||||
devel:libQt5Gui$secondaryArchSuffix
|
||||
devel:libQt5Network$secondaryArchSuffix
|
||||
devel:libQt5PrintSupport$secondaryArchSuffix
|
||||
devel:libQt5Svg$secondaryArchSuffix
|
||||
devel:libQt5WebKit$secondaryArchSuffix
|
||||
devel:libQt5WebKitWidgets$secondaryArchSuffix
|
||||
devel:libQt5Widgets$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
devel:libzip$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:qmake$secondaryArchSuffix >= 5
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
qmake
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
mkdir -p $appsDir
|
||||
cp -f $sourceDir/bin/kchmviewer $appsDir/Kchmviewer
|
||||
|
||||
local APP_SIGNATURE="application/x-vnd.kde.kchmviewer"
|
||||
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
||||
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
||||
local LONG_INFO="$SUMMARY"
|
||||
|
||||
sed \
|
||||
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
|
||||
-e "s|@MAJOR@|$MAJOR|" \
|
||||
-e "s|@MIDDLE@|$MIDDLE|" \
|
||||
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
||||
$portDir/additional-files/kchmviewer.rdef.in > kchmviewer.rdef
|
||||
|
||||
addResourcesToBinaries kchmviewer.rdef $appsDir/Kchmviewer
|
||||
addAppDeskbarSymlink $appsDir/Kchmviewer Kchmviewer
|
||||
}
|
||||
59
app-text/kchmviewer/patches/kchmviewer-7.7.patchset
Normal file
59
app-text/kchmviewer/patches/kchmviewer-7.7.patchset
Normal file
@@ -0,0 +1,59 @@
|
||||
From a67d10648c39f7d35fdc24a88a10733b97d7f4a6 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Mon, 6 Aug 2018 13:03:50 +1000
|
||||
Subject: Fix build for Haiku
|
||||
|
||||
|
||||
diff --git a/src/main.cpp b/src/main.cpp
|
||||
index b17d203..4310a44 100644
|
||||
--- a/src/main.cpp
|
||||
+++ b/src/main.cpp
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "dbus_interface.h"
|
||||
#include "version.h"
|
||||
|
||||
-#if !defined (WIN32)
|
||||
+#if !defined (WIN32) && !defined(__HAIKU__)
|
||||
#include <QtDBus/QtDBus>
|
||||
#endif
|
||||
|
||||
@@ -70,7 +70,7 @@ int main( int argc, char ** argv )
|
||||
// Configuration
|
||||
pConfig = new Config();
|
||||
|
||||
-#if !defined (WIN32) && !defined(Q_WS_MAC)
|
||||
+#if !defined (WIN32) && !defined(Q_WS_MAC) && !defined(__HAIKU__)
|
||||
if ( QDBusConnection::sessionBus().isConnected() )
|
||||
{
|
||||
if ( QDBusConnection::sessionBus().registerService(SERVICE_NAME) )
|
||||
diff --git a/src/src.pro b/src/src.pro
|
||||
index ae4222a..d1bca3b 100644
|
||||
--- a/src/src.pro
|
||||
+++ b/src/src.pro
|
||||
@@ -102,7 +102,13 @@ win32-*: {
|
||||
LIBS += -lwsock32 -loleaut32
|
||||
}
|
||||
|
||||
-unix:!macx: {
|
||||
+haiku {
|
||||
+ LIBS += -lnetwork
|
||||
+ LIBS += ../lib/libebook/libebook.a
|
||||
+ POST_TARGETDEPS += ../lib/libebook/libebook.a
|
||||
+}
|
||||
+
|
||||
+unix:!macx:!haiku: {
|
||||
|
||||
QT += dbus
|
||||
HEADERS += dbus_interface.h
|
||||
@@ -114,7 +120,7 @@ unix:!macx: {
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||
# Qt 5
|
||||
- greaterThan(QT_MINOR_VERSION, 5) {
|
||||
+ greaterThan(QT_MINOR_VERSION, 5):!haiku: {
|
||||
# Qt 5.6+
|
||||
error("You use Qt5.6+ - QWebEngine is not yet suitable for kchmviewer and is not supported")
|
||||
QT += webengine webenginewidgets
|
||||
--
|
||||
2.16.4
|
||||
|
||||
Reference in New Issue
Block a user