pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/graphics/opencolorio



Module Name:    pkgsrc
Committed By:   nros
Date:           Tue Nov  7 20:29:25 UTC 2023

Modified Files:
        pkgsrc/graphics/opencolorio: Makefile distinfo
Added Files:
        pkgsrc/graphics/opencolorio/patches:
            patch-share_cmake_utils_CppVersion.cmake
            patch-src_OpenColorIO_OCIOZArchive.cpp
            patch-src_apps_ocioarchive_main.cpp

Log Message:
opencolorio: fix build of opencolorio, bump pkgrevision
Make sure no dependencies are downloaded using git,
only use pkgsrc dependencies.
Add patch to build with minizip-ng version 4 that is
in pkgsrc.
Set zlib and expat versions needed by opencolorio.
Set c++ extensions on cmake files for alloca.
Clean up Makefile, cmake/build.mk already uses
out-of-source build so don't create and set a
configure dir for cmake.
Remove some unused CMAKE_CONFIGURE_ARGS.
Remove fixes for alloca in Makefile since this is
now set in cmake.
Add USE_CC_FEATURES and set USE_CXX_FEATURES to the
right value.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 pkgsrc/graphics/opencolorio/Makefile
cvs rdiff -u -r1.8 -r1.9 pkgsrc/graphics/opencolorio/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/graphics/opencolorio/patches/patch-share_cmake_utils_CppVersion.cmake \
    pkgsrc/graphics/opencolorio/patches/patch-src_OpenColorIO_OCIOZArchive.cpp \
    pkgsrc/graphics/opencolorio/patches/patch-src_apps_ocioarchive_main.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/graphics/opencolorio/Makefile
diff -u pkgsrc/graphics/opencolorio/Makefile:1.9 pkgsrc/graphics/opencolorio/Makefile:1.10
--- pkgsrc/graphics/opencolorio/Makefile:1.9    Sun Oct 15 19:45:33 2023
+++ pkgsrc/graphics/opencolorio/Makefile        Tue Nov  7 20:29:25 2023
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.9 2023/10/15 19:45:33 ryoon Exp $
+# $NetBSD: Makefile,v 1.10 2023/11/07 20:29:25 nros Exp $
 
 DISTNAME=      OpenColorIO-2.2.1
 PKGNAME=       ${DISTNAME:tl}
+PKGREVISION=   1
 CATEGORIES=    graphics
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=AcademySoftwareFoundation/}
 GITHUB_PROJECT=        OpenColorIO
@@ -13,16 +14,15 @@ COMMENT=    Color management solution
 LICENSE=       modified-bsd AND mit
 
 USE_TOOLS+=    gmake pkg-config
-USE_LANGUAGES= gnu99 gnu++14 # alloca(3)
-BUILDLINK_TRANSFORM+=  opt:-std=c++14:-std=gnu++14 # alloca(3)
+USE_LANGUAGES= c c++
 
-USE_CXX_FEATURES+=     c++11
+USE_CC_FEATURES+=      c99
+USE_CXX_FEATURES+=     c++14
 
-CMAKE_CONFIGURE_ARGS+= -DUSE_EXTERNAL_TINYXML:BOOL=ON
-CMAKE_CONFIGURE_ARGS+= -DUSE_EXTERNAL_YAML:BOOL=ON
 CMAKE_CONFIGURE_ARGS+= -DOCIO_BUILD_APPS:BOOL=OFF
-CMAKE_CONFIGURE_ARGS+= -DOCIO_BUILD_SHARED:BOOL=ON
 CMAKE_CONFIGURE_ARGS+= -DOCIO_BUILD_PYGLUE:BOOL=OFF
