Skip to content

Commit

Permalink
update MacPorts
Browse files Browse the repository at this point in the history
  • Loading branch information
devernay committed Aug 10, 2023
1 parent cfbef37 commit d32b2a8
Show file tree
Hide file tree
Showing 28 changed files with 783 additions and 397 deletions.
3 changes: 3 additions & 0 deletions tools/MacPorts/devel/gnutls/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ configure.args-append \
--without-zstd \
ac_cv_prog_AWK=/usr/bin/awk

# https://trac.macports.org/wiki/WimplicitFunctionDeclaration#strchr
configure.checks.implicit_function_declaration.whitelist-append strchr

compiler.thread_local_storage yes

# Undefined symbols for architecture x86_64: "___get_cpuid_count"
Expand Down
3 changes: 3 additions & 0 deletions tools/MacPorts/devel/gnutls/Portfile.orig
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ configure.args-append \
--without-zstd \
ac_cv_prog_AWK=/usr/bin/awk

# https://trac.macports.org/wiki/WimplicitFunctionDeclaration#strchr
configure.checks.implicit_function_declaration.whitelist-append strchr

compiler.thread_local_storage yes

# Undefined symbols for architecture x86_64: "___get_cpuid_count"
Expand Down
2 changes: 1 addition & 1 deletion tools/MacPorts/graphics/ImageMagick/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ name ImageMagick
# 6.9.11-61 changes the major version of libMagickCore which will
# require increasing the revision of all ports that link with it.
version 6.9.11-60
revision 9
revision 10
checksums rmd160 1c293ba06fd43833be35efb4476e559bf137ccef \
sha256 ba0fa683b0721d1f22b0ccb364e4092e9a7a34ffd3bd6348c82b50fd93b1d7ba \
size 9167220
Expand Down
2 changes: 1 addition & 1 deletion tools/MacPorts/graphics/ImageMagick/Portfile.orig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ name ImageMagick
# 6.9.11-61 changes the major version of libMagickCore which will
# require increasing the revision of all ports that link with it.
version 6.9.11-60
revision 9
revision 10
checksums rmd160 1c293ba06fd43833be35efb4476e559bf137ccef \
sha256 ba0fa683b0721d1f22b0ccb364e4092e9a7a34ffd3bd6348c82b50fd93b1d7ba \
size 9167220
Expand Down
111 changes: 60 additions & 51 deletions tools/MacPorts/graphics/opencolorio/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PortGroup boost 1.0

boost.depends_type build

github.setup AcademySoftwareFoundation OpenColorIO 2.2.0 v
github.setup AcademySoftwareFoundation OpenColorIO 2.2.1 v
name opencolorio
categories graphics
maintainers {mcalhoun @MarcusCalhoun-Lopez} openmaintainer
Expand All @@ -19,30 +19,33 @@ long_description OpenColorIO (OCIO) is a complete color management solution \
geared towards motion picture production with an emphasis on \
visual effects and computer animation.

checksums rmd160 3f2ab794c6f4df2e8cec24f8d04478f2fe590c73 \
sha256 646171b8c9d3941da2bf59fcab99f979626f908b6c6fa4d8fe95bda9eec0407b \
size 11314927
# please remove "stealth update" workaround on next version update
dist_subdir ${name}/${version}_1
checksums rmd160 f9369157eeeca1bbce00594b82d00118924816bc \
sha256 daf215acddf1c3ed443e6c159e369f2c623b015fa07f11fcc76aae9ede665084 \
size 11342273

# Exclude pre-releases from livecheck
github.livecheck.regex {([0-9.]+)}

patchfiles-append missing-CGDisplayCreateUUIDFromDisplayID.diff
patchfiles-append pystring-cmake.diff

# source assumes at least C++11 compiler
# OpenImageIO requires C++14
compiler.cxx_standard 2014
configure.args-append \
-DCMAKE_CXX_STANDARD=14
-DCMAKE_CONFIGURATION_TYPES=MacPorts

