Files
haikuports/dev-qt/qt6-svg/qt6_svg-6.10.3.recipe
2026-04-13 16:40:22 +00:00

109 lines
2.8 KiB
Bash

SUMMARY="Classes for displaying the contents of SVG files"
DESCRIPTION="Qt is a cross-platform application framework that is widely \
used for developing software with a graphical user interface, and also used for \
developing non-GUI programs such as command-line tools and consoles for servers."
HOMEPAGE="https://qt.io/"
COPYRIGHT="2015-2026 The Qt Company Ltd."
LICENSE="GNU LGPL v2.1
GNU LGPL v3
GNU FDL v1"
REVISION="1"
QT_MIRROR_URI="https://download.qt.io/official_releases"
SOURCE_URI="$QT_MIRROR_URI/qt/${portVersion%.*}/$portVersion/submodules/qtsvg-everywhere-src-$portVersion.tar.xz"
CHECKSUM_SHA256="b3223fe005f6a4c7f21f34e4ee6ce0094737cff9503ba15bbb171ac18794f76d"
SOURCE_DIR="qtsvg-everywhere-src-$portVersion"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
qt6_svg$secondaryArchSuffix = $portVersion compat >= 6
lib:libQt6Svg$secondaryArchSuffix = $libVersionCompat
lib:libQt6SvgWidgets$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libQt6Core$secondaryArchSuffix
lib:libQt6Gui$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
SUPPLEMENTS="
qt6_base$secondaryArchSuffix
"
PROVIDES_devel="
qt6_svg${secondaryArchSuffix}_devel = $portVersion compat >= 6
devel:libQt6Svg$secondaryArchSuffix = $libVersionCompat
devel:libQt6SvgWidgets$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
qt6_svg$secondaryArchSuffix == $portVersion base
qt6_base${secondaryArchSuffix}_devel
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libQt6Core$secondaryArchSuffix == $portVersion
devel:libQt6Gui$secondaryArchSuffix == $portVersion
devel:libQt6Widgets$secondaryArchSuffix == $portVersion
devel:libQt6Xml$secondaryArchSuffix == $portVersion
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:awk
cmd:cmake
cmd:find
cmd:g++$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:ninja
cmd:perl
cmd:pkg_config$secondaryArchSuffix
cmd:python3
cmd:sed
cmd:xargs
"
BUILD()
{
export DISABLE_ASLR=1
cmake -B build -S $sourceDir -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS=-fPIC \
-DQT_GENERATE_SBOM=ON \
-Wno-dev
find -name cmake_install.cmake -exec sed -i "s|set(CMAKE_INSTALL_PREFIX.*|set(CMAKE_INSTALL_PREFIX \"$prefix\")|" {} \;
ninja -v -C build $jobArgs
}
INSTALL()
{
ninja -C build install
prepareInstalledDevelLibs \
libQt6Svg \
libQt6SvgWidgets
# fix pkgconfig files
fixPkgconfig
sed -i "s|includedir=.*|includedir=$includeDir/Qt6|" \
$developLibDir/pkgconfig/*.pc
cd $libDir
for i in lib*.so.6.*;do
ln -fs $i $(echo $i | cut -f1,2 -d.)
done
packageEntries devel \
$developDir \
$libDir/cmake \
$dataDir/Qt6/mkspecs
}