Hi,

> http://build-failures.rhaalovely.net/aarch64/2020-02-12/x11/qt5/qt3d.log

The old, bundled assimp is causing narrowing issues, that are fixed in
recent versions of it.

Because arm* and macppc have such narrowing issues in common, i tried
to fix it through ports-clang on macppc, and that required even more
patches. So, i have:

- added system assimp to LIB_DEPENDS, updated WANTLIB and added proper
  CONFIGURE_ARGS
- dropped all bundled assimp patches indeed

Testing:

- amd64 builds and works fine, i've built the only consumer geo/qgis
  without issues
- it builds on macppc with ports-gcc, its CHOSEN_COMPILER, qgis is
  BROKEN on this arch
- i don't have an arm machine, but i'm 99% sure it will fix the build :)

Comments and feedback are welcome,

Charlène.


Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/qt5/qt3d/Makefile,v
retrieving revision 1.13
diff -u -p -u -p -r1.13 Makefile
--- Makefile    7 Jan 2020 20:22:07 -0000       1.13
+++ Makefile    22 Feb 2020 21:35:57 -0000
@@ -1,11 +1,8 @@
 # $OpenBSD: Makefile,v 1.13 2020/01/07 20:22:07 zhuk Exp $
 
-# TODO: port Assimp and switch qt3d to it after Assimp >3.3.1 gets
-# released.
-
 QT5NAME =              Qt3D
 COMMENT-main =         Qt5 components for 3D graphics
-REVISION-main =                0
+REVISION-main =                1
 
 MULTI_PACKAGES =       -main -examples
 
@@ -23,13 +20,16 @@ SHARED_LIBS +=  Qt53DQuickExtras    0.1
 SHARED_LIBS +=  Qt53DQuickScene2D      0.1
 
 WANTLIB += ${COMPILER_LIBCXX} GL Qt5Concurrent Qt5Core Qt5Gamepad
-WANTLIB += Qt5Gui Qt5Network Qt5Qml Qt5Quick c m z
+WANTLIB += Qt5Gui Qt5Network Qt5Qml Qt5Quick assimp c m
 
 BUILD_DEPENDS =                
x11/qt5/qtmultimedia>=${QT5_VERSION:R},<${QT5_NEXT_VERSION}
 RUN_DEPENDS-examples = 
x11/qt5/qtmultimedia>=${QT5_VERSION:R},<${QT5_NEXT_VERSION}
 
-LIB_DEPENDS =          
x11/qt5/qtdeclarative>=${QT5_VERSION},<${QT5_NEXT_VERSION} \
+LIB_DEPENDS =          multimedia/assimp>=3.3.2 \
+                       
x11/qt5/qtdeclarative>=${QT5_VERSION},<${QT5_NEXT_VERSION} \
                        x11/qt5/qtgamepad>=${QT5_VERSION},<${QT5_NEXT_VERSION}
+
+CONFIGURE_ARGS +=      -assimp=system
 
 FLAVORS =              debug
 
Index: patches/patch-src_3rdparty_assimp_code_glTFAssetWriter_inl
===================================================================
RCS file: patches/patch-src_3rdparty_assimp_code_glTFAssetWriter_inl
diff -N patches/patch-src_3rdparty_assimp_code_glTFAssetWriter_inl
--- patches/patch-src_3rdparty_assimp_code_glTFAssetWriter_inl  17 Jul 2017 
08:34:37 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,26 +0,0 @@
-$OpenBSD: patch-src_3rdparty_assimp_code_glTFAssetWriter_inl,v 1.1 2017/07/17 
08:34:37 zhuk Exp $
-Unbreak build.
-
-Index: src/3rdparty/assimp/code/glTFAssetWriter.inl
---- src/3rdparty/assimp/code/glTFAssetWriter.inl.orig
-+++ src/3rdparty/assimp/code/glTFAssetWriter.inl
-@@ -105,7 +105,7 @@ namespace glTF {
-                 type = "arraybuffer";
-         }
- 
--        obj.AddMember("byteLength", b.byteLength, w.mAl);
-+        obj.AddMember("byteLength", (uint64_t)b.byteLength, w.mAl);
-         obj.AddMember("type", StringRef(type), w.mAl);
-         obj.AddMember("uri", Value(dataURI, w.mAl).Move(), w.mAl);
-     }
-@@ -113,8 +113,8 @@ namespace glTF {
-     inline void Write(Value& obj, BufferView& bv, AssetWriter& w)
-     {
-         obj.AddMember("buffer", Value(bv.buffer->id, w.mAl).Move(), w.mAl);
--        obj.AddMember("byteOffset", bv.byteOffset, w.mAl);
--        obj.AddMember("byteLength", bv.byteLength, w.mAl);
-+        obj.AddMember("byteOffset", (uint64_t)bv.byteOffset, w.mAl);
-+        obj.AddMember("byteLength", (uint64_t)bv.byteLength, w.mAl);
-         obj.AddMember("target", int(bv.target), w.mAl);
-     }
- 
Index: patches/patch-src_3rdparty_assimp_code_glTFAsset_inl
===================================================================
RCS file: patches/patch-src_3rdparty_assimp_code_glTFAsset_inl
diff -N patches/patch-src_3rdparty_assimp_code_glTFAsset_inl
--- patches/patch-src_3rdparty_assimp_code_glTFAsset_inl        25 Aug 2019 
20:10:37 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-$OpenBSD: patch-src_3rdparty_assimp_code_glTFAsset_inl,v 1.1 2019/08/25 
20:10:37 cwen Exp $
-
-Fix the build on big endian archs. From:
-https://github.com/assimp/assimp/pull/986/commits/c2c12c1db5c8d7610ad46b1970aabf4afde0eef4
-
-Index: src/3rdparty/assimp/code/glTFAsset.inl
---- src/3rdparty/assimp/code/glTFAsset.inl.orig
-+++ src/3rdparty/assimp/code/glTFAsset.inl
-@@ -40,6 +40,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
- 
- #include "StringUtils.h"
- 
-+using namespace Assimp;
-+
- namespace glTF {
- 
- namespace {

Reply via email to