+# Only use pkgsrc dependencies
+CMAKE_CONFIGURE_ARGS+= -DOCIO_INSTALL_EXT_PACKAGES:STRING=NONE
 
 .if ${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "x86_64"
 CMAKE_CONFIGURE_ARGS+= -DOCIO_USE_SSE:BOOL=OFF
@@ -32,25 +32,23 @@ PKGCONFIG_OVERRIDE+=        src/OpenColorIO/res
 
 BUILDLINK_TRANSFORM+=  rm:-Werror
 
-OBJDIR=                        ../build
-CONFIGURE_DIRS=                ${OBJDIR}
-
-pre-configure:
-       ${MKDIR} ${WRKSRC}/${OBJDIR}
+.include "../../devel/cmake/build.mk"
 
 .include "../../archivers/minizip-ng/buildlink3.mk"
 .include "../../devel/boost-headers/buildlink3.mk"
 .include "../../devel/py-pybind11/buildlink3.mk"
 .include "../../devel/pystring/buildlink3.mk"
+BUILDLINK_API_DEPENDS.zlib+=   zlib>=1.2.13
+.include "../../devel/zlib/buildlink3.mk"
 .include "../../graphics/MesaLib/buildlink3.mk"
 .include "../../graphics/freeglut/buildlink3.mk"
 .include "../../graphics/glew/buildlink3.mk"
 .include "../../graphics/lcms2/buildlink3.mk"
 .include "../../math/imath/buildlink3.mk"
+BUILDLINK_API_DEPENDS.expat+=  expat>=2.4.1
 .include "../../textproc/expat/buildlink3.mk"
 .include "../../textproc/yaml-cpp/buildlink3.mk"
 .include "../../x11/libXmu/buildlink3.mk"
-.include "../../devel/cmake/build.mk"
 PY_PATCHPLIST= yes
 .include "../../lang/python/extension.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/graphics/opencolorio/distinfo
diff -u pkgsrc/graphics/opencolorio/distinfo:1.8 pkgsrc/graphics/opencolorio/distinfo:1.9
--- pkgsrc/graphics/opencolorio/distinfo:1.8    Sun Oct 15 19:45:33 2023
+++ pkgsrc/graphics/opencolorio/distinfo        Tue Nov  7 20:29:25 2023
@@ -1,7 +1,10 @@
-$NetBSD: distinfo,v 1.8 2023/10/15 19:45:33 ryoon Exp $
+$NetBSD: distinfo,v 1.9 2023/11/07 20:29:25 nros Exp $
 
 BLAKE2s (OpenColorIO-2.2.1.tar.gz) = 5fd74fcfa9cc588b7252dcc32df273c69a62a49ccd22b3258f6b2a4d3022624a
 SHA512 (OpenColorIO-2.2.1.tar.gz) = d5f3a4b5bd661af7336c015d07e0feccb286464a08239a3c259a97217001161e7571f5137475fc2f4d1b9af6381bbfa03c0b60f41de282f114307961b8d84fc9
 Size (OpenColorIO-2.2.1.tar.gz) = 11336775 bytes
 SHA1 (patch-share_cmake_modules_Findyaml-cpp.cmake) = e0ae8f97d09ef9c762b419a96a0c091333b4a0c9
 SHA1 (patch-share_cmake_utils_CheckSupportGL.cmake) = f259440166689f7fd8970a61456f111981083733
+SHA1 (patch-share_cmake_utils_CppVersion.cmake) = cc546acc672771519f6c01bffedc60eab6c2d6fd
+SHA1 (patch-src_OpenColorIO_OCIOZArchive.cpp) = 07f6832350a400d98f273bacf16a82df1c1031f9
+SHA1 (patch-src_apps_ocioarchive_main.cpp) = 227dc6f8bee4415db6eb54deef8551aee8b2bb36

Added files:

Index: pkgsrc/graphics/opencolorio/patches/patch-share_cmake_utils_CppVersion.cmake
diff -u /dev/null pkgsrc/graphics/opencolorio/patches/patch-share_cmake_utils_CppVersion.cmake:1.1
--- /dev/null   Tue Nov  7 20:29:25 2023
+++ pkgsrc/graphics/opencolorio/patches/patch-share_cmake_utils_CppVersion.cmake        Tue Nov  7 20:29:25 2023
@@ -0,0 +1,12 @@
+$NetBSD: patch-share_cmake_utils_CppVersion.cmake,v 1.1 2023/11/07 20:29:25 nros Exp $
+
+Use extensions for alloca on NetBSD
+
+--- share/cmake/utils/CppVersion.cmake.orig    2023-11-07 20:06:12.390306361 +0000
++++ share/cmake/utils/CppVersion.cmake
+@@ -75,4 +75,4 @@ endif()
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
+ 
+ # Disable any compiler specific C++ extensions.
+-set(CMAKE_CXX_EXTENSIONS OFF)
++set(CMAKE_CXX_EXTENSIONS ON)
Index: pkgsrc/graphics/opencolorio/patches/patch-src_OpenColorIO_OCIOZArchive.cpp
diff -u /dev/null pkgsrc/graphics/opencolorio/patches/patch-src_OpenColorIO_OCIOZArchive.cpp:1.1
--- /dev/null   Tue Nov  7 20:29:25 2023
+++ pkgsrc/graphics/opencolorio/patches/patch-src_OpenColorIO_OCIOZArchive.cpp  Tue Nov  7 20:29:25 2023
@@ -0,0 +1,60 @@
+$NetBSD: patch-src_OpenColorIO_OCIOZArchive.cpp,v 1.1 2023/11/07 20:29:25 nros Exp $
+
+Fix build with minizip-ng version 4 and above
+based on upstream patch:
+https://github.com/AcademySoftwareFoundation/OpenColorIO/commit/bdc4cd124140f997cdec1c5d7db72b1550fe7eac
+
+--- src/OpenColorIO/OCIOZArchive.cpp.orig      2023-01-06 02:05:59.000000000 +0000
++++ src/OpenColorIO/OCIOZArchive.cpp
+@@ -225,7 +225,7 @@ void archiveConfig(std::ostream & ostrea
+     std::string configStr = ss.str();
+ 
+     // Write zip to memory stream.
+-    mz_stream_mem_create(&write_mem_stream);
++    write_mem_stream = mz_stream_mem_create();
+     mz_stream_mem_set_grow_size(write_mem_stream, 128 * 1024);
+     mz_stream_open(write_mem_stream, NULL, MZ_OPEN_MODE_CREATE);
+ 
+@@ -237,7 +237,7 @@ void archiveConfig(std::ostream & ostrea
+     options.compress_level  = ArchiveCompressionLevels::BEST;
+ 
+     // Create the writer handle.
+-    mz_zip_writer_create(&archiver);
++    archiver = mz_zip_writer_create();
+ 
+     // Archive options.
+     // Compression method
+@@ -332,7 +332,7 @@ void ExtractOCIOZArchive(const char * ar
+     std::string outputDestination = pystring::os::path::normpath(destination);
+ 
+     // Create zip reader.
+-    mz_zip_reader_create(&extracter);
++    extracter = mz_zip_reader_create();
+ 
+     MinizipNgHandlerGuard extracterGuard(extracter, false, false);
+ 
+@@ -450,7 +450,7 @@ std::vector<uint8_t> getFileStringFromAr
+     std::vector<uint8_t> buffer;
+ 
+     // Create the reader object.
+-    mz_zip_reader_create(&reader);
++    reader = mz_zip_reader_create();
+ 
+     MinizipNgHandlerGuard extracterGuard(reader, false, true);
+ 
+@@ -510,7 +510,7 @@ void getEntriesMappingFromArchiveFile(co
+     void *reader = NULL;
+ 
+     // Create the reader object.
+-    mz_zip_reader_create(&reader);
++    reader = mz_zip_reader_create();
+ 
+     MinizipNgHandlerGuard extracterGuard(reader, false, false);
+ 
+@@ -630,4 +630,4 @@ void CIOPOciozArchive::buildEntries()
+     getEntriesMappingFromArchiveFile(m_archiveAbsPath, m_entries);
+ }
+ 
+-} // namespace OCIO_NAMESPACE
+\ No newline at end of file
++} // namespace OCIO_NAMESPACE
Index: pkgsrc/graphics/opencolorio/patches/patch-src_apps_ocioarchive_main.cpp
diff -u /dev/null pkgsrc/graphics/opencolorio/patches/patch-src_apps_ocioarchive_main.cpp:1.1
--- /dev/null   Tue Nov  7 20:29:25 2023
+++ pkgsrc/graphics/opencolorio/patches/patch-src_apps_ocioarchive_main.cpp     Tue Nov  7 20:29:25 2023
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_apps_ocioarchive_main.cpp,v 1.1 2023/11/07 20:29:25 nros Exp $
+
+Fix build with minizip-ng version 4 and above
+based on upstream patch:
+https://github.com/AcademySoftwareFoundation/OpenColorIO/commit/bdc4cd124140f997cdec1c5d7db72b1550fe7eac
+
+--- src/apps/ocioarchive/main.cpp.orig 2023-01-06 02:05:59.000000000 +0000
++++ src/apps/ocioarchive/main.cpp
+@@ -235,7 +235,7 @@ int main(int argc, const char **argv)
+         }
+ 
+         std::string path = args[0];
+-        mz_zip_reader_create(&reader);
++        reader = mz_zip_reader_create();
+         struct tm tmu_date;
+         
+         err = mz_zip_reader_open_file(reader, path.c_str());



Home | Main Index | Thread Index | Old Index