Sigil: add recipe

This commit is contained in:
Gerasim Troeglazov
2019-10-09 23:12:05 +10:00
parent 1048c9f830
commit 5e6e5f24b7
3 changed files with 189 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
resource app_flags B_MULTIPLE_LAUNCH;
resource app_version {
major = @MAJOR@,
middle = @MIDDLE@,
minor = @MINOR@,
variety = B_APPV_FINAL,
internal = 0,
short_info = "Sigil ebook editor",
long_info = "@LONG_INFO@"
};
resource app_signature "@APP_SIGNATURE@";
resource file_types message {
"types" = "application/epub+zip"
};
resource vector_icon {
$"6E63696603020006033C44B33A4E9AB995F33B868F4A01E4470A3A007B262672"
$"E19898FF8C30300501040173020630AEFAAEBBFBB9BBBBFBEDEEBA4B364F33C5"
$"3EBBA1C63DB971502B4F2A50254C273F24C192243B2438253B24BB8FB5533328"
$"3032302C30BBFC363B41404E49C419C149C67CC5444D54415A495A385A345431"
$"4D3152314634463C46BCCEC15A3DC25F4049BF7DC2D1C021C4164D3E4E3D4CBE"
$"D4C4CEBE47C4413B4B394CBD3DC440BCA5C4D8384E3951BC91C6213A523C523F"
$"513D52BF92C669414D3F464249BE5FC129384330463442B813C3702D522D532D"
$"532DC7D62F57B8E4C853B916C9B05B365ABA49C9AF3D5C455C534EC6C7C975C7"
$"DCC1324C3E4038C1E7BD6C3B363834343034BB04342C37283E264628C0E5B58F"
$"C362B6D04B2D0614AA3A86BB8A485E555D5A5A5B5558535C525D53CA7EC6ADCC"
$"1DC7F65E5F514A584B4B464EC1F4C4ACC259C61047534354C1FE54415442513A"
$"522D5D363F5E030A020101000A0101001001178300040A00010000"
};

View File

@@ -0,0 +1,41 @@
From e6a8540e534bda385f85ef96cf56ccc9521daa45 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Tue, 8 Oct 2019 18:53:00 +1000
Subject: Fix for Haiku
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
old mode 100755
new mode 100644
diff --git a/src/Misc/Utility.cpp b/src/Misc/Utility.cpp
index 81100a7..924ed31 100644
--- a/src/Misc/Utility.cpp
+++ b/src/Misc/Utility.cpp
@@ -119,7 +119,7 @@ QStringList Utility::LinuxHunspellDictionaryDirs()
}
// Bundled dicts were not installed use standard system dictionary location.
else if (!dicts_are_bundled) {
- paths.append("/usr/share/hunspell");
+ paths.append("/system/data/hunspell");
// Add additional hunspell dictionary directories. Provided at compile
// time via the cmake option EXTRA_DICT_DIRS (colon separated list).
if (!extra_dict_dirs.isEmpty()) {
diff --git a/src/main.cpp b/src/main.cpp
index 92ddba3..6bc9d4b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -327,9 +327,10 @@ int main(int argc, char *argv[])
#endif
// Needs to be created on the heap so that
// the reply has time to return.
+#ifndef __HAIKU__
UpdateChecker *checker = new UpdateChecker(&app);
checker->CheckForUpdate();
-
+#endif
// Install an event filter for the application
// so we can catch OS X's file open events
AppEventFilter *filter = new AppEventFilter(&app);
--
2.23.0

View File

@@ -0,0 +1,113 @@
SUMMARY="Multi-platform WYSIWYG ebook editor for ePub format"
DESCRIPTION="Sigil is a free, open source, multi-platform ebook editor that uses \
Qt (and QtWebEngine). It is designed to edit books in ePub format (both ePub 2 and ePub 3)."
HOMEPAGE="http://sigil-ebook.com/"
COPYRIGHT="2009-2019 Sigil team"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="https://github.com/Sigil-Ebook/Sigil/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="6da5482a6158896c7cde50d7787b7d2c681ab3afea032298ccf05f50ec803ac4"
SOURCE_DIR="Sigil-$portVersion"
PATCHES="sigil-$portVersion.patchset"
PYTHON_VERSION="3.7"
ADDITIONAL_FILES="sigil.rdef.in"
ARCHITECTURES="!x86_gcc2 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
sigil$secondaryArchSuffix = $portVersion
app:Sigil$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
chardet_python3
cssselect_python3
html5lib_python3
lxml_python3
six_python3
cmd:python$PYTHON_VERSION
lib:libhunspell_1.7$secondaryArchSuffix
lib:libminizip$secondaryArchSuffix
lib:libpcre16$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
lib:libQt5WebKit$secondaryArchSuffix
lib:libQt5WebKitWidgets$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
chardet_python3
cssselect_python3
html5lib_python3
lxml_python3
six_python3
devel:libgl$secondaryArchSuffix
devel:libhunspell_1.7$secondaryArchSuffix
devel:libminizip$secondaryArchSuffix
devel:libpcre16$secondaryArchSuffix
devel:libQt5Core$secondaryArchSuffix
devel:libQt5WebKit$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:lrelease$secondaryArchSuffix >= 5
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python$PYTHON_VERSION
"
BUILD()
{
mkdir -p build
cd build
pythonBin=/bin/python${PYTHON_VERSION}
pythonLib=/system/$relativeDevelopLibDir/libpython${PYTHON_VERSION}m.so
pythonInclude=/system/develop/headers/python${PYTHON_VERSION}m
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$appsDir/Sigil \
-DCMAKE_INSTALL_BINDIR=$appsDir/Sigil \
-DSHARE_INSTALL_PREFIX=$appsDir/Sigil \
-DCMAKE_INSTALL_LIBDIR=$appsDir/Sigil/lib \
-DPYTHON_LIBRARY=$pythonLib \
-DPYTHON_INCLUDE_DIR=$pythonInclude \
-DPYTHON_EXECUTABLE=$pythonBin \
-DUSE_SYSTEM_LIBS=1 \
-DINSTALL_BUNDLED_DICTS=0
make $jobArgs
}
INSTALL()
{
cd build
make install
mv $appsDir/Sigil/lib/sigil/sigil $appsDir/Sigil/Sigil
mv $appsDir/Sigil/lib/sigil/*.so $appsDir/Sigil/lib
rm -rf $appsDir/Sigil/{lib/sigil,share/applications,share/pixmaps}
rm -rf $appsDir/Sigil/sigil
local APP_SIGNATURE="application/x-vnd.sigil"
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="`echo "$portVersion" | cut -d. -f3`"
local LONG_INFO="$SUMMARY"
sed \
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
-e "s|@LONG_INFO@|$LONG_INFO|" \
$portDir/additional-files/sigil.rdef.in \
> sigil.rdef
addResourcesToBinaries sigil.rdef $appsDir/Sigil/Sigil
addAppDeskbarSymlink $appsDir/Sigil/Sigil
}