# Add MacPorts to the set of authorized configurations (see CMakeLists.txt:88)
configure.args-append \
-DCMAKE_CONFIGURATION_TYPES=\"Debug\;Release\;MinSizeRel\;RelWithDebInfo\;MacPorts\"
patchfiles-append \
patch-OCIOZArchive.diff

# source assumes C++11 compiler
compiler.cxx_standard 2011
configure.cxxflags-append \
-std=c++11

# see https://github.com/imageworks/OpenColorIO/issues/563
configure.cxxflags-append \
-Wno-error=self-assign-field

configure.cxxflags-append \
-Wno-deprecated-declarations

depends_build-append \
port:pkgconfig

Expand All @@ -56,30 +59,21 @@ depends_lib-append \
port:tinyxml

configure.args-append \
-DUSE_EXTERNAL_YAML=ON \
-DUSE_EXTERNAL_TINYXML=ON \
-DUSE_EXTERNAL_LCMS=ON \
-DOCIO_BUILD_OPENFX=OFF \
-DOCIO_BUILD_TESTS=OFF \
-DOCIO_BUILD_GPU_TESTS=OFF

# Use OpenEXR <= 2.5 Half.
# When OpenEXR is upgraded to 3.0, depend on openexr instead, and remove the define.
#depends_lib-append \
# port:ilmbase
#configure.args-append \
# -DOCIO_USE_OPENEXR_HALF=ON
depends_lib-append \
port:imath
-DOCIO_BUILD_GPU_TESTS=OFF \
-DUSE_EXTERNAL_YAML=ON \
-DUSE_EXTERNAL_TINYXML=ON \
-DUSE_EXTERNAL_LCMS=ON

# OpenColorIO intentially installs Python module in lib
# see https://github.com/imageworks/OpenColorIO/blob/15e96c1f579d3640947a5fcb5ec831383cc3956e/src/pyglue/CMakeLists.txt#L85

