qt6_declarative: add recipe

This commit is contained in:
Gerasim Troeglazov
2021-11-04 23:59:55 +10:00
parent d2c44fd6ea
commit 7c54d2f019
2 changed files with 232 additions and 0 deletions

View File

@@ -0,0 +1,66 @@
From 6ba4df1b638c2f673213628c3da6389bd20a26e8 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Fri, 1 Oct 2021 14:52:01 +1000
Subject: Fix for Haiku
diff --git a/qtdeclarative/src/3rdparty/masm/wtf/PageBlock.cpp b/qtdeclarative/src/3rdparty/masm/wtf/PageBlock.cpp
index bc0e8d6..8b62344 100644
--- a/qtdeclarative/src/3rdparty/masm/wtf/PageBlock.cpp
+++ b/qtdeclarative/src/3rdparty/masm/wtf/PageBlock.cpp
@@ -40,7 +40,14 @@ namespace WTF {
static size_t s_pageSize;
static size_t s_pageMask;
-#if OS(UNIX)
+#if OS(HAIKU)
+
+inline size_t systemPageSize()
+{
+ return 4096;
+}
+
+#elif OS(UNIX)
inline size_t systemPageSize()
{
diff --git a/qtdeclarative/src/3rdparty/masm/wtf/Platform.h b/qtdeclarative/src/3rdparty/masm/wtf/Platform.h
index 29decfa..1dbd001 100644
--- a/qtdeclarative/src/3rdparty/masm/wtf/Platform.h
+++ b/qtdeclarative/src/3rdparty/masm/wtf/Platform.h
@@ -418,6 +418,11 @@
#define WTF_OS_QNX 1
#endif
+/* OS(HAIKU) - Haiku */
+#if defined(__HAIKU__)
+#define WTF_OS_HAIKU 1
+#endif
+
/* OS(SOLARIS) - Solaris */
#if defined(sun) || defined(__sun)
#define WTF_OS_SOLARIS 1
@@ -452,6 +457,7 @@
|| OS(HURD) \
|| OS(INTEGRITY) \
|| OS(LINUX) \
+ || OS(HAIKU) \
|| OS(NETBSD) \
|| OS(OPENBSD) \
|| OS(QNX) \
diff --git a/qtdeclarative/src/qml/jit/qv4assemblercommon_p.h b/qtdeclarative/src/qml/jit/qv4assemblercommon_p.h
index c91a61a..61c9ffd 100644
--- a/qtdeclarative/src/qml/jit/qv4assemblercommon_p.h
+++ b/qtdeclarative/src/qml/jit/qv4assemblercommon_p.h
@@ -66,7 +66,7 @@ namespace QV4 {
namespace JIT {
#if defined(Q_PROCESSOR_X86_64) || defined(ENABLE_ALL_ASSEMBLERS_FOR_REFACTORING_PURPOSES)
-#if defined(Q_OS_LINUX) || defined(Q_OS_QNX) || defined(Q_OS_FREEBSD) || defined(Q_OS_DARWIN)
+#if defined(Q_OS_LINUX) || defined(Q_OS_QNX) || defined(Q_OS_FREEBSD) || defined(Q_OS_DARWIN) || defined(Q_OS_HAIKU)
class PlatformAssembler_X86_64_SysV : public JSC::MacroAssembler<JSC::MacroAssemblerX86_64>
{
--
2.30.2

View File

@@ -0,0 +1,166 @@
SUMMARY="Classes for QML and JavaScript languages"
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-2021 The Qt Company Ltd."
LICENSE="GNU LGPL v2.1
GNU LGPL v3"
REVISION="1"
SOURCE_URI="https://download.qt.io/official_releases/qt/${portVersion%.*}/$portVersion/submodules/qtdeclarative-everywhere-src-$portVersion.tar.xz"
CHECKSUM_SHA256="46737feceb9e54d63ad0c87a08d33f08ca58f4b8920ccefad8f1ebd64f0d1270"
SOURCE_DIR="qtdeclarative-everywhere-src-$portVersion"
PATCHES="qt6_declarative-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
qt6_declarative$secondaryArchSuffix = $portVersion compat >= 6
lib:libQt6LabsAnimation$secondaryArchSuffix = $portVersion compat >= 6
lib:libQt6LabsFolderListModel$secondaryArchSuffix = $portVersion compat >= 6
lib:libQt6LabsQmlModels$secondaryArchSuffix = $portVersion compat >= 6
lib:libQt6LabsSettings$secondaryArchSuffix = $portVersion compat >= 6
lib:libQt6LabsSharedImage$secondaryArchSuffix = $portVersion compat >= 6
lib:libQt6LabsWavefrontMesh$secondaryArchSuffix = $portVersion compat >= 6
lib:libQt6Qml$secondaryArchSuffix = $portVersion compat >= 6
lib:libQt6QmlCore$secondaryArchSuffix = $portVersion compat >= 6
lib:libQt6QmlLocalStorage$secondaryArchSuffix = $portVersion compat >= 6
lib:libQt6QmlModels$secondaryArchSuffix = $portVersion compat >= 6
lib:libQt6QmlWorkerScript$secondaryArchSuffix = $portVersion compat >= 6
lib:libQt6QmlXmlListModel$secondaryArchSuffix = $portVersion compat >= 6
lib:libQt6Quick$secondaryArchSuffix = $portVersion compat >= 6
lib:libQt6QuickControls2$secondaryArchSuffix = $portVersion compat >= 6
lib:libQt6QuickControls2Impl$secondaryArchSuffix = $portVersion compat >= 6
lib:libQt6QuickDialogs2$secondaryArchSuffix = $portVersion compat >= 6
lib:libQt6QuickDialogs2QuickImpl$secondaryArchSuffix = $portVersion compat >= 6
lib:libQt6QuickDialogs2Utils$secondaryArchSuffix = $portVersion compat >= 6
lib:libQt6QuickLayouts$secondaryArchSuffix = $portVersion compat >= 6
lib:libQt6QuickParticles$secondaryArchSuffix = $portVersion compat >= 6
lib:libQt6QuickShapes$secondaryArchSuffix = $portVersion compat >= 6
lib:libQt6QuickTemplates2$secondaryArchSuffix = $portVersion compat >= 6
lib:libQt6QuickTest$secondaryArchSuffix = $portVersion compat >= 6
lib:libQt6QuickWidgets$secondaryArchSuffix = $portVersion compat >= 6
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libQt6Core$secondaryArchSuffix
lib:libQt6Gui$secondaryArchSuffix
lib:libQt6Network$secondaryArchSuffix
lib:libQt6OpenGL$secondaryArchSuffix
lib:libQt6Widgets$secondaryArchSuffix
lib:libQt6Test$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
"
PROVIDES_devel="
qt6_declarative${secondaryArchSuffix}_devel = $portVersion compat >= 6
devel:libQt6LabsAnimation$secondaryArchSuffix = $portVersion compat >= 6
devel:libQt6LabsFolderListModel$secondaryArchSuffix = $portVersion compat >= 6
devel:libQt6LabsQmlModels$secondaryArchSuffix = $portVersion compat >= 6
devel:libQt6LabsSettings$secondaryArchSuffix = $portVersion compat >= 6
devel:libQt6LabsSharedImage$secondaryArchSuffix = $portVersion compat >= 6
devel:libQt6LabsWavefrontMesh$secondaryArchSuffix = $portVersion compat >= 6
devel:libQt6PacketProtocol$secondaryArchSuffix = $portVersion compat >= 6
devel:libQt6Qml$secondaryArchSuffix = $portVersion compat >= 6
devel:libQt6QmlCompiler$secondaryArchSuffix = $portVersion compat >= 6
devel:libQt6QmlCore$secondaryArchSuffix = $portVersion compat >= 6
devel:libQt6QmlDebug$secondaryArchSuffix = $portVersion compat >= 6
devel:libQt6QmlDevTools$secondaryArchSuffix = $portVersion compat >= 6
devel:libQt6QmlDom$secondaryArchSuffix = $portVersion compat >= 6
devel:libQt6QmlLocalStorage$secondaryArchSuffix = $portVersion compat >= 6
devel:libQt6QmlModels$secondaryArchSuffix = $portVersion compat >= 6
devel:libQt6QmlWorkerScript$secondaryArchSuffix = $portVersion compat >= 6
devel:libQt6QmlXmlListModel$secondaryArchSuffix = $portVersion compat >= 6
devel:libQt6Quick$secondaryArchSuffix = $portVersion compat >= 6
devel:libQt6QuickControls2$secondaryArchSuffix = $portVersion compat >= 6
devel:libQt6QuickControls2Impl$secondaryArchSuffix = $portVersion compat >= 6
devel:libQt6QuickDialogs2$secondaryArchSuffix = $portVersion compat >= 6
devel:libQt6QuickDialogs2QuickImpl$secondaryArchSuffix = $portVersion compat >= 6
devel:libQt6QuickDialogs2Utils$secondaryArchSuffix = $portVersion compat >= 6
devel:libQt6QuickLayouts$secondaryArchSuffix = $portVersion compat >= 6
devel:libQt6QuickParticles$secondaryArchSuffix = $portVersion compat >= 6
devel:libQt6QuickShapes$secondaryArchSuffix = $portVersion compat >= 6
devel:libQt6QuickTemplates2$secondaryArchSuffix = $portVersion compat >= 6
devel:libQt6QuickTest$secondaryArchSuffix = $portVersion compat >= 6
devel:libQt6QuickWidgets$secondaryArchSuffix = $portVersion compat >= 6
"
REQUIRES_devel="
qt6_declarative$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:libQt6Network$secondaryArchSuffix
devel:libQt6OpenGL$secondaryArchSuffix
devel:libQt6ShaderTools$secondaryArchSuffix
devel:libQt6Widgets$secondaryArchSuffix
devel:libssl$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.7
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 -C build $jobArgs
}
INSTALL()
{
ninja -C build install
prepareInstalledDevelLibs libQt6LabsAnimation libQt6LabsFolderListModel \
libQt6LabsQmlModels libQt6LabsSettings libQt6LabsSharedImage \
libQt6LabsWavefrontMesh libQt6Qml libQt6QmlCore libQt6QmlLocalStorage \
libQt6QmlModels libQt6QmlWorkerScript libQt6QmlXmlListModel libQt6Quick \
libQt6QuickControls2 libQt6QuickControls2Impl libQt6QuickDialogs2 \
libQt6QuickDialogs2QuickImpl libQt6QuickDialogs2Utils libQt6QuickLayouts \
libQt6QuickParticles libQt6QuickShapes libQt6QuickTemplates2 \
libQt6QuickTest libQt6QuickWidgets libQt6PacketProtocol \
libQt6QmlCompiler libQt6QmlDebug libQt6QmlDevTools libQt6QmlDom
# fix static lib paths
sed -i 's,${_IMPORT_PREFIX}/lib',$developLibDir, $libDir/cmake/Qt6QmlDevToolsPrivate/Qt6QmlDevToolsPrivateTargets-release.cmake
sed -i 's,${_IMPORT_PREFIX}/lib',$developLibDir, $libDir/cmake/Qt6QmlDomPrivate/Qt6QmlDomPrivateTargets-release.cmake
sed -i 's,${_IMPORT_PREFIX}/lib',$developLibDir, $libDir/cmake/Qt6QmlDebugPrivate/Qt6QmlDebugPrivateTargets-release.cmake
sed -i 's,${_IMPORT_PREFIX}/lib',$developLibDir, $libDir/cmake/Qt6QmlCompilerPrivate/Qt6QmlCompilerPrivateTargets-release.cmake
sed -i 's,${_IMPORT_PREFIX}/lib',$developLibDir, $libDir/cmake/Qt6PacketProtocolPrivate/Qt6PacketProtocolPrivateTargets-release.cmake
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
}