Skip to content

Commit

Permalink
graphics/appleseed: try to unbreak and undeprecate the port
Browse files Browse the repository at this point in the history
Loosely based on the patches obtained from Arch/AUR package.
  • Loading branch information
Alexey Dokuchaev authored and Alexey Dokuchaev committed Nov 29, 2023
1 parent 0641710 commit ba86aef
Show file tree
Hide file tree
Showing 6 changed files with 131 additions and 5 deletions.
6 changes: 1 addition & 5 deletions graphics/appleseed/Makefile
Expand Up @@ -15,18 +15,14 @@ LIB_DEPENDS= libboost_thread.so:devel/boost-libs \
libpng.so:graphics/png \
libIlmThread.so:graphics/openexr \
libImath.so:math/Imath \
libOpenColorIO.so:graphics/opencolorio \
libOpenColorIOv1.so:graphics/opencoloriov1 \
libOpenImageIO.so:graphics/openimageio \
libxerces-c.so:textproc/xerces-c3 \
liboslexec.so:graphics/openshadinglanguage

USE_GITHUB= yes
GH_ACCOUNT= ${PORTNAME}hq

BROKEN= cannot build with recent Boost and OCIO libs
DEPRECATED= Fails to build and marked broken for several months
EXPIRATION_DATE=2023-11-30

ONLY_FOR_ARCHS= i386 amd64
ONLY_FOR_ARCHS_REASON= not ported to it yet

Expand Down
19 changes: 19 additions & 0 deletions graphics/appleseed/files/patch-cmake_modules_FindOpenImageIO.cmake
@@ -0,0 +1,19 @@
--- cmake/modules/FindOpenImageIO.cmake.orig 2019-08-31 15:49:01 UTC
+++ cmake/modules/FindOpenImageIO.cmake
@@ -42,6 +42,7 @@ include (FindPackageHandleStandardArgs)
find_path (OPENIMAGEIO_INCLUDE_DIR NAMES OpenImageIO/imageio.h)

find_library (OPENIMAGEIO_LIBRARY NAMES OpenImageIO)
+find_library (OPENIMAGEIOUTIL_LIBRARY NAMES OpenImageIO_Util)

find_program (OPENIMAGEIO_OIIOTOOL NAMES oiiotool)
find_program (OPENIMAGEIO_IDIFF NAMES idiff)
@@ -57,7 +58,7 @@ find_package_handle_standard_args (OPENIMAGEIO DEFAULT
# Set the output variables.
if (OPENIMAGEIO_FOUND)
set (OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO_INCLUDE_DIR})
- set (OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARY})
+ set (OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARY} ${OPENIMAGEIOUTIL_LIBRARY})
else ()
set (OPENIMAGEIO_INCLUDE_DIRS)
set (OPENIMAGEIO_LIBRARIES)
20 changes: 20 additions & 0 deletions graphics/appleseed/files/patch-oiio-cxx-std-14
@@ -0,0 +1,20 @@
--- src/appleseed.studio/CMakeLists.txt.orig
+++ src/appleseed.studio/CMakeLists.txt
@@ -438,6 +438,7 @@ add_executable (appleseed.studio
)

set_target_properties (appleseed.studio PROPERTIES FOLDER "Applications")
+set_target_properties (appleseed.studio PROPERTIES CXX_STANDARD 14)

