Files
haikuports/net-libs/libaccounts_qt/libaccounts_qt5-1.17.recipe

113 lines
2.9 KiB
Bash

SUMMARY="Accounts management library for Qt applications"
DESCRIPTION="This project is a library for managing accounts which can be used from Qt \
applications. It is part of the @accounts-sso project."
HOMEPAGE="https://gitlab.com/accounts-sso/libaccounts-qt"
COPYRIGHT="2022 Accounts SSO"
LICENSE="GNU LGPL v2.1"
REVISION="1"
SOURCE_URI="$HOMEPAGE/-/archive/VERSION_$portVersion/libaccounts-qt-VERSION_$portVersion.tar.bz2"
CHECKSUM_SHA256="6982d8b695ce4caa21cdc2b43d5808d7ec042ed0dee0bac2411ab4a376dec37c"
SOURCE_DIR="libaccounts-qt-VERSION_$portVersion"
PATCHES="libaccounts_qt-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="1.5.0"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
libaccounts_qt5$secondaryArchSuffix = $portVersion
lib:libaccounts_qt5$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libaccounts_glib$secondaryArchSuffix
lib:libgio_2.0$secondaryArchSuffix
lib:libglib_2.0$secondaryArchSuffix
lib:libgobject_2.0$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
lib:libQt5Xml$secondaryArchSuffix
"
PROVIDES_devel="
libaccounts_qt5${secondaryArchSuffix}_devel = $portVersion
devel:libaccounts_qt5$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
libaccounts_qt5$secondaryArchSuffix == $portVersion base
"
PROVIDES_tools="
libaccounts_qt5${secondaryArchSuffix}_tools = $portVersion
cmd:accountstest = $portVersion
"
REQUIRES_tools="
libaccounts_qt5$secondaryArchSuffix == $portVersion base
$REQUIRES
"
CONFLICTS_tools="
libaccounts_qt6${secondaryArchSuffix}_tools
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libaccounts_glib$secondaryArchSuffix
devel:libgio_2.0$secondaryArchSuffix
devel:libglib_2.0$secondaryArchSuffix
devel:libgobject_2.0$secondaryArchSuffix
devel:libintl$secondaryArchSuffix
devel:libpcre$secondaryArchSuffix
devel:libQt5Core$secondaryArchSuffix
devel:libQt5Gui$secondaryArchSuffix
devel:libsqlite3$secondaryArchSuffix
devel:libxml2$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:doxygen
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python3
cmd:qmake$secondaryArchSuffix >= 5
"
BUILD()
{
qmake . PREFIX=$prefix LIBDIR=$libDir \
INCLUDEDIR=$includeDir \
CMAKE_CONFIG_PATH=$libDir/cmake
make $jobArgs
}
INSTALL()
{
make install
prepareInstalledDevelLib \
libaccounts-qt5
fixPkgconfig
# The includes are in a subdirectory of includeDir, and fixPkgconfig breaks
# that.
sed -i -e "s,^includedir=.*,includedir=$prefix/$relativeIncludeDir/accounts-qt5," \
$developLibDir/pkgconfig/accounts-qt5.pc
ln -fs $developLibDir/libaccounts-qt5.so.$libVersion $libDir/libaccounts-qt5.so
packageEntries devel \
$developDir \
$libDir/cmake
packageEntries tools \
$prefix/bin
}
TEST()
{
make check
}