variant python27 description {Build the Python 2.7 bindings} conflicts python36 python37 python38 python39 python310 {
variant python27 description {Build the Python 2.7 bindings} conflicts python36 python37 python38 python39 python310 python311 {
depends_lib-append port:python27 port:py27-pybind11
configure.args-append \
-DPYTHON=${prefix}/bin/python2.7 \
-DOCIO_PYTHON_VERSION=2.7
-DOCIO_PYTHON_VERSION=2.7 \
-DPYTHON=${prefix}/bin/python2.7
post-destroot {
xinstall -d -m 0755 \
${destroot}${frameworks_dir}/Python.framework/Versions/2.7/lib/python2.7/site-packages
Expand All @@ -89,11 +83,11 @@ variant python27 description {Build the Python 2.7 bindings} conflicts python36
}
}

variant python36 description {Build the Python 3.6 bindings} conflicts python27 python37 python38 python39 python310 {
variant python36 description {Build the Python 3.6 bindings} conflicts python27 python37 python38 python39 python310 python311 {
depends_lib-append port:python36 port:py36-pybind11
configure.args-append \
-DPYTHON=${prefix}/bin/python3.6\
-DOCIO_PYTHON_VERSION=3.6
-DOCIO_PYTHON_VERSION=3.6 \
-DPYTHON=${prefix}/bin/python3.6
post-destroot {
xinstall -d -m 0755 \
${destroot}${frameworks_dir}/Python.framework/Versions/3.6/lib/python3.6/site-packages
Expand All @@ -103,11 +97,11 @@ variant python36 description {Build the Python 3.6 bindings} conflicts python27
}
}

variant python37 description {Build the Python 3.7 bindings} conflicts python27 python36 python38 python39 python310 {
variant python37 description {Build the Python 3.7 bindings} conflicts python27 python36 python38 python39 python310 python311 {
depends_lib-append port:python37 port:py37-pybind11
configure.args-append \
-DPYTHON=${prefix}/bin/python3.7\
-DOCIO_PYTHON_VERSION=3.7
-DOCIO_PYTHON_VERSION=3.7 \
-DPYTHON=${prefix}/bin/python3.7
post-destroot {
xinstall -d -m 0755 \
${destroot}${frameworks_dir}/Python.framework/Versions/3.7/lib/python3.7/site-packages
Expand All @@ -117,11 +111,11 @@ variant python37 description {Build the Python 3.7 bindings} conflicts python27
}
}

variant python38 description {Build the Python 3.8 bindings} conflicts python27 python36 python37 python39 python310 {
variant python38 description {Build the Python 3.8 bindings} conflicts python27 python36 python37 python39 python310 python311 {
depends_lib-append port:python38 port:py38-pybind11
configure.args-append \
-DPYTHON=${prefix}/bin/python3.8\
-DOCIO_PYTHON_VERSION=3.8
-DOCIO_PYTHON_VERSION=3.8 \
-DPYTHON=${prefix}/bin/python3.8
post-destroot {
xinstall -d -m 0755 \
${destroot}${frameworks_dir}/Python.framework/Versions/3.8/lib/python3.8/site-packages
Expand All @@ -131,11 +125,11 @@ variant python38 description {Build the Python 3.8 bindings} conflicts python27
}
}

variant python39 description {Build the Python 3.9 bindings} conflicts python27 python36 python37 python38 python310 {
variant python39 description {Build the Python 3.9 bindings} conflicts python27 python36 python37 python38 python310 python311 {
depends_lib-append port:python39 port:py39-pybind11
configure.args-append \
-DPYTHON=${prefix}/bin/python3.9\
-DOCIO_PYTHON_VERSION=3.9
-DOCIO_PYTHON_VERSION=3.9 \
-DPYTHON=${prefix}/bin/python3.9
post-destroot {
xinstall -d -m 0755 \
${destroot}${frameworks_dir}/Python.framework/Versions/3.9/lib/python3.9/site-packages
Expand All @@ -145,28 +139,43 @@ variant python39 description {Build the Python 3.9 bindings} conflicts python27
}
}

variant python310 description {Build the Python 3.10 bindings} conflicts python27 python36 python37 python38 python39 {
variant python310 description {Build the Python 3.10 bindings} conflicts python27 python36 python37 python38 python39 python311 {
depends_lib-append port:python310 port:py310-pybind11
configure.args-append \
-DPYTHON=${prefix}/bin/python3.10\
-DOCIO_PYTHON_VERSION=3.10
-DOCIO_PYTHON_VERSION=3.10 \
-DPYTHON=${prefix}/bin/python3.10
post-destroot {
xinstall -d -m 0755 \
${destroot}${frameworks_dir}/Python.framework/Versions/3.10/lib/python3.10/site-packages
ln -s \
${prefix}/lib/python3.10/site-packages/PyOpenColorIO.so \
${prefix}/lib/python3.9/site-packages/PyOpenColorIO.so \
${destroot}${frameworks_dir}/Python.framework/Versions/3.10/lib/python3.10/site-packages/
}
}

if {![variant_isset python27] && ![variant_isset python36] && ![variant_isset python37] && ![variant_isset python38] && ![variant_isset python39] && ![variant_isset python310]} {
default_variants +python310

variant python311 description {Build the Python 3.11 bindings} conflicts python27 python36 python37 python38 python39 python310 {
depends_lib-append port:python311 port:py311-pybind11
configure.args-append \
-DOCIO_PYTHON_VERSION=3.11 \
-DPYTHON=${prefix}/bin/python3.11
post-destroot {
xinstall -d -m 0755 \
${destroot}${frameworks_dir}/Python.framework/Versions/3.11/lib/python3.11/site-packages
ln -s \
${prefix}/lib/python3.9/site-packages/PyOpenColorIO.so \
${destroot}${frameworks_dir}/Python.framework/Versions/3.11/lib/python3.11/site-packages/
}
}

if {![variant_isset python27] && ![variant_isset python36] && ![variant_isset python37] && ![variant_isset python38] && ![variant_isset python39] && ![variant_isset python310] && ![variant_isset python311]} {
default_variants +python311
}

if {![variant_isset python27] && ![variant_isset python36] && ![variant_isset python37] && ![variant_isset python38] && ![variant_isset python39] && ![variant_isset python310]} {
if {![variant_isset python27] && ![variant_isset python36] && ![variant_isset python37] && ![variant_isset python38] && ![variant_isset python39] && ![variant_isset python310] && ![variant_isset python311]} {
configure.args-append \
-DOCIO_BUILD_PYGLUE=OFF \
-DOCIO_BUILD_PYTHON=OFF
-DOCIO_BUILD_PYTHON=OFF \
-DOCIO_BUILD_PYGLUE=OFF
}

# make neither x11 nor quartz default since openimageio depends on opencolorio
Expand Down
83 changes: 64 additions & 19 deletions tools/MacPorts/graphics/opencolorio/Portfile.orig
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ PortGroup boost 1.0

boost.depends_type build

github.setup AcademySoftwareFoundation OpenColorIO 1.1.1 v
revision 3
github.setup AcademySoftwareFoundation OpenColorIO 2.2.0 v
name opencolorio
categories graphics
maintainers {mcalhoun @MarcusCalhoun-Lopez} openmaintainer
Expand All @@ -22,22 +21,38 @@ long_description OpenColorIO (OCIO) is a complete color management solution \

# please remove "stealth update" workaround on next version update
dist_subdir ${name}/${version}_1
checksums rmd160 81534822cb8350e1b7ba171c91226de996494d02 \
sha256 b7def3b5383c9b35dc9c0bdd26da74e2199c2b283d52bb84847aa307f70a0bc4 \
size 13830493
checksums rmd160 3f2ab794c6f4df2e8cec24f8d04478f2fe590c73 \
sha256 646171b8c9d3941da2bf59fcab99f979626f908b6c6fa4d8fe95bda9eec0407b \
size 11314927

# Exclude pre-releases from livecheck
github.livecheck.regex {([0-9.]+)}

# see https://github.com/imageworks/OpenColorIO/commit/c43cc918c3e79e324f11ca47e95bfe36e9e0dd15
patchfiles-append patch-upstream.diff
configure.args-append \
-DCMAKE_CONFIGURATION_TYPES=MacPorts

# pin the used version before macOS 11
# keep in mind that openimageio had the same pin
if {${os.platform} eq "darwin" && ${os.major} < 20} {
github.setup AcademySoftwareFoundation OpenColorIO 1.1.1 v
revision 3

checksums rmd160 81534822cb8350e1b7ba171c91226de996494d02 \
sha256 b7def3b5383c9b35dc9c0bdd26da74e2199c2b283d52bb84847aa307f70a0bc4 \
size 13830493

# see https://github.com/imageworks/OpenColorIO/commit/c43cc918c3e79e324f11ca47e95bfe36e9e0dd15
patchfiles-append patch-upstream.diff

# see https://gitweb.gentoo.org/repo/gentoo.git/tree/media-libs/opencolorio/files/opencolorio-1.1.0-yaml-cpp-0.6.patch
patchfiles-append patch-yaml-cpp.diff
# see https://gitweb.gentoo.org/repo/gentoo.git/tree/media-libs/opencolorio/files/opencolorio-1.1.0-yaml-cpp-0.6.patch
patchfiles-append patch-yaml-cpp.diff

patchfiles-append patch-yaml-cpp-0.7.diff
patchfiles-append patch-yaml-cpp-0.7.diff

patchfiles-append patch-CMakeLists.txt.diff
patchfiles-append patch-CMakeLists.txt.diff

livecheck.type none
}

# source assumes C++11 compiler
compiler.cxx_standard 2011
Expand All @@ -48,6 +63,9 @@ configure.cxxflags-append \
configure.cxxflags-append \
-Wno-error=self-assign-field

configure.cxxflags-append \
-Wno-deprecated-declarations

depends_build-append \
port:pkgconfig

Expand All @@ -68,7 +86,7 @@ configure.args-append \
# OpenColorIO intentially installs Python module in lib
# see https://github.com/imageworks/OpenColorIO/blob/15e96c1f579d3640947a5fcb5ec831383cc3956e/src/pyglue/CMakeLists.txt#L85

variant python27 description {Build the Python 2.7 bindings} conflicts python36 python37 python38 python39 {
variant python27 description {Build the Python 2.7 bindings} conflicts python36 python37 python38 python39 python310 python311 {
depends_lib-append port:python27
configure.args-append \
-DPYTHON=${prefix}/bin/python2.7
Expand All @@ -81,7 +99,7 @@ variant python27 description {Build the Python 2.7 bindings} conflicts python36
}
}

variant python36 description {Build the Python 3.6 bindings} conflicts python27 python37 python38 python39 {
variant python36 description {Build the Python 3.6 bindings} conflicts python27 python37 python38 python39 python310 python311 {
depends_lib-append port:python36
configure.args-append \
-DPYTHON=${prefix}/bin/python3.6
Expand All @@ -94,7 +112,7 @@ variant python36 description {Build the Python 3.6 bindings} conflicts python27
}
}

variant python37 description {Build the Python 3.7 bindings} conflicts python27 python36 python38 python39 {
variant python37 description {Build the Python 3.7 bindings} conflicts python27 python36 python38 python39 python310 python311 {
depends_lib-append port:python37
configure.args-append \
-DPYTHON=${prefix}/bin/python3.7
Expand All @@ -107,7 +125,7 @@ variant python37 description {Build the Python 3.7 bindings} conflicts python27
}
}

variant python38 description {Build the Python 3.8 bindings} conflicts python27 python36 python37 python39 {
variant python38 description {Build the Python 3.8 bindings} conflicts python27 python36 python37 python39 python310 python311 {
depends_lib-append port:python38
configure.args-append \
-DPYTHON=${prefix}/bin/python3.8
Expand All @@ -120,7 +138,7 @@ variant python38 description {Build the Python 3.8 bindings} conflicts python27
}
}

variant python39 description {Build the Python 3.9 bindings} conflicts python27 python36 python37 python38 {
variant python39 description {Build the Python 3.9 bindings} conflicts python27 python36 python37 python38 python310 python311 {
depends_lib-append port:python39
configure.args-append \
-DPYTHON=${prefix}/bin/python3.9
Expand All @@ -133,11 +151,38 @@ variant python39 description {Build the Python 3.9 bindings} conflicts python27
}
}

if {![variant_isset python27] && ![variant_isset python36] && ![variant_isset python37] && ![variant_isset python38] && ![variant_isset python39]} {
default_variants +python39
variant python310 description {Build the Python 3.10 bindings} conflicts python27 python36 python37 python38 python39 python311 {
depends_lib-append port:python310
configure.args-append \
-DPYTHON=${prefix}/bin/python3.10
post-destroot {
xinstall -d -m 0755 \
${destroot}${frameworks_dir}/Python.framework/Versions/3.10/lib/python3.10/site-packages
ln -s \
${prefix}/lib/python3.9/site-packages/PyOpenColorIO.so \
${destroot}${frameworks_dir}/Python.framework/Versions/3.10/lib/python3.10/site-packages/
}
}


variant python311 description {Build the Python 3.11 bindings} conflicts python27 python36 python37 python38 python39 python310 {
depends_lib-append port:python311
configure.args-append \
-DPYTHON=${prefix}/bin/python3.11
post-destroot {
xinstall -d -m 0755 \
${destroot}${frameworks_dir}/Python.framework/Versions/3.11/lib/python3.11/site-packages
ln -s \
${prefix}/lib/python3.9/site-packages/PyOpenColorIO.so \
${destroot}${frameworks_dir}/Python.framework/Versions/3.11/lib/python3.11/site-packages/
}
}

if {![variant_isset python27] && ![variant_isset python36] && ![variant_isset python37] && ![variant_isset python38] && ![variant_isset python39] && ![variant_isset python310] && ![variant_isset python311]} {
default_variants +python311
}

if {![variant_isset python27] && ![variant_isset python36] && ![variant_isset python37] && ![variant_isset python38] && ![variant_isset python39]} {
if {![variant_isset python27] && ![variant_isset python36] && ![variant_isset python37] && ![variant_isset python38] && ![variant_isset python39] && ![variant_isset python310] && ![variant_isset python311]} {
configure.args-append \
-DOCIO_BUILD_PYGLUE=OFF
}
Expand Down
Loading

0 comments on commit d32b2a8

Please sign in to comment.