mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 14:38:51 +02:00
122 lines
3.2 KiB
Bash
122 lines
3.2 KiB
Bash
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="2"
|
|
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
|
|
haiku_icons.zip
|
|
"
|
|
|
|
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
|
|
"
|
|
|
|
PATCH()
|
|
{
|
|
unzip -o $sourceDir/../../additional-files/haiku_icons.zip -d $sourceDir/src/Resource_Files/main
|
|
}
|
|
|
|
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
|
|
}
|