[arch-commits] Commit in qt6-quick3d/repos/extra-x86_64 (4 files)
Antonio Rojas
arojas at gemini.archlinux.org
Sun Jan 30 16:47:38 UTC 2022
Date: Sunday, January 30, 2022 @ 16:47:38
Author: arojas
Revision: 435541
archrelease: copy trunk to extra-x86_64
Added:
qt6-quick3d/repos/extra-x86_64/PKGBUILD
(from rev 435540, qt6-quick3d/trunk/PKGBUILD)
qt6-quick3d/repos/extra-x86_64/qt6-quick3d-assimp-5.1.patch
(from rev 435540, qt6-quick3d/trunk/qt6-quick3d-assimp-5.1.patch)
Deleted:
qt6-quick3d/repos/extra-x86_64/PKGBUILD
qt6-quick3d/repos/extra-x86_64/qt6-quick3d-assimp-5.1.patch
------------------------------+
PKGBUILD | 75 +++++------
qt6-quick3d-assimp-5.1.patch | 274 ++++++++++++++++++++---------------------
2 files changed, 175 insertions(+), 174 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2022-01-30 16:47:25 UTC (rev 435540)
+++ PKGBUILD 2022-01-30 16:47:38 UTC (rev 435541)
@@ -1,37 +0,0 @@
-# Maintainer: Antonio Rojas <arojas at archlinux.org>
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-# Contributor: Andrea Scarpino <andrea at archlinux.org>
-
-pkgname=qt6-quick3d
-_qtver=6.2.3
-pkgver=${_qtver/-/}
-pkgrel=1
-arch=(x86_64)
-url='https://www.qt.io'
-license=(GPL3)
-pkgdesc='Qt module and API for defining 3D content in Qt Quick'
-depends=(qt6-quicktimeline)
-makedepends=(cmake ninja qt6-shadertools assimp)
-optdepends=('qt6-shadertools: for shadergen' 'assimp: assimp import plugin')
-groups=(qt6)
-_pkgfn="${pkgname/6-/}-everywhere-src-$_qtver"
-source=(https://download.qt.io/official_releases/qt/${pkgver%.*}/$_qtver/submodules/$_pkgfn.tar.xz
- qt6-quick3d-assimp-5.1.patch)
-sha256sums=('c45294f917232320a2cf67ee25b518f6ff3cdf989b8cecfb2ed73569ab28661e'
- '49eb8feec3fdd1972266cf97fd8d40f0eb7e544c1957569c4b9f182348b17492')
-
-prepare() {
- patch -d $_pkgfn -p1 < qt6-quick3d-assimp-5.1.patch # Fix build with assimp 5.1
-}
-
-build() {
- cmake -B build -S $_pkgfn -G Ninja
- cmake --build build
-}
-
-package() {
- DESTDIR="$pkgdir" cmake --install build
-
- install -d "$pkgdir"/usr/share/licenses
- ln -s /usr/share/licenses/qt6-base "$pkgdir"/usr/share/licenses/$pkgname
-}
Copied: qt6-quick3d/repos/extra-x86_64/PKGBUILD (from rev 435540, qt6-quick3d/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2022-01-30 16:47:38 UTC (rev 435541)
@@ -0,0 +1,38 @@
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Andrea Scarpino <andrea at archlinux.org>
+
+pkgname=qt6-quick3d
+_qtver=6.2.3
+pkgver=${_qtver/-/}
+pkgrel=2
+arch=(x86_64)
+url='https://www.qt.io'
+license=(GPL3)
+pkgdesc='Qt module and API for defining 3D content in Qt Quick'
+depends=(qt6-quicktimeline)
+makedepends=(cmake ninja qt6-shadertools assimp)
+optdepends=('qt6-shadertools: for shadergen' 'assimp: assimp import plugin')
+groups=(qt6)
+options=(debug)
+_pkgfn="${pkgname/6-/}-everywhere-src-$_qtver"
+source=(https://download.qt.io/official_releases/qt/${pkgver%.*}/$_qtver/submodules/$_pkgfn.tar.xz
+ qt6-quick3d-assimp-5.1.patch)
+sha256sums=('c45294f917232320a2cf67ee25b518f6ff3cdf989b8cecfb2ed73569ab28661e'
+ '49eb8feec3fdd1972266cf97fd8d40f0eb7e544c1957569c4b9f182348b17492')
+
+prepare() {
+ patch -d $_pkgfn -p1 < qt6-quick3d-assimp-5.1.patch # Fix build with assimp 5.1
+}
+
+build() {
+ cmake -B build -S $_pkgfn -G Ninja
+ cmake --build build
+}
+
+package() {
+ DESTDIR="$pkgdir" cmake --install build
+
+ install -d "$pkgdir"/usr/share/licenses
+ ln -s /usr/share/licenses/qt6-base "$pkgdir"/usr/share/licenses/$pkgname
+}
Deleted: qt6-quick3d-assimp-5.1.patch
===================================================================
--- qt6-quick3d-assimp-5.1.patch 2022-01-30 16:47:25 UTC (rev 435540)
+++ qt6-quick3d-assimp-5.1.patch 2022-01-30 16:47:38 UTC (rev 435541)
@@ -1,137 +0,0 @@
-diff --git a/src/plugins/assetimporters/assimp/assimpimporter.cpp b/src/plugins/assetimporters/assimp/assimpimporter.cpp
-index cb8f92a3..4ce57d64 100644
---- a/src/plugins/assetimporters/assimp/assimpimporter.cpp
-+++ b/src/plugins/assetimporters/assimp/assimpimporter.cpp
-@@ -1268,7 +1268,7 @@ void AssimpImporter::generateMaterial(aiMaterial *material, QTextStream &output,
- // GLTF Mode
- {
- aiColor4D baseColorFactor;
-- result = material->Get(AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_FACTOR, baseColorFactor);
-+ result = material->Get(AI_MATKEY_BASE_COLOR, baseColorFactor);
- if (result == aiReturn_SUCCESS)
- QSSGQmlUtilities::writeQmlPropertyHelper(output,
- tabLevel + 1,
-@@ -1276,7 +1276,7 @@ void AssimpImporter::generateMaterial(aiMaterial *material, QTextStream &output,
- QStringLiteral("baseColor"),
- aiColorToQColor(baseColorFactor));
-
-- QString baseColorImage = generateImage(material, AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_TEXTURE, tabLevel + 1);
-+ QString baseColorImage = generateImage(material, aiTextureType_BASE_COLOR, 0, tabLevel + 1);
- if (!baseColorImage.isNull()) {
- output << QSSGQmlUtilities::insertTabs(tabLevel + 1) << QStringLiteral("baseColorMap: ") << baseColorImage << QStringLiteral("\n");
- output << QSSGQmlUtilities::insertTabs(tabLevel + 1) << QStringLiteral("opacityChannel: Material.A\n");
-@@ -1294,7 +1294,7 @@ void AssimpImporter::generateMaterial(aiMaterial *material, QTextStream &output,
- }
-
- ai_real metallicFactor;
-- result = material->Get(AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLIC_FACTOR, metallicFactor);
-+ result = material->Get(AI_MATKEY_METALLIC_FACTOR, metallicFactor);
- if (result == aiReturn_SUCCESS) {
- QSSGQmlUtilities::writeQmlPropertyHelper(output,
- tabLevel + 1,
-@@ -1304,7 +1304,7 @@ void AssimpImporter::generateMaterial(aiMaterial *material, QTextStream &output,
- }
-
- ai_real roughnessFactor;
-- result = material->Get(AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_ROUGHNESS_FACTOR, roughnessFactor);
-+ result = material->Get(AI_MATKEY_ROUGHNESS_FACTOR, roughnessFactor);
- if (result == aiReturn_SUCCESS) {
- QSSGQmlUtilities::writeQmlPropertyHelper(output,
- tabLevel + 1,
-@@ -1410,16 +1410,14 @@ void AssimpImporter::generateMaterial(aiMaterial *material, QTextStream &output,
- }
-
- {
-- bool isUnlit;
-- result = material->Get(AI_MATKEY_GLTF_UNLIT, isUnlit);
-- if (result == aiReturn_SUCCESS && isUnlit)
-+ aiShadingMode shadingMode;
-+ material->Get(AI_MATKEY_SHADING_MODEL, shadingMode);
-+ if (shadingMode == aiShadingMode_Unlit)
- output << QSSGQmlUtilities::insertTabs(tabLevel + 1) << QStringLiteral("lighting: PrincipledMaterial.NoLighting\n");
- }
-
- // SpecularGlossiness Properties
-- bool hasSpecularGlossiness;
-- result = material->Get(AI_MATKEY_GLTF_PBRSPECULARGLOSSINESS, hasSpecularGlossiness);
-- if (result == aiReturn_SUCCESS && hasSpecularGlossiness) {
-+ {
-
- // diffuseFactor (color) // not used (yet), but ends up being diffuseColor
- // {
-@@ -1448,7 +1446,7 @@ void AssimpImporter::generateMaterial(aiMaterial *material, QTextStream &output,
- // glossinessFactor (float)
- {
- ai_real glossiness;
-- result = material->Get(AI_MATKEY_GLTF_PBRSPECULARGLOSSINESS_GLOSSINESS_FACTOR, glossiness);
-+ result = material->Get(AI_MATKEY_GLOSSINESS_FACTOR, glossiness);
- if (result == aiReturn_SUCCESS)
- QSSGQmlUtilities::writeQmlPropertyHelper(output,
- tabLevel + 1,
-@@ -1560,7 +1558,7 @@ QString AssimpImporter::generateImage(aiMaterial *material, aiTextureType textur
-
- if (m_gltfMode) {
- uint gltfUvIndex = 0;
-- result = material->Get(AI_MATKEY_GLTF_TEXTURE_TEXCOORD(textureType, index), gltfUvIndex);
-+ result = material->Get(AI_MATKEY_UVWSRC(textureType, index), gltfUvIndex);
- if (result == aiReturn_SUCCESS)
- uvIndex = gltfUvIndex;
- }
-diff --git a/src/plugins/assetimporters/assimp/assimpimporter_rt.cpp b/src/plugins/assetimporters/assimp/assimpimporter_rt.cpp
-index c3c77d7e..90aee0c5 100644
---- a/src/plugins/assetimporters/assimp/assimpimporter_rt.cpp
-+++ b/src/plugins/assetimporters/assimp/assimpimporter_rt.cpp
-@@ -344,7 +344,7 @@ static void setMaterialProperties(QSSGSceneDesc::Material &target, const aiMater
- texInfo.transform = &transform;
-
- if (sceneInfo.ver == SceneInfo::GltfVersion::v2) {
-- material.Get(AI_MATKEY_GLTF_TEXTURE_TEXCOORD(textureType, index), texInfo.uvIndex);
-+ material.Get(AI_MATKEY_UVWSRC(textureType, index), texInfo.uvIndex);
- material.Get(AI_MATKEY_GLTF_MAPPINGFILTER_MIN(textureType, index), texInfo.minFilter);
- material.Get(AI_MATKEY_GLTF_MAPPINGFILTER_MAG(textureType, index), texInfo.magFilter);
- }
-@@ -414,12 +414,12 @@ static void setMaterialProperties(QSSGSceneDesc::Material &target, const aiMater
- aiReturn result;
- {
- aiColor4D baseColorFactor;
-- result = source.Get(AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_FACTOR, baseColorFactor);
-+ result = source.Get(AI_MATKEY_BASE_COLOR, baseColorFactor);
- if (result == aiReturn_SUCCESS)
- QSSGSceneDesc::setProperty(target, "baseColor", &QQuick3DPrincipledMaterial::setBaseColor, aiColorToQColor(baseColorFactor));
- }
-
-- if (auto baseColorTexture = createTextureNode(source, AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_TEXTURE)) {
-+ if (auto baseColorTexture = createTextureNode(source, aiTextureType_BASE_COLOR, 0)) {
- QSSGSceneDesc::setProperty(target, "baseColorMap", &QQuick3DPrincipledMaterial::setBaseColorMap, baseColorTexture);
- QSSGSceneDesc::setProperty(target, "opacityChannel", &QQuick3DPrincipledMaterial::setOpacityChannel, QQuick3DPrincipledMaterial::TextureChannelMapping::A);
- }
-@@ -433,14 +433,14 @@ static void setMaterialProperties(QSSGSceneDesc::Material &target, const aiMater
-
- {
- ai_real metallicFactor;
-- result = source.Get(AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLIC_FACTOR, metallicFactor);
-+ result = source.Get(AI_MATKEY_METALLIC_FACTOR, metallicFactor);
- if (result == aiReturn_SUCCESS)
- QSSGSceneDesc::setProperty(target, "metalness", &QQuick3DPrincipledMaterial::setMetalness, float(metallicFactor));
- }
-
- {
- ai_real roughnessFactor;
-- result = source.Get(AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_ROUGHNESS_FACTOR, roughnessFactor);
-+ result = source.Get(AI_MATKEY_ROUGHNESS_FACTOR, roughnessFactor);
- if (result == aiReturn_SUCCESS)
- QSSGSceneDesc::setProperty(target, "roughness", &QQuick3DPrincipledMaterial::setRoughness, float(roughnessFactor));
- }
-@@ -509,9 +509,9 @@ static void setMaterialProperties(QSSGSceneDesc::Material &target, const aiMater
- }
-
- {
-- bool isUnlit = false;
-- result = source.Get(AI_MATKEY_GLTF_UNLIT, isUnlit);
-- if (result == aiReturn_SUCCESS && isUnlit)
-+ aiShadingMode shadingMode;
-+ source.Get(AI_MATKEY_SHADING_MODEL, shadingMode);
-+ if (shadingMode == aiShadingMode_Unlit)
- QSSGSceneDesc::setProperty(target, "lighting", &QQuick3DPrincipledMaterial::setLighting, QQuick3DPrincipledMaterial::Lighting::NoLighting);
- }
- } else { // Ver1
Copied: qt6-quick3d/repos/extra-x86_64/qt6-quick3d-assimp-5.1.patch (from rev 435540, qt6-quick3d/trunk/qt6-quick3d-assimp-5.1.patch)
===================================================================
--- qt6-quick3d-assimp-5.1.patch (rev 0)
+++ qt6-quick3d-assimp-5.1.patch 2022-01-30 16:47:38 UTC (rev 435541)
@@ -0,0 +1,137 @@
+diff --git a/src/plugins/assetimporters/assimp/assimpimporter.cpp b/src/plugins/assetimporters/assimp/assimpimporter.cpp
+index cb8f92a3..4ce57d64 100644
+--- a/src/plugins/assetimporters/assimp/assimpimporter.cpp
++++ b/src/plugins/assetimporters/assimp/assimpimporter.cpp
+@@ -1268,7 +1268,7 @@ void AssimpImporter::generateMaterial(aiMaterial *material, QTextStream &output,
+ // GLTF Mode
+ {
+ aiColor4D baseColorFactor;
+- result = material->Get(AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_FACTOR, baseColorFactor);
++ result = material->Get(AI_MATKEY_BASE_COLOR, baseColorFactor);
+ if (result == aiReturn_SUCCESS)
+ QSSGQmlUtilities::writeQmlPropertyHelper(output,
+ tabLevel + 1,
+@@ -1276,7 +1276,7 @@ void AssimpImporter::generateMaterial(aiMaterial *material, QTextStream &output,
+ QStringLiteral("baseColor"),
+ aiColorToQColor(baseColorFactor));
+
+- QString baseColorImage = generateImage(material, AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_TEXTURE, tabLevel + 1);
++ QString baseColorImage = generateImage(material, aiTextureType_BASE_COLOR, 0, tabLevel + 1);
+ if (!baseColorImage.isNull()) {
+ output << QSSGQmlUtilities::insertTabs(tabLevel + 1) << QStringLiteral("baseColorMap: ") << baseColorImage << QStringLiteral("\n");
+ output << QSSGQmlUtilities::insertTabs(tabLevel + 1) << QStringLiteral("opacityChannel: Material.A\n");
+@@ -1294,7 +1294,7 @@ void AssimpImporter::generateMaterial(aiMaterial *material, QTextStream &output,
+ }
+
+ ai_real metallicFactor;
+- result = material->Get(AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLIC_FACTOR, metallicFactor);
++ result = material->Get(AI_MATKEY_METALLIC_FACTOR, metallicFactor);
+ if (result == aiReturn_SUCCESS) {
+ QSSGQmlUtilities::writeQmlPropertyHelper(output,
+ tabLevel + 1,
+@@ -1304,7 +1304,7 @@ void AssimpImporter::generateMaterial(aiMaterial *material, QTextStream &output,
+ }
+
+ ai_real roughnessFactor;
+- result = material->Get(AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_ROUGHNESS_FACTOR, roughnessFactor);
++ result = material->Get(AI_MATKEY_ROUGHNESS_FACTOR, roughnessFactor);
+ if (result == aiReturn_SUCCESS) {
+ QSSGQmlUtilities::writeQmlPropertyHelper(output,
+ tabLevel + 1,
+@@ -1410,16 +1410,14 @@ void AssimpImporter::generateMaterial(aiMaterial *material, QTextStream &output,
+ }
+
+ {
+- bool isUnlit;
+- result = material->Get(AI_MATKEY_GLTF_UNLIT, isUnlit);
+- if (result == aiReturn_SUCCESS && isUnlit)
++ aiShadingMode shadingMode;
++ material->Get(AI_MATKEY_SHADING_MODEL, shadingMode);
++ if (shadingMode == aiShadingMode_Unlit)
+ output << QSSGQmlUtilities::insertTabs(tabLevel + 1) << QStringLiteral("lighting: PrincipledMaterial.NoLighting\n");
+ }
+
+ // SpecularGlossiness Properties
+- bool hasSpecularGlossiness;
+- result = material->Get(AI_MATKEY_GLTF_PBRSPECULARGLOSSINESS, hasSpecularGlossiness);
+- if (result == aiReturn_SUCCESS && hasSpecularGlossiness) {
++ {
+
+ // diffuseFactor (color) // not used (yet), but ends up being diffuseColor
+ // {
+@@ -1448,7 +1446,7 @@ void AssimpImporter::generateMaterial(aiMaterial *material, QTextStream &output,
+ // glossinessFactor (float)
+ {
+ ai_real glossiness;
+- result = material->Get(AI_MATKEY_GLTF_PBRSPECULARGLOSSINESS_GLOSSINESS_FACTOR, glossiness);
++ result = material->Get(AI_MATKEY_GLOSSINESS_FACTOR, glossiness);
+ if (result == aiReturn_SUCCESS)
+ QSSGQmlUtilities::writeQmlPropertyHelper(output,
+ tabLevel + 1,
+@@ -1560,7 +1558,7 @@ QString AssimpImporter::generateImage(aiMaterial *material, aiTextureType textur
+
+ if (m_gltfMode) {
+ uint gltfUvIndex = 0;
+- result = material->Get(AI_MATKEY_GLTF_TEXTURE_TEXCOORD(textureType, index), gltfUvIndex);
++ result = material->Get(AI_MATKEY_UVWSRC(textureType, index), gltfUvIndex);
+ if (result == aiReturn_SUCCESS)
+ uvIndex = gltfUvIndex;
+ }
+diff --git a/src/plugins/assetimporters/assimp/assimpimporter_rt.cpp b/src/plugins/assetimporters/assimp/assimpimporter_rt.cpp
+index c3c77d7e..90aee0c5 100644
+--- a/src/plugins/assetimporters/assimp/assimpimporter_rt.cpp
++++ b/src/plugins/assetimporters/assimp/assimpimporter_rt.cpp
+@@ -344,7 +344,7 @@ static void setMaterialProperties(QSSGSceneDesc::Material &target, const aiMater
+ texInfo.transform = &transform;
+
+ if (sceneInfo.ver == SceneInfo::GltfVersion::v2) {
+- material.Get(AI_MATKEY_GLTF_TEXTURE_TEXCOORD(textureType, index), texInfo.uvIndex);
++ material.Get(AI_MATKEY_UVWSRC(textureType, index), texInfo.uvIndex);
+ material.Get(AI_MATKEY_GLTF_MAPPINGFILTER_MIN(textureType, index), texInfo.minFilter);
+ material.Get(AI_MATKEY_GLTF_MAPPINGFILTER_MAG(textureType, index), texInfo.magFilter);
+ }
+@@ -414,12 +414,12 @@ static void setMaterialProperties(QSSGSceneDesc::Material &target, const aiMater
+ aiReturn result;
+ {
+ aiColor4D baseColorFactor;
+- result = source.Get(AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_FACTOR, baseColorFactor);
++ result = source.Get(AI_MATKEY_BASE_COLOR, baseColorFactor);
+ if (result == aiReturn_SUCCESS)
+ QSSGSceneDesc::setProperty(target, "baseColor", &QQuick3DPrincipledMaterial::setBaseColor, aiColorToQColor(baseColorFactor));
+ }
+
+- if (auto baseColorTexture = createTextureNode(source, AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_TEXTURE)) {
++ if (auto baseColorTexture = createTextureNode(source, aiTextureType_BASE_COLOR, 0)) {
+ QSSGSceneDesc::setProperty(target, "baseColorMap", &QQuick3DPrincipledMaterial::setBaseColorMap, baseColorTexture);
+ QSSGSceneDesc::setProperty(target, "opacityChannel", &QQuick3DPrincipledMaterial::setOpacityChannel, QQuick3DPrincipledMaterial::TextureChannelMapping::A);
+ }
+@@ -433,14 +433,14 @@ static void setMaterialProperties(QSSGSceneDesc::Material &target, const aiMater
+
+ {
+ ai_real metallicFactor;
+- result = source.Get(AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLIC_FACTOR, metallicFactor);
++ result = source.Get(AI_MATKEY_METALLIC_FACTOR, metallicFactor);
+ if (result == aiReturn_SUCCESS)
+ QSSGSceneDesc::setProperty(target, "metalness", &QQuick3DPrincipledMaterial::setMetalness, float(metallicFactor));
+ }
+
+ {
+ ai_real roughnessFactor;
+- result = source.Get(AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_ROUGHNESS_FACTOR, roughnessFactor);
++ result = source.Get(AI_MATKEY_ROUGHNESS_FACTOR, roughnessFactor);
+ if (result == aiReturn_SUCCESS)
+ QSSGSceneDesc::setProperty(target, "roughness", &QQuick3DPrincipledMaterial::setRoughness, float(roughnessFactor));
+ }
+@@ -509,9 +509,9 @@ static void setMaterialProperties(QSSGSceneDesc::Material &target, const aiMater
+ }
+
+ {
+- bool isUnlit = false;
+- result = source.Get(AI_MATKEY_GLTF_UNLIT, isUnlit);
+- if (result == aiReturn_SUCCESS && isUnlit)
++ aiShadingMode shadingMode;
++ source.Get(AI_MATKEY_SHADING_MODEL, shadingMode);
++ if (shadingMode == aiShadingMode_Unlit)
+ QSSGSceneDesc::setProperty(target, "lighting", &QQuick3DPrincipledMaterial::setLighting, QQuick3DPrincipledMaterial::Lighting::NoLighting);
+ }
+ } else { // Ver1
More information about the arch-commits
mailing list