Tuesday, November 17, 2020

Re: openimageio: switch to py3, use external pugixml

Stuart Henderson <stu@spacehopper.org> writes:

> This switches oiio's Python bindings to Python 3, removing a dependency
> on boost_python27. Also switches to system pugixml which fixes a problem
> seen with Andrea Fleckenstein's update of Blender if pugixml is present
> at build time. Blender 2.79 still seems happy.
>
> While there I sorted LIB_DEPENDS and used a construct from python.port.mk
> rather than handrolled regex.
>
> OK?

Builds for me on amd64 -current

Andrea

> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/graphics/openimageio/Makefile,v
> retrieving revision 1.45
> diff -u -p -w -u -r1.45 Makefile
> --- Makefile 13 Nov 2020 23:25:38 -0000 1.45
> +++ Makefile 16 Nov 2020 16:34:07 -0000
> @@ -7,12 +7,12 @@ COMMENT = library for reading and writi
>
> GH_ACCOUNT = OpenImageIO
> GH_PROJECT = oiio
> -V = 1.8.6
> GH_TAGNAME = Release-$V
> +V = 1.8.6
> DISTNAME = openimageio-${V}
> -REVISION = 10
> +REVISION = 11
>
> -SHARED_LIBS += OpenImageIO 5.0 # 1.0
> +SHARED_LIBS += OpenImageIO 6.0 # 1.0
> SHARED_LIBS += OpenImageIO_Util 2.0 # 1.5
>
> CATEGORIES = graphics devel
> @@ -25,36 +25,41 @@ MAINTAINER = Pascal Stumpf <pascal@stum
> PERMIT_PACKAGE = Yes
>
> WANTLIB += ${COMPILER_LIBCXX} ${MODPY_WANTLIB}
> +WANTLIB += boost_python${MODPY_MAJORMINOR}-mt
> WANTLIB += GL GLEW GLU Half-2_5 Iex-2_5 IlmImf-2_5 IlmThread-2_5
> WANTLIB += Imath-2_5 OpenColorIO Qt5Core Qt5Gui Qt5OpenGL Qt5Widgets
> WANTLIB += avcodec avformat avutil boost_atomic-mt boost_chrono-mt
> -WANTLIB += boost_date_time-mt boost_filesystem-mt boost_python${MODPY_VERSION:C/\.//g}-mt
> -WANTLIB += boost_system-mt boost_thread-mt bz2 c freetype gif
> -WANTLIB += jpeg m openjpeg png raw_r swscale tiff webp z
> +WANTLIB += boost_date_time-mt boost_filesystem-mt boost_system-mt
> +WANTLIB += boost_thread-mt bz2 c freetype gif jpeg m openjpeg
> +WANTLIB += png pugixml raw_r swscale tiff webp z
>
> MODULES = devel/cmake \
> lang/python \
> x11/qt5
>
> +MODPY_VERSION = ${MODPY_DEFAULT_VERSION_3}
> +
> COMPILER = base-clang ports-gcc
>
> BUILD_DEPENDS = textproc/txt2man
>
> LIB_DEPENDS = devel/boost>=1.67.0 \
> - graphics/openjpeg \
> - graphics/tiff \
> - graphics/libwebp \
> - graphics/glew \
> - graphics/openexr \
> + graphics/ffmpeg \
> graphics/giflib \
> + graphics/glew \
> + graphics/libraw \
> + graphics/libwebp \
> graphics/opencolorio \
> - graphics/ffmpeg \
> - graphics/libraw
> + graphics/openexr \
> + graphics/openjpeg \
> + graphics/tiff \
> + textproc/pugixml
>
> -CONFIGURE_ARGS += -DUSE_OPENCV=OFF \
> +CONFIGURE_ARGS += -DCMAKE_INSTALL_MANDIR="man/man1" \
> + -DSTOP_ON_WARNING=OFF \
> -DUSE_DICOM=OFF \
> - -DCMAKE_INSTALL_MANDIR="man/man1" \
> - -DSTOP_ON_WARNING=OFF
> + -DUSE_EXTERNAL_PUGIXML=ON \
> + -DUSE_OPENCV=OFF
>
> CXXFLAGS += -pthread
>
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/graphics/openimageio/pkg/PLIST,v
> retrieving revision 1.8
> diff -u -p -w -u -r1.8 PLIST
> --- pkg/PLIST 26 Dec 2017 19:19:04 -0000 1.8
> +++ pkg/PLIST 16 Nov 2020 16:34:07 -0000
> @@ -38,9 +38,6 @@ include/OpenImageIO/parallel.h
> include/OpenImageIO/paramlist.h
> include/OpenImageIO/platform.h
> include/OpenImageIO/plugin.h
> -include/OpenImageIO/pugiconfig.hpp
> -include/OpenImageIO/pugixml.cpp
> -include/OpenImageIO/pugixml.hpp
> include/OpenImageIO/refcnt.h
> include/OpenImageIO/simd.h
> include/OpenImageIO/strided_ptr.h
> @@ -64,6 +61,7 @@ lib/python${MODPY_VERSION}/site-packages
> @man man/man1/idiff.1
> @man man/man1/igrep.1
> @man man/man1/iinfo.1
> +@man man/man1/iv.1
> @man man/man1/maketx.1
> @man man/man1/oiiotool.1
> share/doc/OpenImageIO/

No comments:

Post a Comment