mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
YACReader: new recipe (#1477)
This commit is contained in:
36
media-gfx/yacreader/additional-files/yacreader.rdef.in
Normal file
36
media-gfx/yacreader/additional-files/yacreader.rdef.in
Normal file
@@ -0,0 +1,36 @@
|
||||
|
||||
resource app_flags B_MULTIPLE_LAUNCH;
|
||||
|
||||
resource app_version {
|
||||
major = @MAJOR@,
|
||||
middle = @MIDDLE@,
|
||||
minor = @MINOR@,
|
||||
variety = B_APPV_FINAL,
|
||||
internal = 0,
|
||||
short_info = "Yet Another Comic Reader",
|
||||
long_info = "A comic reader"
|
||||
};
|
||||
|
||||
resource app_signature "application/x-vnd.yacreader";
|
||||
|
||||
resource file_types message {
|
||||
"types" = "application",
|
||||
"types" = "application/cbr",
|
||||
"types" = "application/cbt",
|
||||
"types" = "application/cbz",
|
||||
"types" = "application/zip",
|
||||
"types" = "application/rar",
|
||||
"types" = "application/7z-compressed",
|
||||
"types" = "application/tar",
|
||||
"types" = "application/pdf"
|
||||
};
|
||||
|
||||
resource vector_icon {
|
||||
$"6E6369660203FABE4A0500020606FE0FB754CA7BB9D5C4C9B9D5C4C9B840C38C"
|
||||
$"B579BDF3B56EC198B573B874C2C8B511BCF0B501CA8DB50ED06BBDEBD06EB91D"
|
||||
$"D068C46DBE08C66AC751C8A8BE08C66A0606FE0FB754CA7BB9D5C4C9B9D5C4C9"
|
||||
$"B840C38CB579BDF3B56EC198B573B874C2C8B511BCF0B501CA8DB50ED06BBDEB"
|
||||
$"D06EB91DD068C46DBE08C66AC751C8A8BE08C66A020A000100023F4FCD000000"
|
||||
$"0000003F4FCDC03A0044DB190A010101123F4FCD0000000000003F4FCDC03A00"
|
||||
$"44DB190117820204"
|
||||
};
|
||||
155
media-gfx/yacreader/patches/yacreader-8.5.0.patchset
Normal file
155
media-gfx/yacreader/patches/yacreader-8.5.0.patchset
Normal file
@@ -0,0 +1,155 @@
|
||||
From 57c610116ae488f012ffa8d535ecdb272bf58fd1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
||||
Date: Mon, 24 Jul 2017 18:34:40 +0200
|
||||
Subject: [PATCH] Haiku patchset
|
||||
|
||||
---
|
||||
YACReader/YACReader.pro | 11 +++++++++++
|
||||
YACReaderLibrary/YACReaderLibrary.pro | 13 +++++++++++++
|
||||
YACReaderLibrary/YACReaderLibraryServer.pro | 7 +++++++
|
||||
YACReaderLibrary/server_config_dialog.cpp | 4 ++++
|
||||
compileHAIKU.sh | 22 ++++++++++++++++++++++
|
||||
compressed_archive/unarr/unarr-wrapper.pri | 14 +++++++++++++-
|
||||
6 files changed, 70 insertions(+), 1 deletion(-)
|
||||
create mode 100755 compileHAIKU.sh
|
||||
|
||||
diff --git a/YACReader/YACReader.pro b/YACReader/YACReader.pro
|
||||
index 57a500d..955e62a 100644
|
||||
--- a/YACReader/YACReader.pro
|
||||
+++ b/YACReader/YACReader.pro
|
||||
@@ -68,6 +68,17 @@ LIBS += -L/usr/lib -lpoppler-qt5
|
||||
|
||||
}
|
||||
|
||||
+unix:haiku{
|
||||
+
|
||||
+CONFIG+=link_pkgconfig
|
||||
+PKGCONFIG+=poppler poppler-qt5 Qt5Xml
|
||||
+
|
||||
+!CONFIG(no_opengl) {
|
||||
+ LIBS += -lGLU
|
||||
+}
|
||||
+
|
||||
+}
|
||||
+
|
||||
macx{
|
||||
#INCLUDEPATH += "/Volumes/Mac OS X Lion/usr/X11/include"
|
||||
#isEqual(QT_MAJOR_VERSION, 5) {
|
||||
diff --git a/YACReaderLibrary/YACReaderLibrary.pro b/YACReaderLibrary/YACReaderLibrary.pro
|
||||
index 15d78d9..0a3d00c 100644
|
||||
--- a/YACReaderLibrary/YACReaderLibrary.pro
|
||||
+++ b/YACReaderLibrary/YACReaderLibrary.pro
|
||||
@@ -55,6 +55,19 @@ LIBS += -L/usr/lib -lpoppler-qt5
|
||||
}
|
||||
}
|
||||
|
||||
+unix:haiku{
|
||||
+
|
||||
+DEFINES += _BSD_SOURCE
|
||||
+LIBS += -lnetwork -lbsd
|
||||
+CONFIG+=link_pkgconfig
|
||||
+PKGCONFIG+= poppler-qt5
|
||||
+
|
||||
+!CONFIG(no_opengl) {
|
||||
+ LIBS += -lGLU
|
||||
+}
|
||||
+
|
||||
+}
|
||||
+
|
||||
macx{
|
||||
#INCLUDEPATH += "/Volumes/Mac OS X Lion/usr/X11/include"
|
||||
#isEqual(QT_MAJOR_VERSION, 5) {
|
||||
diff --git a/YACReaderLibrary/YACReaderLibraryServer.pro b/YACReaderLibrary/YACReaderLibraryServer.pro
|
||||
index d377d56..5751332 100644
|
||||
--- a/YACReaderLibrary/YACReaderLibraryServer.pro
|
||||
+++ b/YACReaderLibrary/YACReaderLibraryServer.pro
|
||||
@@ -32,6 +32,13 @@ INCLUDEPATH += /usr/include/poppler/qt5
|
||||
LIBS += -L/usr/lib -lpoppler-qt5
|
||||
}
|
||||
|
||||
+unix:haiku{
|
||||
+DEFINES += _BSD_SOURCE
|
||||
+LIBS += -lbsd
|
||||
+CONFIG+=link_pkgconfig
|
||||
+PKGCONFIG+= poppler-qt5
|
||||
+}
|
||||
+
|
||||
macx{
|
||||
LIBS += -framework Foundation -framework ApplicationServices -framework AppKit
|
||||
|
||||
diff --git a/YACReaderLibrary/server_config_dialog.cpp b/YACReaderLibrary/server_config_dialog.cpp
|
||||
index 5ce706d..44c99d9 100644
|
||||
--- a/YACReaderLibrary/server_config_dialog.cpp
|
||||
+++ b/YACReaderLibrary/server_config_dialog.cpp
|
||||
@@ -41,6 +41,10 @@ bool ipComparator(const QString & ip1, const QString & ip2)
|
||||
#include <string.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+#include <ifaddrs.h>
|
||||
+#endif
|
||||
+
|
||||
QList<QString> addresses()
|
||||
{
|
||||
struct ifaddrs * ifAddrStruct=NULL;
|
||||
diff --git a/compileHAIKU.sh b/compileHAIKU.sh
|
||||
new file mode 100755
|
||||
index 0000000..468ed5b
|
||||
--- /dev/null
|
||||
+++ b/compileHAIKU.sh
|
||||
@@ -0,0 +1,22 @@
|
||||
+#! /bin/bash
|
||||
+
|
||||
+echo "Compiling YACReader"
|
||||
+cd ./YACReader
|
||||
+qmake YACReader.pro "CONFIG+=release"
|
||||
+make -j 4
|
||||
+cd ..
|
||||
+
|
||||
+echo "Compiling YACReaderLibrary"
|
||||
+cd ./YACReaderLibrary
|
||||
+qmake YACReaderLibrary.pro "CONFIG+=release"
|
||||
+make -j 4
|
||||
+cd ..
|
||||
+
|
||||
+echo "Compiling YACReaderLibraryServer"
|
||||
+cd ./YACReaderLibrary
|
||||
+make clean
|
||||
+qmake YACReaderLibraryServer.pro "CONFIG+=release"
|
||||
+make -j 4
|
||||
+cd ..
|
||||
+
|
||||
+echo "Done!"
|
||||
diff --git a/compressed_archive/unarr/unarr-wrapper.pri b/compressed_archive/unarr/unarr-wrapper.pri
|
||||
index 2ba188c..31e3ef0 100644
|
||||
--- a/compressed_archive/unarr/unarr-wrapper.pri
|
||||
+++ b/compressed_archive/unarr/unarr-wrapper.pri
|
||||
@@ -21,6 +21,18 @@ else:win32:exists (../../dependencies/unarr/unarr.dll) {
|
||||
DEFINES+=use_unarr
|
||||
}
|
||||
|
||||
+else:haiku:exists (/system/develop/headers/x86/unarr.h) {
|
||||
+ message(Using system provided unarr installation)
|
||||
+ LIBS+=-lunarr
|
||||
+ DEFINES+=use_unarr
|
||||
+ }
|
||||
+
|
||||
+else:haiku:exists (/system/develop/headers/unarr.h) {
|
||||
+ message(Using system provided unarr installation)
|
||||
+ LIBS+=-lunarr
|
||||
+ DEFINES+=use_unarr
|
||||
+ }
|
||||
+
|
||||
else:exists ($$PWD/unarr-master) {
|
||||
message(Found unarr source-code)
|
||||
message(Unarr will be build as a part of YACReader)
|
||||
@@ -33,4 +45,4 @@ else:exists ($$PWD/unarr-master) {
|
||||
else {
|
||||
error(Missing dependency: unarr decrompression backend. Please install libunarr on your system\
|
||||
or provide a copy of the unarr source code in compressed_archive/unarr/unarr-master)
|
||||
- }
|
||||
\ No newline at end of file
|
||||
+ }
|
||||
--
|
||||
2.13.1
|
||||
|
||||
88
media-gfx/yacreader/yacreader-8.5.0.recipe
Normal file
88
media-gfx/yacreader/yacreader-8.5.0.recipe
Normal file
@@ -0,0 +1,88 @@
|
||||
SUMMARY="A comic reader"
|
||||
DESCRIPTION="YACReader is a Qt based comic reader for cross-platform reading \
|
||||
and managing your digital comic collection."
|
||||
HOMEPAGE="http://www.yacreader.com/"
|
||||
COPYRIGHT="Luis Ángel San Martín Rodríguez"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://bitbucket.org/luisangelsm/yacreader/downloads/yacreader-$portVersion-src.tar.xz"
|
||||
CHECKSUM_SHA256="dfb6aa3c8f5971f85971123efb3322df77fbd40014025a8568e8337e1505d01d"
|
||||
PATCHES="yacreader-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="yacreader.rdef.in"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="?x86"
|
||||
|
||||
PROVIDES="
|
||||
yacreader$secondaryArchSuffix = $portVersion
|
||||
app:yacreader$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libgl$secondaryArchSuffix
|
||||
lib:libglu$secondaryArchSuffix
|
||||
lib:libpoppler$secondaryArchSuffix
|
||||
lib:libpoppler${secondaryArchSuffix}_qt5
|
||||
lib:libQt5Core$secondaryArchSuffix
|
||||
lib:libQt5Gui$secondaryArchSuffix
|
||||
lib:libQt5Multimedia$secondaryArchSuffix
|
||||
lib:libQt5Network$secondaryArchSuffix
|
||||
lib:libQt5OpenGL$secondaryArchSuffix
|
||||
lib:libQt5Widgets$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:qmake$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:g++$secondaryArchSuffix
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libgl$secondaryArchSuffix
|
||||
devel:libglu$secondaryArchSuffix
|
||||
devel:libpoppler$secondaryArchSuffix
|
||||
devel:libpoppler${secondaryArchSuffix}_qt5
|
||||
devel:libQt5Core$secondaryArchSuffix
|
||||
devel:libQt5Gui$secondaryArchSuffix
|
||||
devel:libQt5Multimedia$secondaryArchSuffix
|
||||
devel:libQt5Network$secondaryArchSuffix
|
||||
devel:libQt5OpenGL$secondaryArchSuffix
|
||||
devel:libQt5Xml$secondaryArchSuffix
|
||||
devel:libQt5Widgets$secondaryArchSuffix
|
||||
devel:libunarr$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
# The YACLibrary and Server requires Drag and Drop support in Qt.
|
||||
# Without it they are useless. Really.
|
||||
# Let's build only the standalone viewer for now.
|
||||
cd YACReader
|
||||
qmake YACReader.pro "CONFIG+=release"
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd YACReader
|
||||
mkdir -p $appsDir/YACReader
|
||||
cp -R YACReader $appsDir/YACReader/
|
||||
strip $appsDir/YACReader/YACReader
|
||||
|
||||
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
||||
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
||||
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
||||
sed \
|
||||
-e "s|@MAJOR@|$MAJOR|" \
|
||||
-e "s|@MIDDLE@|$MIDDLE|" \
|
||||
-e "s|@MINOR@|$MINOR|" \
|
||||
$portDir/additional-files/yacreader.rdef.in \
|
||||
> yacreader.rdef
|
||||
|
||||
addResourcesToBinaries yacreader.rdef \
|
||||
$appsDir/YACReader/YACReader
|
||||
|
||||
addAppDeskbarSymlink $appsDir/YACReader/YACReader
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user