mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-12 23:00:10 +02:00
x86_64 is used as a baseline: the "x86_64" entry, whatever status it has, is transformed into "all", and then the other entries in ARCHITECTURES either dropped or rearranged appropriately.
114 lines
3.4 KiB
Bash
114 lines
3.4 KiB
Bash
SUMMARY="Free e-book readers"
|
|
DESCRIPTION="Cool Reader is fast and small cross-platform XML/CSS based eBook reader for \
|
|
desktops and handheld devices. Supported formats: FB2, TXT, RTF, DOC, TCR, HTML, EPUB, \
|
|
CHM, PDB, MOBI. Platforms: Windows, Linux, Android, Haiku, macOS. Ported on some eInk based \
|
|
devices also. This is a fork of the Cool Reader with addition of patches useful for \
|
|
desktop version of program. More information: https://exlmoto.ru/cool-reader-system-fonts"
|
|
HOMEPAGE="https://github.com/buggins/coolreader"
|
|
COPYRIGHT="1998-2018 Vadim Lopatin, 2013-2018 EXL"
|
|
LICENSE="GNU GPL v2"
|
|
REVISION="2"
|
|
tagGitRev="cr3.2.2-5m"
|
|
SOURCE_URI="https://github.com/EXLMOTODEV/coolreader/archive/$tagGitRev.tar.gz"
|
|
CHECKSUM_SHA256="366aefab9e0e798cd9604cae55f51f4cf83f4e860f8313468595efd97bd66075"
|
|
SOURCE_DIR="coolreader-$tagGitRev"
|
|
ADDITIONAL_FILES="
|
|
coolreader.rdef.in
|
|
haikuicons.zip
|
|
"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
PROVIDES="
|
|
coolreader3$secondaryArchSuffix = $portVersion
|
|
app:coolreader3$secondaryArchSuffix = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libfontconfig$secondaryArchSuffix
|
|
lib:libfreetype$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
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libfontconfig$secondaryArchSuffix
|
|
devel:libfreetype$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
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:g++$secondaryArchSuffix
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:git
|
|
cmd:ld$secondaryArchSuffix
|
|
cmd:lrelease$secondaryArchSuffix >= 5
|
|
cmd:make
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
cmd:unzip
|
|
cmd:which
|
|
"
|
|
|
|
PATCH()
|
|
{
|
|
unzip -o $sourceDir/../../additional-files/haikuicons.zip -d $sourceDir/cr3qt/src/icons
|
|
}
|
|
|
|
BUILD()
|
|
{
|
|
mkdir -p build
|
|
cd build
|
|
cmake .. -DGUI=QT5 \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_INSTALL_PREFIX:PATH=$appsDir/CoolReader3
|
|
|
|
make $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
cd build
|
|
make install
|
|
mv -f $appsDir/CoolReader3/cr3 "$appsDir/CoolReader3/Cool Reader"
|
|
|
|
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
|
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
|
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
|
local INTERNAL="`echo "$portVersion" | cut -d. -f4 | cut -dm -f1`"
|
|
|
|
sed \
|
|
-e "s|@MAJOR@|$MAJOR|" \
|
|
-e "s|@MIDDLE@|$MIDDLE|" \
|
|
-e "s|@MINOR@|$MINOR|" \
|
|
-e "s|@INTERNAL@|$INTERNAL|" \
|
|
$portDir/additional-files/coolreader.rdef.in > coolreader.rdef
|
|
|
|
addResourcesToBinaries coolreader.rdef "$appsDir/CoolReader3/Cool Reader"
|
|
mimeset -f "$appsDir/CoolReader3/Cool Reader"
|
|
addAppDeskbarSymlink "$appsDir/CoolReader3/Cool Reader"
|
|
}
|