Bug 275818 - graphics/openimageio update to v2.5.8.0
Summary: graphics/openimageio update to v2.5.8.0
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dima Panov
URL: https://github.com/AcademySoftwareFou...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-18 07:56 UTC by Shane
Modified: 2024-04-08 14:55 UTC (History)
2 users (show)

See Also:


Attachments
maintainer update graphics/openimageio (3.11 KB, patch)
2023-12-18 07:56 UTC, Shane
FreeBSD: maintainer-approval-
Details | Diff
Update to 2.5.6.0 and switch to qt6 (3.27 KB, patch)
2024-02-17 11:40 UTC, Vladimir Druzenko
vvd: maintainer-approval?
Details | Diff
maintainer update graphics/openimageio to 2.5.8.0 (3.32 KB, patch)
2024-02-18 05:09 UTC, Shane
FreeBSD: maintainer-approval+
Details | Diff
maintainer update graphics/openimageio to 2.5.8.0 (3.82 KB, patch)
2024-02-25 00:44 UTC, Shane
FreeBSD: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Shane 2023-12-18 07:56:44 UTC
Created attachment 247111 [details]
maintainer update graphics/openimageio

Update graphics/openimageio to v2.5.6.0
Comment 1 Vladimir Druzenko freebsd_committer freebsd_triage 2024-02-16 13:24:49 UTC
It grab Qt6 1st if found and then if Qt6 isn't found check for Qt5:

if (USE_QT AND OPENGL_FOUND)
    checked_find_package (Qt6 COMPONENTS Core Gui Widgets OpenGLWidgets)
    if (NOT Qt6_FOUND)
        checked_find_package (Qt5 COMPONENTS Core Gui Widgets OpenGL)
    endif ()
    if (NOT Qt5_FOUND AND NOT Qt6_FOUND AND APPLE)
        message (STATUS "  If you think you installed qt with Homebrew and it still doesn't work,")
        message (STATUS "  try:   export PATH=/usr/local/opt/qt/bin:$PATH")
    endif ()
endif ()

Build on live system is "half broken".
Comment 2 Vladimir Druzenko freebsd_committer freebsd_triage 2024-02-16 13:25:40 UTC
Quote is from file: src/cmake/externalpackages.cmake
Comment 3 Vladimir Druzenko freebsd_committer freebsd_triage 2024-02-16 15:16:00 UTC
Patch to allow pick qt "5" or "6" graphics/openimageio/files/patch-src_cmake_externalpackages.cmake:
--- src/cmake/externalpackages.cmake.orig       2023-12-01 05:46:11 UTC
+++ src/cmake/externalpackages.cmake
@@ -258,13 +258,15 @@ checked_find_package (Nuke)


 # Qt -- used for iv
-option (USE_QT "Use Qt if found" ON)
+set (USE_QT "6" CACHE STRING "Use Qt if found")
 if (USE_QT)
     checked_find_package (OpenGL)   # used for iv
 endif ()
 if (USE_QT AND OPENGL_FOUND)
-    checked_find_package (Qt6 COMPONENTS Core Gui Widgets OpenGLWidgets)
+    if (USE_QT EQUAL "6")
+        checked_find_package (Qt6 COMPONENTS Core Gui Widgets OpenGLWidgets)
+    endif ()
     if (NOT Qt6_FOUND)
         checked_find_package (Qt5 COMPONENTS Core Gui Widgets OpenGL)
     endif ()
     if (NOT Qt5_FOUND AND NOT Qt6_FOUND AND APPLE)

graphics/openimageio/Makefile:
IMAGEVIEWER_CMAKE_BOOL= USE_OPENGL
IMAGEVIEWER_CMAKE_ON=   -DUSE_QT:STRING="5"
IMAGEVIEWER_CMAKE_OFF=  -DUSE_QT:BOOL=OFF
Comment 4 Vladimir Druzenko freebsd_committer freebsd_triage 2024-02-16 16:27:16 UTC
Or graphics/openimageio/files/patch-src_cmake_externalpackages.cmake:
--- src/cmake/externalpackages.cmake.orig       2023-12-01 05:46:11 UTC
+++ src/cmake/externalpackages.cmake
@@ -258,13 +258,18 @@ checked_find_package (Nuke)


 # Qt -- used for iv
 option (USE_QT "Use Qt if found" ON)
 if (USE_QT)
+    if (NOT USE_QT EQUAL "5")
+        set (USE_QT "6")
+    endif ()
     checked_find_package (OpenGL)   # used for iv
 endif ()
 if (USE_QT AND OPENGL_FOUND)
-    checked_find_package (Qt6 COMPONENTS Core Gui Widgets OpenGLWidgets)
+    if (USE_QT EQUAL "6")
+        checked_find_package (Qt6 COMPONENTS Core Gui Widgets OpenGLWidgets)
+    endif ()
     if (NOT Qt6_FOUND)
         checked_find_package (Qt5 COMPONENTS Core Gui Widgets OpenGL)
     endif ()
     if (NOT Qt5_FOUND AND NOT Qt6_FOUND AND APPLE)
Comment 5 Vladimir Druzenko freebsd_committer freebsd_triage 2024-02-16 16:31:06 UTC
graphics/openshadinglanguage switched to qt6 - maybe better switch graphics/openimageio to qt6 too?
Comment 6 Shane 2024-02-17 04:16:18 UTC
(In reply to Vladimir Druzenko from comment #4)

While the idea is OK, it already searches for 6 and failing that looks for 5. If you set USE_QT=OFF, then your first logic will still search for qt5, your second logic will set it to 6 and first search for qt6. So you should at least put the qt5 search in an else/elif block, and I would add a port Makefile radio option to choose between qt5/6.

Imageviewer is a small optional util that is off by default, so the standard pkgs don't need all the extra deps.

I would choose to simply change the IMAGEVIEWER deps to qt6.
Comment 7 Vladimir Druzenko freebsd_committer freebsd_triage 2024-02-17 10:09:20 UTC
(In reply to Shane from comment #6)
If set to ON or not set then check default 6, if not found 6 then check 5.
But if set to 5, then no check for 6.

> I would choose to simply change the IMAGEVIEWER deps to qt6.
Agree, it's better and don't require hacks in externalpackages.cmake.
Comment 8 Vladimir Druzenko freebsd_committer freebsd_triage 2024-02-17 11:40:05 UTC
Created attachment 248525 [details]
Update to 2.5.6.0 and switch to qt6

Check patch.
Comment 9 Shane 2024-02-18 00:23:24 UTC
Comment on attachment 248525 [details]
Update to 2.5.6.0 and switch to qt6

Looks ok to me
Comment 10 Shane 2024-02-18 00:27:03 UTC
even though you requested approval it isn't saving my response.

I approve the qt6 patch
Comment 11 Shane 2024-02-18 05:09:32 UTC
Created attachment 248556 [details]
maintainer update graphics/openimageio to 2.5.8.0

Bump patch to v2.5.8.0
Enable C++17 to fix build against openvdb v11 - supports both v10 and v11
Includes change to use qt6
Comment 12 Shane 2024-02-25 00:44:32 UTC
Created attachment 248721 [details]
maintainer update graphics/openimageio to 2.5.8.0

add missing header to pkg-plist
Comment 13 Vladimir Druzenko freebsd_committer freebsd_triage 2024-04-08 14:54:16 UTC
WWW=            https://www.openimageio.org/
> Site Not Found
Comment 14 Vladimir Druzenko freebsd_committer freebsd_triage 2024-04-08 14:55:24 UTC
Several new versions released: https://github.com/AcademySoftwareFoundation/OpenImageIO/releases