if (WIN32)
set_target_properties (appleseed.studio PROPERTIES
--- src/appleseed/CMakeLists.txt.orig
+++ src/appleseed/CMakeLists.txt
@@ -2340,6 +2340,7 @@ add_library (appleseed SHARED
)

set_target_properties (appleseed PROPERTIES FOLDER "Core")
+set_target_properties (appleseed PROPERTIES CXX_STANDARD 14)

if (USE_VISIBILITY_MAP)
set_target_properties (appleseed PROPERTIES
70 changes: 70 additions & 0 deletions graphics/appleseed/files/patch-opencolorio1
@@ -0,0 +1,70 @@
--- cmake/modules/FindOpenColorIO.cmake.orig
+++ cmake/modules/FindOpenColorIO.cmake
@@ -35,10 +35,10 @@
# OPENCOLORIO_FOUND - True if OpenColorIO found.

# Look for the header file.
-find_path (OPENCOLORIO_INCLUDE_DIR NAMES OpenColorIO/OpenColorIO.h)
+find_path (OPENCOLORIO_INCLUDE_DIR NAMES OpenColorIOv1/OpenColorIO.h)

# Look for the library.
-find_library (OPENCOLORIO_LIBRARY NAMES OpenColorIO)
+find_library (OPENCOLORIO_LIBRARY NAMES OpenColorIOv1)

# handle the QUIETLY and REQUIRED arguments and set OPENCOLORIO_FOUND to TRUE if all listed variables are TRUE
include (FindPackageHandleStandardArgs)
--- src/appleseed/foundation/core/thirdparties.cpp.orig
+++ src/appleseed/foundation/core/thirdparties.cpp
@@ -49,7 +49,7 @@
#include <lz4.h>

// OpenColorIO headers.
-#include <OpenColorIO/OpenColorABI.h>
+#include <OpenColorIOv1/OpenColorABI.h>

// OpenEXR headers.
#include "foundation/platform/_beginexrheaders.h"
--- src/appleseed.studio/mainwindow/mainwindow.h.orig
+++ src/appleseed.studio/mainwindow/mainwindow.h
@@ -49,7 +49,7 @@
#include <QObject>

// OpenColorIO headers.
-#include <OpenColorIO/OpenColorIO.h>
+#include <OpenColorIOv1/OpenColorIO.h>
namespace OCIO = OCIO_NAMESPACE;

// Standard headers.
--- src/appleseed.studio/mainwindow/rendering/rendertab.cpp.orig
+++ src/appleseed.studio/mainwindow/rendering/rendertab.cpp
@@ -44,7 +44,7 @@
#include "foundation/image/image.h"

// OpenColorIO headers.
-#include <OpenColorIO/OpenColorIO.h>
+#include <OpenColorIOv1/OpenColorIO.h>

// Qt headers.
#include <QComboBox>
--- src/appleseed.studio/mainwindow/rendering/rendertab.h.orig
+++ src/appleseed.studio/mainwindow/rendering/rendertab.h
@@ -42,7 +42,7 @@
#include "utility/widgetzoomhandler.h"

// OpenColorIO headers.
-#include <OpenColorIO/OpenColorIO.h>
+#include <OpenColorIOv1/OpenColorIO.h>
namespace OCIO = OCIO_NAMESPACE;

// Qt headers.
--- src/appleseed.studio/mainwindow/rendering/renderwidget.h.orig
+++ src/appleseed.studio/mainwindow/rendering/renderwidget.h
@@ -38,7 +38,7 @@
#include "foundation/math/vector.h"

// OpenColorIO headers.
-#include <OpenColorIO/OpenColorIO.h>
+#include <OpenColorIOv1/OpenColorIO.h>
namespace OCIO = OCIO_NAMESPACE;

// Qt headers.
@@ -0,0 +1,10 @@
--- src/appleseed/renderer/kernel/rendering/final/texturecontrolledpixelrenderer.cpp.orig 2019-08-31 15:49:01 UTC
+++ src/appleseed/renderer/kernel/rendering/final/texturecontrolledpixelrenderer.cpp
@@ -61,6 +61,7 @@
// OpenImageIO headers.
#include "foundation/platform/_beginoiioheaders.h"
#include "OpenImageIO/imagebufalgo.h"
+#include "OpenImageIO/imagecache.h"
#include "OpenImageIO/typedesc.h"
#include "foundation/platform/_endoiioheaders.h"

@@ -0,0 +1,11 @@
--- src/appleseed/renderer/modeling/project/assethandler.cpp.orig 2019-08-31 15:49:01 UTC
+++ src/appleseed/renderer/modeling/project/assethandler.cpp
@@ -80,7 +80,7 @@ namespace
try
{
create_directories(dest_path.parent_path());
- copy_file(source_path, dest_path, copy_option::overwrite_if_exists);
+ copy_file(source_path, dest_path, copy_options::overwrite_existing);
return true;
}
catch (const std::exception& e) // namespace qualification required

0 comments on commit ba86aef

Please sign in to comment.