Files
haikuports/app-office/gnucash/gnucash-5.9.recipe
2024-12-22 23:09:39 +03:00

161 lines
4.9 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
SUMMARY="Personal and small business double entry accounting application"
DESCRIPTION="Allows you to track bank accounts, stocks, income and expenses."
HOMEPAGE="https://www.gnucash.org"
COPYRIGHT="20012024 The GnuCash Project"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://sourceforge.net/projects/gnucash/files/gnucash%20(stable)/5.9/gnucash-5.9.tar.bz2"
CHECKSUM_SHA256="5be2e5364fc36464fc32c768e2ab460a630f74db6aeb7d44266e3dab98222fd0"
PATCHES="gnucash-$portVersion.patchset"
ADDITIONAL_FILES="
gnucash.rdef.in
"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
GLOBAL_WRITABLE_FILES="
settings/gnucash/environment auto-merge
"
commandSuffix=$secondaryArchSuffix
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
PROVIDES="
gnucash$secondaryArchSuffix = $portVersion
app:GnuCash
cmd:finance_quote_wrapper$commandSuffix
cmd:gnc_fq_update$commandSuffix
cmd:gnucash_cli$commandSuffix
cmd:gnucash_valgrind$commandSuffix
lib:libgnc_app_utils$secondaryArchSuffix
lib:libgnc_backend_sql$secondaryArchSuffix
lib:libgnc_backend_xml_utils$secondaryArchSuffix
lib:libgnc_core_utils$secondaryArchSuffix
lib:libgnc_engine$secondaryArchSuffix
lib:libgnc_expressions_guile$secondaryArchSuffix
lib:libgnc_expressions$secondaryArchSuffix
lib:libgnc_generic_import$secondaryArchSuffix
lib:libgnc_gnome$secondaryArchSuffix
lib:libgnc_locale_tax$secondaryArchSuffix
lib:libgnc_module$secondaryArchSuffix
lib:libgnucash_guile$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
cmd:xsltproc$commandSuffix
lib:libaqbanking$secondaryArchSuffix
lib:libatk_1.0$secondaryArchSuffix
lib:libboost_date_time$secondaryArchSuffix
lib:libboost_filesystem$secondaryArchSuffix
lib:libboost_iostreams$secondaryArchSuffix
lib:libboost_locale$secondaryArchSuffix
lib:libbrotlidec$secondaryArchSuffix
lib:libcairo$secondaryArchSuffix
lib:libcairo_gobject$secondaryArchSuffix
lib:libdbi$secondaryArchSuffix
lib:libgc$secondaryArchSuffix
lib:libglib_2.0$secondaryArchSuffix
lib:libgtest$secondaryArchSuffix
lib:libgdk_3$secondaryArchSuffix
lib:libgdk_pixbuf_2.0$secondaryArchSuffix
lib:libgtk_3$secondaryArchSuffix
lib:libguile_3.0$secondaryArchSuffix
lib:libgwenhywfar$secondaryArchSuffix
lib:libharfbuzz$secondaryArchSuffix
lib:libicudata$secondaryArchSuffix
lib:libicui18n$secondaryArchSuffix
lib:libicuuc$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:libnghttp2$secondaryArchSuffix
lib:libofx$secondaryArchSuffix
lib:libpango_1.0$secondaryArchSuffix
lib:libpangocairo_1.0$secondaryArchSuffix
lib:libpsl$secondaryArchSuffix
lib:libsecret_1$secondaryArchSuffix
lib:libsoup_3.0$secondaryArchSuffix
lib:libsqlite3$secondaryArchSuffix
lib:libwebkit2gtk_4.1$secondaryArchSuffix
lib:libxml2$secondaryArchSuffix
lib:libxslt$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libaqbanking$secondaryArchSuffix
devel:libboost_date_time$secondaryArchSuffix
devel:libboost_filesystem$secondaryArchSuffix
devel:libboost_iostreams$secondaryArchSuffix
devel:libboost_locale$secondaryArchSuffix
devel:libbrotlidec$secondaryArchSuffix
devel:libdbi$secondaryArchSuffix
devel:libgc$secondaryArchSuffix
devel:libglib_2.0$secondaryArchSuffix
devel:libgtest$secondaryArchSuffix
devel:libguile_3.0$secondaryArchSuffix
devel:libgwenhywfar$secondaryArchSuffix
devel:libintl$secondaryArchSuffix
devel:libnghttp2$secondaryArchSuffix
devel:libofx$secondaryArchSuffix
devel:libpsl$secondaryArchSuffix
devel:libsecret_1$secondaryArchSuffix
devel:libsoup_3.0$secondaryArchSuffix
devel:libsqlite3$secondaryArchSuffix
devel:libwebkit2gtk_4.1$secondaryArchSuffix
devel:libxml2$secondaryArchSuffix
devel:libxslt$secondaryArchSuffix
lib:libdbdsqlite3$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$scommandSuffix
cmd:gettext$commandSuffix
cmd:git
cmd:ninja
cmd:pkg_config$commandSuffix
cmd:swig
cmd:xsltproc$commandSuffix
"
BUILD()
{
cmake -B build -S . -DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_INSTALL_PREFIX=$prefix \
-DCMAKE_INSTALL_DATAROOTDIR=$dataDir \
-DCMAKE_INSTALL_DOCDIR=$docDir \
-DCMAKE_INSTALL_INCLUDEDIR=$includeDir \
-DCMAKE_INSTALL_MANDIR=$manDir \
-DCMAKE_INSTALL_SYSCONFDIR=$settingsDir \
-GNinja
cd build
GUILE_EXTENSIONS_PATH=$PWD/lib:$PWD/lib/gnucash ninja -k 100
}
INSTALL()
{
cd build
ninja install
mkdir -p $appsDir
mv $prefix/bin/gnucash $appsDir/GnuCash
local APP_SIGNATURE="application/x-vnd.gnucash"
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MINOR="`echo "$portVersion" | cut -d. -f2`"
local LONG_INFO="$SUMMARY"
sed \
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MINOR@|$MINOR|" \
-e "s|@LONG_INFO@|$LONG_INFO|" \
$portDir/additional-files/gnucash.rdef.in > gnucash.rdef
addResourcesToBinaries gnucash.rdef $appsDir/GnuCash
addAppDeskbarSymlink $appsDir/GnuCash
}