Files
haikuports/dev-qt/qt6-webchannel/qt6_webchannel-6.5.0.recipe
2023-05-14 16:15:40 +10:00

109 lines
2.9 KiB
Bash

SUMMARY="Provides access to QObject or QML objects from HTML/JavaScript clients"
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-2023 The Qt Company Ltd."
LICENSE="GNU LGPL v2.1
GNU LGPL v3
GNU FDL v1"
REVISION="1"
SOURCE_URI="https://download.qt.io/official_releases/qt/${portVersion%.*}/$portVersion/submodules/qtwebchannel-everywhere-src-$portVersion.tar.xz"
CHECKSUM_SHA256="d9553d646df3681b8e09c7609bf7eda0cde69b562f180fa50451a987ed00f1bf"
SOURCE_DIR="qtwebchannel-everywhere-src-$portVersion"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
qt6_webchannel$secondaryArchSuffix = $portVersion compat >= 6
lib:libQt6WebChannel$secondaryArchSuffix = $portVersion compat >= 6
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libQt6Core$secondaryArchSuffix
lib:libQt6Gui$secondaryArchSuffix
lib:libQt6QmlModels$secondaryArchSuffix
lib:libQt6Quick$secondaryArchSuffix
lib:libQt6Qml$secondaryArchSuffix
lib:libQt6WebSockets$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
qt6_webchannel${secondaryArchSuffix}_devel = $portVersion compat >= 6
devel:libQt6WebChannel$secondaryArchSuffix = $portVersion compat >= 6
"
REQUIRES_devel="
qt6_webchannel$secondaryArchSuffix == $portVersion base
qt6_base${secondaryArchSuffix}_devel
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcrypto$secondaryArchSuffix
devel:libGL$secondaryArchSuffix
devel:libQt6Core$secondaryArchSuffix
devel:libQt6Gui$secondaryArchSuffix
devel:libQt6QmlModels$secondaryArchSuffix
devel:libQt6Quick$secondaryArchSuffix
devel:libQt6Qml$secondaryArchSuffix
devel:libQt6WebSockets$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:awk
cmd:cmake
cmd:find
cmd:g++$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
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
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 \
libQt6WebChannel
# 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
}